To add to this stackoverflow question, what should one put in their .vimrc
to ensure 'private editing' of certain file extensions (e.g. .gpg
files).
Without compromising the effectiveness of the session, no info about work done should be saved, including registers, search history, command history, views, swaps, etc. For gpg
files, one can use this vim plugin, but besides editing the plugin, how would one extend these discussed ideas to arbitrary file types?
We'll probably make use of the following commands,
if <ft in privacy_ext_list>
set noswapfile
set noundofile
set viminfo=
endif
but besides the appropriate conditional statement, what's missing?
Further, is there a way with Vimscript to make an array of file extensions and then evaluate if the current filetype is within the array?