nvim: add variable to prevent file cleanups
This commit is contained in:
parent
9b421d742f
commit
2ace21d1f6
@ -8,6 +8,9 @@ function M.map(mode, shortcut, command, description, buffer)
|
||||
end
|
||||
|
||||
function M.remove_trailing_whitespace()
|
||||
if vim.b.cleanup_file == false then
|
||||
return
|
||||
end
|
||||
local curpos = vim.api.nvim_win_get_cursor(0)
|
||||
vim.cmd([[keeppatterns %s/\s\+$//e]])
|
||||
vim.api.nvim_win_set_cursor(0, curpos)
|
||||
|
Loading…
x
Reference in New Issue
Block a user