From c2258daf2beb025e599ffaa1cbaf122506953abc Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Tue, 20 May 2014 11:56:37 -0300 Subject: Use a custom .vimrc so VIM command line is not messed with quotes (#50) --- lib/keyringer/editors/vim | 5 +++++ lib/keyringer/functions | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 lib/keyringer/editors/vim (limited to 'lib') diff --git a/lib/keyringer/editors/vim b/lib/keyringer/editors/vim new file mode 100644 index 0000000..0f877df --- /dev/null +++ b/lib/keyringer/editors/vim @@ -0,0 +1,5 @@ +" Use sane defaults for VIM to avoid data leakage +" See https://keyringer.pw/trac/ticket/50 +set nowritebackup +set nobackup +set viminfo="NONE" diff --git a/lib/keyringer/functions b/lib/keyringer/functions index 50d01db..fdd8439 100755 --- a/lib/keyringer/functions +++ b/lib/keyringer/functions @@ -287,7 +287,7 @@ function keyringer_set_env { # Avoid viminfo, see https://keyringer.pw/trac/ticket/50 if $EDITOR --help | grep -q -e "^VIM"; then if ! echo $EDITOR | grep -q -- "-i NONE"; then - EDITOR="$EDITOR -i NONE '+set nowritebackup' '+set nobackup'" + EDITOR="$EDITOR -S `dirname $LIB`/editors/vim" fi fi -- cgit v1.2.3