From 12c3eff3c20516a85d26e149f3d17e0601664242 Mon Sep 17 00:00:00 2001 From: surtur Date: Thu, 11 Aug 2022 12:58:49 +0200 Subject: [PATCH] vimrc: set exrc+secure --- .vim/vimrc | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.vim/vimrc b/.vim/vimrc index ad6ff83..6e06170 100644 --- a/.vim/vimrc +++ b/.vim/vimrc @@ -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