New answers tagged

1 vote

Setting variables in file in ftplugin directory

Filetype plugins are meant to set buffer local stuff. All your variables are global. IMO, It doesn't make sense to set, and reset, and reset them again and again every time you open a new C file. Even ...
Luc Hermitte's user avatar
  • 17.4k
0 votes

Setting variables in file in ftplugin directory

Filetype plugins, whether they are from $VIMRUNTIME/ftplugin, ~/.vim/ftplugin, or ~/.vim/after/ftplugin, are sourced before any syntax script. The "options" you listed in your question are ...
romainl's user avatar
  • 40.6k
1 vote
Accepted

The most appropriate filetype for fail2ban configuration files?

I would use the toml filetype for fail2ban configuration files. You could use the following modeline at the end of your configuration file to help Vim discovering the correct filetype to use: # vim: ...
Vivian De Smedt's user avatar
1 vote
Accepted

Setting variables in file in ftplugin directory

The ftplugin intention is to replace the autocmd FileType calls. The corresponding file is executed after the filetype is set and before the corresponding distribution file is executed. It is not too ...
Vivian De Smedt's user avatar
1 vote
Accepted

How do I prevent/remove/delete temp files?

The files you see are the backup file quotes.txt~ and the undo file .quotes.txt.un~. Turn them off You can prevent these files from being created by adding the following lines to your vimrc: set ...
Friedrich's user avatar
  • 1,866
0 votes

set syntax color to log files, .env.local files without detected extension

As mentioned in https://stackoverflow.com/questions/3853028/how-to-force-vim-to-syntax-highlight-a-file-as-html/3853036#3853036 we can define it temporarily with command like : :set syntax=<syntax ...
bcag2's user avatar
  • 101

Top 50 recent answers are included