4

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?

5

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.

  1. You forgot to source .bashrc after editing it with export EDITOR=vim change.
  2. 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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.