🔧 Updated trailing white space remove
This commit is contained in:
parent
ba161b074d
commit
3a26aa2223
1 changed files with 5 additions and 10 deletions
|
|
@ -40,16 +40,11 @@ vim.opt.cursorcolumn = true
|
||||||
vim.opt.splitbelow = true
|
vim.opt.splitbelow = true
|
||||||
vim.opt.splitright = true
|
vim.opt.splitright = true
|
||||||
|
|
||||||
-- Removes trailing spaces
|
-- Removes trailing spaces
|
||||||
-- vim.cmd([[function TrimWhiteSpace()
|
vim.api.nvim_create_autocmd({ "BufWritePre" }, {
|
||||||
-- %s/\s*$//
|
pattern = { "*" },
|
||||||
-- ''
|
command = [[%s/\s\+$//e]],
|
||||||
-- endfunction]])
|
})
|
||||||
-- Removes trailing spaces on save
|
|
||||||
-- vim.cmd([[autocmd FileWritePre * call TrimWhiteSpace()]])
|
|
||||||
-- vim.cmd([[autocmd FileAppendPre * call TrimWhiteSpace()]])
|
|
||||||
-- vim.cmd([[autocmd FilterWritePre * call TrimWhiteSpace()]])
|
|
||||||
-- vim.cmd([[autocmd BufWritePre * call TrimWhiteSpace()]])
|
|
||||||
|
|
||||||
-- formats on save
|
-- formats on save
|
||||||
-- vim.cmd([[autocmd BufWritePre * silent! :Neoformat]])
|
-- vim.cmd([[autocmd BufWritePre * silent! :Neoformat]])
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue