vimrc: set exrc+secure

This commit is contained in:
surtur 2022-08-11 12:58:49 +02:00
parent 22e33ea628
commit 12c3eff3c2
Signed by: wanderer
GPG Key ID: 19CE1EC1D9E0486D

@ -945,6 +945,19 @@ set cursorlineopt=number
hi CursorLineNR cterm=bold
syntax sync minlines=256
" vim help had this to say about 'exrc':
"
" Enables the reading of .vimrc, .exrc and .gvimrc in the current directory.
" Setting this option is a potential security leak. E.g., consider unpacking
" a package or fetching files from github, a .vimrc in there might be a trojan
" horse. BETTER NOT SET THIS OPTION!
" Instead, define an autocommand in your .vimrc to set options for a matching
" directory.
"
" but since it's needed for direnv, we have to enable it.
set exrc
set secure
function! AskQuit (msg, proposed_action)
if confirm(a:msg, "&Quit?\n" . a:proposed_action) == 1