Welcome to Vifm Q&A, where you can ask questions about Vifm usage. Registration is optional, anonymous posts are moderated. GitHub or Google logins are enabled.
0 votes
in vifm by

I would like to map backspace to move up one level as h only when I am in normal mode. Here is what I am using in vifmrc:

nnoremap <bs> gh

But, it does not work. How can I achieve this?

Thank you

1 Answer

+1 vote
by
selected by
 
Best answer

See description of <bs> here and also map <c-h>:

Most of the time they are defined consistently and don't cause surprises, but <c-h> and <bs> are treated differently in different environments (although they match each other all the time), that's why they correspond to different keys in vifm. As a consequence, if you map <c-h> or <bs> be sure to repeat the mapping with the other one so that it works in all environments.

by

Does this remove any mapping to backspace?

:noremap <bs>

So, basically the issue was that backspace key is defined as delete key in my system?

by

Does this remove any mapping to backspace?

:noremap <bs>? No, it just opens a menu.

So, basically the issue was that backspace key is defined as delete key in my system?

Well, it's called ASCII delete key, but it's a backspace. A third possible id for backspace. Not sure why it works like this for you, I'd expect it to depend on terminal.

by

When I enter :noremap <bs> I get the following error

Too few arguments

Should I press a specific key after the command?

by

Sorry, I forgot that noremap won't work, use nmap instead (nnoremap works the same).

by

thank you - now I see the meanu

If you would like to make a bug report or feature request consider using GitHub, SourceForge or e-mail. Posting such things here is acceptable, but this is not a perfect place for them.

Support Ukraine
...