lambdalisue / vim-backslash

Automatically insert a leading backslash when editing Vim scripts

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

vim-backslash

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

About

Automatically insert a leading backslash when editing Vim scripts

License:MIT License


Languages

Language:Vim Script 100.0%