vim-backslash


Ⅰ. 插件描述

Automatically insert a leading slash in VimL

Ⅱ. 基本信息

创建日期:  2016-09-08
使用用户:  2
Github星:  14
插件作者:  Alisue

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

vim-backslash

Version 0.1.2
Support Vim 7.4 or above
MIT License
Doc

vim-backslash is a filetype plugin which support to insert a leading backslash to continue expression in Vim script.

Assume "|" indicate the cursor in the following content:

let foobar = [
      \ 'foo',|

The o in a normal mode or <CR> in an insert mode makes the content like:

let foobar = [
      \ 'foo',
      \ |

And when the line contains only white spaces and "" like:

let foobar = line('.') ==# 'Hello'
      \ ? 'Good bye'
      \ : 'Foobar'
      \ |

Hitting o or <CR> remove the leading spaces and "" like:

let foobar = line('.') ==# 'Hello'
      \ ? 'Good bye'
      \ : 'Foobar'
|

Note that this plugin care about g:vim_indent_cont which is used in
$VIMRUNTIME/indent/vim.vim

添加新评论