New answers tagged

0

My crude solution is to test whether glob finds any files and otherwise just to open the expression previously passed to glob. There is probably a more elegant way to do this. fun! OpenMultipleTabs(pattern_list) for p in a:pattern_list let gl = glob(l:p, 0, 1) if empty(gl) let gl = [ l:p ] endif for c in gl ...


2

:argdo @d doesn’t act like executing @d in every buffer in the arg list: it instead runs :@d in each buffer. It doesn’t execute the contents of the d register as a macro: it executes them as an Ex command. See :help argdo and :help :@. Try :argdo norm!@d instead.


Top 50 recent answers are included