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 have this weird problem that using a [count] with dd or DD does not apply to [count] files after the selected one. If I press 3dd, I expected three files to be deleted, and although the three files show up in the confirmation dialog, after pressing y to confirm deletion, only one file has been deleted.

Other actions such as gUU interpret counts correctly.

Any idea as to what is happening? I am on Vifm 0.11.

1 Answer

0 votes
edited by

I can't reproduce it.

Does it happen if you run vifm --no-configs (quit with :q! to avoid writing vifminfo)?

Maybe you've mapped dd to something which doesn't take count into account? Check with :nmap dd and :nmap DD. However, this would be weird since confirmation shows correct list of files.


With --no-configs it is working properly.

I had a nnoremap d dd but I did delete it from vifmrc before reporting the problem.

Interestingly, if I try :nmap dd with a --no-configs instance, I get a single line saying

dd remove files

However, if I try the same in a normal instance, I get an empty line before that.

{empty line}
dd remove files

I have no idea of what is causing this, but it must then be in my vifmrc. I'll keep trying to track down the issue. Thank you for your help.


That's a separator between user mappings and builtin keys. Need to fix this odd behaviour, I was going to write "Builtin:" and "User:" explicitly anyway, because this empty line only confuses people.

However, normal behaviour with --no-configs does show that the issue at least depends on something in your vifmrc (probably an option). Since it's not a dd map, it's probably a bug.


I have tracked it down to my statusline setting:

set statusline="%{expand('%c:p')}"%=Owner:%u\|Updir:"%{system('stat --printf=%A '.expand('%d'))}"\|%a

Should I open an issue?


Yes, please. Somewhat surprisingly it's expand() and not system() which causes this.