diff options
| author | vired <62380689+vired@users.noreply.github.com> | 2020-04-13 17:09:32 +0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-04-13 07:09:32 -0400 |
| commit | 203930c326ba04ff41df30328eefeb6dcc878abd (patch) | |
| tree | 0e0581585c01efd35365755b6fda72526f1749e3 /.config/nvim | |
| parent | 64b8f085636776e4ab1dad091711a3e8a22a8076 (diff) | |
| download | eibhear-203930c326ba04ff41df30328eefeb6dcc878abd.tar.gz eibhear-203930c326ba04ff41df30328eefeb6dcc878abd.tar.zst eibhear-203930c326ba04ff41df30328eefeb6dcc878abd.zip | |
autocmd to delete newlines at end of file on save. (#563)
Diffstat (limited to '.config/nvim')
| -rw-r--r-- | .config/nvim/init.vim | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index 5b1605d..c0078e1 100644 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -103,8 +103,9 @@ set clipboard+=unnamedplus autocmd BufRead,BufNewFile /tmp/neomutt* map ZZ :Goyo\|x!<CR> autocmd BufRead,BufNewFile /tmp/neomutt* map ZQ :Goyo\|q!<CR> -" Automatically deletes all trailing whitespace on save. +" Automatically deletes all trailing whitespace and newlines at end of file on save. autocmd BufWritePre * %s/\s\+$//e + autocmd BufWritepre * %s/\n\+\%$//e " When shortcut files are updated, renew bash and ranger configs with new material: autocmd BufWritePost files,directories !shortcuts |
