Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lambdalisue/vim-backslash
Automatically insert a leading backslash when editing Vim scripts
https://github.com/lambdalisue/vim-backslash
Last synced: 12 days 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 (about 8 years ago)
- Default Branch: master
- Last Pushed: 2024-02-23T11:31:31.000Z (8 months ago)
- Last Synced: 2024-10-03T12:40:14.856Z (about 1 month ago)
- Language: Vim Script
- Homepage:
- Size: 29.3 KB
- Stars: 32
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# vim-backslash
![Support Vim 7.4 or above](https://img.shields.io/badge/support-Vim%207.4%20or%20above-yellowgreen.svg?style=flat-square)
[![MIT License](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](LICENSE.md)
[![Doc](https://img.shields.io/badge/doc-%3Ah%20vim--backslash-orange.svg?style=flat-square)](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)