mirror of
https://github.com/LukeSmithxyz/voidrice.git
synced 2026-01-30 09:48:11 +01:00
autocmd to delete newlines at end of file on save. (#563)
This commit is contained in:
parent
64b8f08563
commit
203930c326
@ -103,8 +103,9 @@ set clipboard+=unnamedplus
|
|||||||
autocmd BufRead,BufNewFile /tmp/neomutt* map ZZ :Goyo\|x!<CR>
|
autocmd BufRead,BufNewFile /tmp/neomutt* map ZZ :Goyo\|x!<CR>
|
||||||
autocmd BufRead,BufNewFile /tmp/neomutt* map ZQ :Goyo\|q!<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/\s\+$//e
|
||||||
|
autocmd BufWritepre * %s/\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 files,directories !shortcuts
|
autocmd BufWritePost files,directories !shortcuts
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user