Ⅰ. 插件描述
Kerboscript support plugin for Vim/NeovimⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'freedzone/kerbovim'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'freedzone/kerbovim'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'freedzone/kerbovim'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/freedzone/kerbovim
Ⅳ. 文档说明
# kerbovim
Kerboscript syntax for Vim. Maintained (so far).
Installation
Depends on your plugin manager.
For vim-plug users:
Plug 'Freedzone/kerbovim'Features
Highlights:
- booleans
- bound vars
- braces, brackets, etc
- built-ins
- comments
- conditionals
- constants
- delegates declarations and references
- function declarations and calls
- keywords
- loops
- numbers, floats (all notations)
- operators (boolean and math)
- statements
- strings
- todo
- types
Indent:
- indent: 4 spaces
- enabled
autoindent - could not make
cindentandsmartindentwork. Dot delimiter results in very poor experience
Look
IDE-Like Experience
If you wish to enhance your experience with features like autocomplete, hover symbol highlight, signature help, refactoring, etc., I highly suggest to try out kos-language-server.
To pair up KLS with Vim I used an intellisense engine - coc.nvim.
The configuration is rather simple. KLS should be available in PATH on your system. In your coc-settings.json put:
{
"suggest": {
"autoTrigger": "always",
"enablePreview": true,
"minTriggerInputLength": 2
},
"languageserver": {
"kls": {
"command": "kls",
"args": ["--stdio"],
"shell": true,
"filetypes": ["kerboscript"],
"initializationOptions": {},
"settings": {}
}
}
}If you want to display diagnostic info through ALE, add this option:
"diagnostic": {
"displayByAle": true
},