]> gitweb.fluxo.info Git - keyringer.git/commitdiff
Use a custom .vimrc so VIM command line is not messed with quotes (#50)
authorSilvio Rhatto <rhatto@riseup.net>
Tue, 20 May 2014 14:56:37 +0000 (11:56 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Tue, 20 May 2014 14:56:37 +0000 (11:56 -0300)
ChangeLog
Makefile
lib/keyringer/editors/vim [new file with mode: 0644]
lib/keyringer/functions

index aa63787859aae5cdb6d06ad4bbf816745b4f6a92..b2e527950f4cd655fd014ec21362a2673aa4e519 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2014-05-20 - Silvio Rhatto <rhatto@riseup.net>
+
+       Use a custom .vimrc so VIM command line is not messed with quotes (#50)
+
 2014-05-16 - 0.3.4 - Silvio Rhatto <rhatto@riseup.net>
 
        Workaround for open/edit action returning instantaneously (#49)
index c94a4b9c923080fc70759f799735b3b17a96eca6..7ef600186747126672e0d92b88e23249d76fc8cb 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -26,6 +26,8 @@ install_lib:
        $(INSTALL) -D --mode=0755 lib/keyringer/functions $(DESTDIR)/$(PREFIX)/lib/$(PACKAGE)/functions
        $(INSTALL) -D --mode=0755 -d lib/keyringer/actions $(DESTDIR)/$(PREFIX)/lib/$(PACKAGE)/actions
        $(INSTALL) -D --mode=0755 lib/keyringer/actions/* $(DESTDIR)/$(PREFIX)/lib/$(PACKAGE)/actions
+       $(INSTALL) -D --mode=0755 -d lib/keyringer/editors $(DESTDIR)/$(PREFIX)/lib/$(PACKAGE)/actions
+       $(INSTALL) -D --mode=0755 lib/keyringer/editors/* $(DESTDIR)/$(PREFIX)/lib/$(PACKAGE)/actions
 
 install_bin:
        $(INSTALL) -D --mode=0755 keyringer $(DESTDIR)/$(PREFIX)/bin/keyringer
diff --git a/lib/keyringer/editors/vim b/lib/keyringer/editors/vim
new file mode 100644 (file)
index 0000000..0f877df
--- /dev/null
@@ -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"
index 50d01db29a00b0bbcbce22660db29d881698fb3f..fdd84395f61561395648689362d445dbf5945c8d 100755 (executable)
@@ -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