revim


Ⅰ. 插件描述

Vim plugin for Erlang

Ⅱ. 基本信息

创建日期:  2012-10-12
使用用户:  1
Github星:  3
插件作者:  Slava Yurin

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin 'nevar/revim'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle 'nevar/revim'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug 'nevar/revim'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/nevar/revim

Ⅳ. 文档说明

revim

Erlang + Rebar plugin for vim

GOTO

For quick goto from function call to it declaration you can use
<localleader>d or you can set up own mapping:

autocmd FileType erlang nnoremap <silent> <buffer>
    \ <F6> :call revim#goto#Define(g:global_call)<CR>

There is 2 type of function call: global (whith module name) and local. Local
function call always open in current buffer. For global call you can specified
how to process move to declaration. Exists 3 type of goto:

  • 0 = in same buffer (move cursor, if declaration in other file, than first
    open it)
  • 1 = in split window (split window and in new window goto declaration)
  • 2 = in new tab (open new tab and goto declaration)

Example:

  • Goto local function in same buffer and global function in new tab (default)

    let g:global_call = 2

Goto smart enjoy to not open new window for already opened file. It simple go
to that buffer and move cursor to function declaration.

Highlight syntax

Highlight correct erlang expressions and some common errors.

Settings

In you .vimrc you can change color for some of erlang expressions:

  • different highlighting for function heads

    hi erlangFunHead cterm=bold
  • highlight edoc tags:

    hi erlangEdocTag cterm=bold
  • highlight erlang BIF:

    hi erlangBIF cterm=bold ctermfg=green

添加新评论