Ⅰ. 插件描述
Automatic folding for Elixir filesⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'gasparch/vim-elixir-fold'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'gasparch/vim-elixir-fold'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'gasparch/vim-elixir-fold'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/gasparch/vim-elixir-fold
Ⅳ. 文档说明
# vim-elixir-fold
This is a part of Vim-Elixir-IDE package.
Provides automatic folding of Elixir source files.
- function signature is shown if available
- multiple clause heads folded together
Installation
Drop the file in ~/.vim/plugin or ~/vimfiles/plugin folder, or if you
use pathogen into the ~/.vim/bundle/vim-elixir-fold or
~/vimfiles/bundle/vim-elixir-fold.
Style consideration
Some function heads will NOT be folded at all.
Function with arguments is expected to have braces around arguments list. If function does not have arugments, braces can be omitted.
So please rewrite this
def func arg do
:ok
endto this form:
def func(arg) do
:ok
endThis is recognized correctly:
def func do
true
endDevelopment
Setup Ruby 2.3.1 environment using rbenv.
To run the tests you can run bundle exec rspec.
To spawn an interactive Vim instance with the configs from this repo use bin/spawn_vim
TODO
- profiling/speedup