I'd like to achieve following:
<CR>
- fall through, e.g. open the file or traverse into the directory at hand
4<CR>
- jump to file 4
In vim I'm using <expr>
:
nnoremap <expr> <silent> <CR> v:count ? ":<C-U><Esc>" . v:count . "G" : "<CR>"
But since vifm
doesn't appear to support it, I'm trying to work around it with plain if
:
nnoremap <CR> :<C-U>if v:count|exe ':' v:count|else|norm! l|endif<CR>
This works fine until it doesn't: traversing into a directory works fine, whereas jumping to the n-th file seems to work, too, but just once. After that, bindings stop working altogether and I have to kill vifm via C-Z.
Is this a vifm
bug? Can I work around it?