🔧 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.splitright = true
|
||||
|
||||
-- Removes trailing spaces
|
||||
-- vim.cmd([[function TrimWhiteSpace()
|
||||
-- %s/\s*$//
|
||||
-- ''
|
||||
-- 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()]])
|
||||
-- Removes trailing spaces
|
||||
vim.api.nvim_create_autocmd({ "BufWritePre" }, {
|
||||
pattern = { "*" },
|
||||
command = [[%s/\s\+$//e]],
|
||||
})
|
||||
|
||||
-- formats on save
|
||||
-- vim.cmd([[autocmd BufWritePre * silent! :Neoformat]])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue