Skip to content

Automatically insert a leading backslash when editing Vim scripts

License

Notifications You must be signed in to change notification settings

lambdalisue/vim-backslash

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •