How, on VIFM, you can map a key to call the "=" (filter) function, without an initial query?

1

When you type "=" on VIFM, it starts with the last query as the initial query. I want it to start empty. How is that possible?

viclib

Posted 2014-12-30T19:45:54.057

Reputation: 11

Answers

1

Put the following command into your vifmrc to achieve the desired behaviour of =:

nnoremap = =<c-u>

Some details so you know how to deal with something similar in future:

  • The command maps = to =<c-u> sequence of keys.
  • nnoremap instead of nmap is needed to prevent expansion of any keys in right-hand side (in case you map Ctrl-U in command-line mode to something else one day).
  • <c-u> key (notation for Ctrl-U) in command-line mode removes all characters from current position to the beginning of the line, just as in shell.
  • As cursor is positioned at the end of the line <c-u> effectively clears the line.

xaizek

Posted 2014-12-30T19:45:54.057

Reputation: 891

1Hello, I'm Viclib, thanks for your answer. Unfortunately I can't accept it because SO requires me to "complete my signup" with the other login before so. But when I do it (which requires an absurdly restrictive password which I had to note down, making it much less safe than the one I had in mind), go to my email and click on the confirmation link, it says "email already registered" in plain text without anything else on the page at all. Effectively I'm half-logged in an account that can't vote nor register to a full-login because I apparently already used the email before. Sorry. – MaiaVictor – 2014-12-31T19:26:31.030