|
|
@ -66,11 +66,14 @@ function M.setup(opts)
|
|
|
|
|
|
|
|
|
|
|
|
local cursor_pos = vim.api.nvim_win_get_cursor(0)
|
|
|
|
local cursor_pos = vim.api.nvim_win_get_cursor(0)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if vim.o.ma then
|
|
|
|
-- delete trailing whitespace
|
|
|
|
-- delete trailing whitespace
|
|
|
|
vim.cmd([[:keepjumps keeppatterns %s/\s\+$//e]])
|
|
|
|
vim.cmd([[:keepjumps keeppatterns %s/\s\+$//e]])
|
|
|
|
|
|
|
|
|
|
|
|
-- delete lines @ eof
|
|
|
|
-- delete lines @ eof
|
|
|
|
vim.cmd([[:keepjumps keeppatterns silent! 0;/^\%(\n*.\)\@!/,$d_]])
|
|
|
|
vim.cmd([[:keepjumps keeppatterns silent! 0;/^\%(\n*.\)\@!/,$d_]])
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
reset_cursor_pos(cursor_pos)
|
|
|
|
reset_cursor_pos(cursor_pos)
|
|
|
|
end,
|
|
|
|
end,
|
|
|
|