From f62b10487c2d2560923865b07306765f8ff055a2 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Fri, 15 Apr 2011 17:03:59 -0400 Subject: Fiddle with the default editor Start tracking .selected editor, make use of this in .profile. Create the v-editor script, which calls either $VISUAL, $EDITOR, or $SELECTED editor, depending. Symlink `v-editor' to `editor', to overide /bin/editor, which might be used by some stupid programs. --- bin/v-editor | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100755 bin/v-editor (limited to 'bin/v-editor') diff --git a/bin/v-editor b/bin/v-editor new file mode 100755 index 0000000..dc141bc --- /dev/null +++ b/bin/v-editor @@ -0,0 +1,7 @@ +#!/bin/sh + +if [ -n "$DISPLAY" ]; then + ${VISUAL:-$SELECTED_EDITOR} $@ +else + ${EDITOR:-$SELECTED_EDITOR} $@ +fi -- cgit v1.2.3-2-g168b