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.

How to prevent rename keyboard shortcut ("A") from removing the extention?

0 votes
asked Oct 8, 2015 in vifm by anonymous

Typing A removes the extension by default, which is pretty annoying.
I can see the intention behind the implementation, so here is what I suggest instead:

  • A would enter "New name" mode without changing the extension, but backspace would remove the extension.
    — With this approach, users can append to the extension, or use the arrow keys to change the file name without affecting the extension, and pressing backspace assumes that they want to change the extension.

What do you think?

If you don't want to change the implementation, how can I switch to a more standard vi-like behavior?

1 Answer

0 votes
answered Oct 8, 2015 by xaizek

It's not a builtin command, just a sample mapping from sample vifmrc that is defined as:

nnoremap A cw<c-w>

Just change it to:

nnoremap A cw

By the way, looks like I did exactly this some time ago, probably following the same reasoning. Will change sample files then, thanks!

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.