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 am trying to re-map the <esc> so in addition to clearing the selection it also resets the local filter.

I have tried a few things, however mappings like nnoremap <esc> zM | :noh<cr> or map <esc> zM | :noh<cr> don't seem to work for Escape.

edited by

Test comment, please disregard.

Just trying to recall what markup breaks the parser.... Linking somewhere, maybe even twice and adding an image:

![felis catus][1]

$ echo $PATH

[1]: https://upload.wikimedia.org/wikipedia/commons/thumb/b/b6/Felis_catus-cat_on_snow.jpg/640px-Felis_catus-cat_on_snow.jpg

1 Answer

+1 vote
selected by
Best answer

You're doing something weird with those spaces and bar in a mapping. It should be

nnoremap <esc> zM:noh<cr>

or according to your description just this

nnoremap <esc> zr<esc>

Aha, so the syntax is a bit different to vim where one would normally use | or <bar>.

The 2nd snippet you have provided is exactly what I was looking for. Thanks heaps!


so the syntax is a bit different to vim

Not really. Bar separates command-line commands, when you in normal mode you just enter command-line mode with :, enter command and run it.

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.