Wesley Blake
Wesley Blake

Reputation: 25

Ranger filemanager defaulting to nano

I set Ranger as a keybind with Awesome Window Manager (AWM). My environmental variables and shell (ZSH) for both visual and editor are set to VIM. When I use the keybind (super + f), Ranger defaults the editor to Nano. The man page for Ranger says that it defaults to VIM. I have no idea why it is doing this.

''' awful.key({ modkey }, "f", function () awful.util.spawn( "alacritty -e 'ranger'" ) end, 359 {description = "ranger" , group = "super"}), ''' ^^^This is the keybind.

Upvotes: 0

Views: 447

Answers (1)

Emmanuel Lepage Vallee
Emmanuel Lepage Vallee

Reputation: 2762

Something probably set the EDITOR environment, somewhere. Follow these steps to fix it:

  1. Open /etc/passwd and make sure your shell is zsh
  2. Make sure you have export EDITOR=/usr/bin/vim in ~/.zshrc
  3. Replace awful.util.spawn with awful.spawn.with_shell. This ensure it reads ~/.zshrc instead of launching range with an "empty" environment.

Upvotes: 1

Related Questions