New answers tagged

1 vote

Run autocmd on file close

Read :h BufWinLeave carefully Read :h BufUnload carefully Read :h 'hidden' carefully ... PROFIT
user avatar
  • 15.8k
0 votes

vim: FileChangedShell-like notification for file created after editing started

Yeah, as far as I can tell in the vim+neovim source, this would require a patch to add a new feature, it's a separate codepath with no autocommands it would seem: in neovim in vim In both cases this ...
user avatar
1 vote
Accepted

How to set fileformat based on file type?

There are in fact 4 different ways to do this. You can read all of them in :h new-filetype. I will only describe the simplest solution: In your user runtime directory, create a new file in your ...
user avatar
1 vote
Accepted

Odd behaviour when pressing Tab with this mapping

If you don't define g:tex_flavor, it will search for keywords in your file in order to select one of the available flavors. Therefore, in small .tex files, it will guess it incorrectly as plaintex. ...
user avatar

Top 50 recent answers are included