mirror of
https://github.com/LukeSmithxyz/voidrice.git
synced 2026-03-20 01:37:45 +01:00
Leave a single newline if reducing trailing.
While removing trailing newlines is a good idea, it is a problem when editing C files which "must" have an empty line at the bottom. So we leave just a single newline, if there were any.
This commit is contained in:
parent
9adf0e6bcd
commit
877214a631
@ -113,7 +113,7 @@ set noshowcmd
|
|||||||
|
|
||||||
" Automatically deletes all trailing whitespace and newlines at end of file on save.
|
" Automatically deletes all trailing whitespace and newlines at end of file on save.
|
||||||
autocmd BufWritePre * %s/\s\+$//e
|
autocmd BufWritePre * %s/\s\+$//e
|
||||||
autocmd BufWritePre * %s/\n\+\%$//e
|
autocmd BufWritePre * %s/\n\+\%$/\n/e
|
||||||
|
|
||||||
" When shortcut files are updated, renew bash and ranger configs with new material:
|
" When shortcut files are updated, renew bash and ranger configs with new material:
|
||||||
autocmd BufWritePost bm-files,bm-dirs !shortcuts
|
autocmd BufWritePost bm-files,bm-dirs !shortcuts
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user