Ⅰ. 插件描述
Scilla vim pluginⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'edisonljh/vim-scilla'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'edisonljh/vim-scilla'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'edisonljh/vim-scilla'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/edisonljh/vim-scilla
Ⅳ. 文档说明
# vim-scilla
Basic syntax highlighting for Scilla, a safe-by-design smart contract language.
Installation
Pathogen
git clone https://github.com/edisonljh/vim-scilla.git ~/.vim/bundle/vim-scillaVundle
Add the following line to your ~/.vimrc:
Plugin 'edisonljh/vim-scilla'Syntax checker with ALE
If you are using ALE, you can enable scilla-checker to show errors right inside vim.
Here is how to enable it:
- Install ALE vim plugin
- Make
scilla-checkerexecutable available (https://github.com/Zilliqa/scilla#compiling-and-running) - Set STDLIB dir in vimrc:
let g:ale_scilla_checker_libdir = '<path>/stdlib' - Set CHECKER in vimrc:
let g:ale_scilla_checker_executable='<path>/scilla-checker' - Enable the linter in vimrc:
autocmd FileType scilla let b:ale_linters = ['checker'] - Open any scilla file and ensure checker is working:
:ALEInfo
Commenting
Comment functionality is available through NERDCommenter. It's not natively supported on this plugin yet. PRs are welcome!
License
See LICENSE