Welcome to Vifm Q&A, where you can ask questions about using Vifm. Registration is optional, anonymous posts are moderated. E-mail and GitHub logins are enabled.
0 votes
in vifm by
edited by

How can I expand a macro when using the :bmark command?
e.g.

nmap B :bmark %c %c:h

The goal is to write a shortcut where I can add a bookmark and expand it's path as the tag argument.

Desired end result looks like this:

https://0x0.st/KHPt.png

I don't know how I was able to do this before.

Thanks

2 Answers

+1 vote
by
selected by
 
Best answer

If I understood you correctly:

nnoremap <silent> B :execute 'bmark!' '%c' expand('%c')<cr>
by

Thank you! that's exactly it!

So as a general rule, I'll be looking to the execute command when the help file doesn't explicitly mention macro expansion

0 votes
by

Think I found my answer with :bmark!

by

yeah no. the tags don't expand, only the paths do

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