coffee-nvim Nvim 的 Coffee Host

程序名称:coffee-nvim

授权协议: GPL

操作系统: 跨平台

开发语言: Python

coffee-nvim 介绍

这个插件给 coffeescripting (node.js) 提供了一个 rpc-plugin host,以及一组由 vimscript 启发的指令。

Lib

Nvim = { 
  # neovim-client API...
  # all functions can be called sync/async depending if you pass a callback 
}
# Global objects
current.buffer == Nvim.getCurrentBuffer()
current.window == ...
current.tab    == ...
# buffers: listed buffers only
buffers == Nvim.getBuffers().filter((b) -> b.listed)
windows == Nvim.getwindows()
tabs    == Nvim.getTabpages()
# Buffer properties:
buffer.number: Read-only
buffer.name:   bufname
buffer.lenght: buffer.lineCount()
buffer.listed: buffer.getoption('buflisted')
buffer.type:   buffer.getoption('buftype')
buffer.valid:  buffer.isValid()
# Option & Var access
buffer[':VARNAME'] # => buffer.getvar('VARNAME')
buffer['&OPTNAME'] # => buffer.getoption('OPTNAME')
# same goes for window & tabpage
# Cursor
cursor                          # => [line, row]
cursor[0] == cursor.line        # true
cursor[1] == cursor.row         # true
cursor = 2                      # => position [2, 0]
cursor = [10, 3]                # => position [10, 3]
cursor.row += 5                 # => position [10, 8]
cursor = current.buffer.length  # => last line
cursor += 10                # => Error
# equivalent to: cursor = [10, 8] + 10
# Functions
call.getcmdline() # => :call getcmdline()
# => returns the function result
# Other
echo()
echohl()
input('keys<esc>')
execute('wincmd w')
get('varname')
set('option', 'value') OR set('option?')

coffee-nvim 官网

https://github.com/romgrk/coffee-nvim

相关编程语言

Pacman 是一个软件包管理器, 作为 ArchLinux 发行版...
Smb4K 是KDE下的网络共享浏览器 更多屏幕截图请看:...
Wine (“Wine Is Not an Emulator” 的首字母缩写)...
虚拟桌面软件,可管理最多9个虚拟桌面,你可以用热键...
UNetbootin (Universal Netboot Installer)为一种跨...
Cobbler 可以用来快速建立 Linux 网络安装环境,它已...