Set Environment Variable for Ranger File Manager
7,200
I use ranger
too, and vim
.
Try env EDITOR=vim ranger
then try out E option to open an editor for the file. If it worked, then the changes are not working for you for either of the two reasons.
- You forgot to source
.bashrc
after editing it withexport EDITOR=vim
change. - You might be using another shell
For scenario one, just do a source ~/.bashrc
before starting ranger or open another shell.
For later you want to find out the shell that you are using and edit the proper environment file for it.
Related videos on Youtube
Author by
R.G.
Updated on September 18, 2022Comments
-
R.G. almost 2 years
I've recently stumbled across ranger file manager and immediately took a liking to it but I'm having a problem.
How is it possible to change environment variables for ranger? I want my default editor (e.g. pressing E) to be vim but setting: export EDITOR=vim in
.bashrc
doesn't seem to help.Any suggestions?
-
jasonwryan over 9 years
-
PinkFloyd over 9 yearsAre you really using bash? As I use zsh, I had to set
export EDITOR=vim
im .zshrc and everything works fine
-