https://github.com/raviqqe/vim-nonblank
Delete trailing whitespaces on every write
https://github.com/raviqqe/vim-nonblank
plugin vim
Last synced: about 1 year ago
JSON representation
Delete trailing whitespaces on every write
- Host: GitHub
- URL: https://github.com/raviqqe/vim-nonblank
- Owner: raviqqe
- License: unlicense
- Created: 2016-05-08T06:43:35.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2018-04-03T08:12:46.000Z (about 8 years ago)
- Last Synced: 2025-03-29T03:41:35.503Z (about 1 year ago)
- Topics: plugin, vim
- Language: Vim script
- Homepage:
- Size: 9.77 KB
- Stars: 5
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# vim-nonblank
This plugin deletes trailing whitespaces on every write.
## Installation
Using [vim-plug](https://github.com/junegunn/vim-plug),
```vim
Plug 'raviqqe/vim-nonblank'
```
## Example
A buffer (`$` denotes a newline character)
```text
foo $
$
$
bar baz $
$
$
```
will be normalized as below.
```text
foo$
$
$
bar baz$
```
## Configuration
### Disabling auto deletion
Set the `enabled` flag to `0`.
```vim
let g:nonblank_enabled = 0
```
Then you can run `:NonBlank` command manually.
### Blacklisting filetypes
Set the `blacklist` flag.
```vim
let g:nonblank_blacklist = ['python']
```
The default value is `['diff', 'gitcommit']`.
## License
[The Unlicense](https://unlicense.org/)