New answers tagged editors
0
votes
How to automatically strip trailing spaces on save in Vi and Vim?
In lua code:
vim.api.nvim_create_autocmd("BufWritePre", {
pattern = "*",
command = ":%s/\\s\\+$//e",
})
Top 50 recent answers are included
Related Tags
editors × 338vim × 54
text-processing × 37
linux × 20
debian × 20
vi × 20
files × 18
text × 18
software-rec × 15
kate × 15
nano × 14
command-line × 12
kde × 12
bash × 11
emacs × 11
sed × 10
terminal × 10
macos × 10
geany × 9
keyboard-shortcuts × 8
environment-variables × 8
shell × 7
gedit × 7
ide × 7
ed × 7