Welcome to Vifm Q&A, where you can ask questions about using Vifm. Registration is optional, anonymous posts are moderated. E-mail and GitHub logins are enabled.
0 votes
in vifm by

I remapped a bunch of commands starting with "e", like:

nnoremap < wait > ee :command...
nnoremap < wait > es :command...
etc...

I can see them all just by pressing "e"; however, pressing ESC instead of a second letter will close the suggestions AND switch my current pane to view mode (which is what the "e" mapping normally does, I believe).

Is there a way to avoid incurring into the original behaviour of the remapped letter?

by
edited by

I just found a workaround:
nnoremap < wait> e< esc> < esc>

1 Answer

0 votes
by
edited by

As in Vim, there is <nop> which can be used to map a key to do nothing:

nnoremap <wait> e <nop>

Builtin keys can't be unmapped, they can only be hidden by user-defined keys. So such mappings is how you deal with it.

EDIT: <wait> has no effect for single-character mappings, so e<esc> is needed.

by

I forgot to mention I had tried this and it won't work in this case, pressing "e" will just display a long list of "key" suggestions for a split second only.

by

Yes, you're right. <wait> affects prefix matching and thus doesn't have any effect for a single-character mapping.

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.
...