Commit Diff


commit - ed9e82416fd9970147be9b8d8c8a5e1170b55f95
commit + e6fea6580e309f2bf98fcd74156c5d4d3e0a5f9d
blob - 7b84d6b99d9656961b3242d5f18b5e8aa1411a62
blob + 40c09ed04b6356f1f6e29cd483f885d7604c095c
--- README.md
+++ README.md
@@ -39,7 +39,7 @@ Quick Start
      0-9 - change tab
   RETURN - open $SHELL on the current directory
    SPACE - open $PAGER with the selected file
-       e - open $EDITOR with the selected file
+       e - open $VISUAL or $EDITOR with the selected file
        / - start incremental search (RETURN to finish)
      n/N - create new file/directory
        R - rename selected file or directory
@@ -65,13 +65,13 @@ editing the file `config.h` and rebuilding the binary.
  Note that the external programs executed by some Rover commands may be changed
 via the appropriate environment variables. For example, to specify an editor:
  ```
- $ EDITOR=vi rover
+ $ VISUAL=vi rover
  ```
 
  Rover will first check for variables prefixed  with ROVER_. This can be used to
 change Rover behavior without interfering with the global environment:
  ```
- $ ROVER_EDITOR=vi rover
+ $ ROVER_VISUAL=vi rover
  ```
 
  Please read rover(1) for more information.
blob - 43b33b6694800507136c2bcdf5f3c16097f2f70d
blob + 82a6e88e186d9e1786ea6881e108514b4962694f
--- rover.1
+++ rover.1
@@ -115,7 +115,7 @@ Open \fB$SHELL\fR on the current directory.
 Open \fB$PAGER\fR with the selected file.
 .TP
 .B e
-Open \fB$EDITOR\fR with the selected file.
+Open \fB$VISUAL\fR or \fB$EDITOR\fR with the selected file.
 .TP
 .B o
 Open \fB$OPEN\fR with the selected file.
@@ -194,8 +194,11 @@ Name of shell program (e.g. \fI/bin/sh\fP).
 .B PAGER
 Name of pager program (e.g. \fIless\fP).
 .TP
+.B VISUAL
+Name of visual editor program (e.g. \fIvim\fP or \fIemacs\fP).
+.TP
 .B EDITOR
-Name of editor program (e.g. \fIvim\fP or \fIemacs\fP).
+Name of line editor program (e.g. \fIed\fP or \fIex\fP).
 .TP
 .B CLIP
 Path of clipboard file (e.g. \fI/tmp/clipboard\fP).
@@ -212,9 +215,9 @@ typing something like \fBgrep abc "$RVSEL"\fR.
 This variable can be set to a command accepting a single argument: a filename.
 The command is supposed to open the given file with an appropriate program.
 .TP
-.B ROVER_SHELL, ROVER_PAGER, ROVER_EDITOR, ROVER_OPEN
+.B ROVER_SHELL, ROVER_PAGER, ROVER_VISUAL, ROVER_EDITOR, ROVER_OPEN
 If any of these variables are set, they override \fBSHELL\fR, \fBPAGER\fR,
-\fBEDITOR\fR and \fBOPEN\fR, respectivelly.
+\fBVISUAL\fR, \fBEDITOR\fR and \fBOPEN\fR, respectively.
 .SH CONFIGURATION
 .PP
 If you want to change Rover key bindings or colors, you can edit the
blob - 723c11a88d523b81d74cfb5ec434ed0ee255480d
blob + 6db7dd9cea2303d6f15979e5a544439d48884a08
--- rover.c
+++ rover.c
@@ -328,7 +328,9 @@ get_user_programs()
 {
     ROVER_ENV(user_shell, SHELL)
     ROVER_ENV(user_pager, PAGER)
-    ROVER_ENV(user_editor, EDITOR)
+    ROVER_ENV(user_editor, VISUAL)
+    if (!user_editor)
+        ROVER_ENV(user_editor, EDITOR)
     ROVER_ENV(user_open, OPEN)
 }