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.

  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.

Share:
7,200

Related videos on Youtube

R.G.
Author by

R.G.

Updated on September 18, 2022

Comments

  • R.G.
    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?