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 use vi mode while changing file names

0 votes
asked Jun 25 in vifm by anonymous

I would like to be able to use basic vi commands when the file name change dialog is opened (with cw or cW). At worst I would like to have shortcuts that place the cursor at the beginning of the file name, or delete the file name (this is possible in ranger).

1 Answer

0 votes
answered Jun 25 by xaizek
 
Best answer

I would like to be able to use basic vi commands when the file name change dialog is opened (with cw or cW).

There is no vi-mode in command-line mode, but you can press Ctrl-G to spawn Vim and do the editing there. Or you can use :rename instead of cw, which will call Vim to edit file list (use nnoremap cw :rename<cr> if you want to do this always).

At worst I would like to have shortcuts that place the cursor at the beginning of the file name, or delete the file name

Rename by adding keys to perform the change via mappings, e.g.:

" move cursor to the beginning
nnoremap cW cW<c-a>
" delete the file name
nnoremap cW cW<c-u>
commented Jun 26 by anonymous

Thanks for your thorough answer. That is what I was looking for. vifm is great!

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