Re: How to remove white space at the end of each line while saveing /only for ft=roff/ ?
On 2021-02-13, tuxic wrote:
> The subject nearly says it all:
> When editing nroff or troff files white space at the end of a line
> or on a line alone can be poisonous... :)
> On other filetypes it is not neccessarily the case and harmless.
> So I want to remove those white space only when saveing files in
> roff/nroff/troff format.
> What I accomplish so far is to remove white space for any kind
> of file...but that's not exactly what I want.
> How can I limit it to [nt]*roff filles only!
It should work to put the following autocommand in an after filetype
plugin file, i.e., in ~/.vim/after/ftplugin/nroff.vim: