Ⅰ. 插件描述
just a something i can include in my vundle confⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'rompetroll/vim-scalariform'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'rompetroll/vim-scalariform'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'rompetroll/vim-scalariform'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/rompetroll/vim-scalariform
Ⅳ. 文档说明
#vim-scalariform
This is just https://github.com/mdr/scalariform wrapped in a vim plugin for my own personal convenience.
I now just need a vundle line in my .vimrc to get scalariform mapped as "gq" and equals commands
I bound the equalsprg to scalariform because I have that in my fingers. I know I don't have no way to do
basic indentation in scala files now, but that works for me
usage examples
format whole file
┌------ go to top gg=G └------ use formatter which is configured via "equalsprg" from where cursor is to end of file
or
┌------ go to top
ggVG=
| └-- format using equalsprg
└------ select whole file in visual-line-mode
or
┌------ go to top
ggVGgq
| └-- format using formatprg
└------ select whole file in visual-line-mode
- format portions of a file
does not really work. scalariform wants whole files
License
DATW (do as thou wilt).
The bundled scalariform.jar is under MIT license https://github.com/mdr/scalariform/blob/master/LICENCE.