https://github.com/lambdalisue/vim-backslash
Automatically insert a leading backslash when editing Vim scripts
https://github.com/lambdalisue/vim-backslash
Last synced: 2 months ago
JSON representation
Automatically insert a leading backslash when editing Vim scripts
- Host: GitHub
- URL: https://github.com/lambdalisue/vim-backslash
- Owner: lambdalisue
- License: mit
- Created: 2016-09-08T23:33:22.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2024-02-23T11:31:31.000Z (over 1 year ago)
- Last Synced: 2025-02-05T02:51:12.178Z (5 months ago)
- Language: Vim Script
- Homepage:
- Size: 29.3 KB
- Stars: 33
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# vim-backslash

[](LICENSE.md)
[](doc/vim-backslash.txt)_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:
```vim
let foobar = [
\ 'foo',|
```The `o` in a normal mode or `` in an insert mode makes the content like:
```vim
let foobar = [
\ 'foo',
\ |
```And when the line contains only white spaces and "\" like:
```vim
let foobar = line('.') ==# 'Hello'
\ ? 'Good bye'
\ : 'Foobar'
\ |
```Hitting `o` or `` remove the leading spaces and "\" like:
```vim
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](https://github.com/vim/vim/blob/master/runtime/indent/vim.vim)