I'm guessing here but it seems you are trying to run normal mode mappings in batch mode (IOW, vim -c <cmd>
). Your 2wi
... I'm assuming that refers to [count]<Leader>wi
, a VimWiki mapped command in the docs...?
To run such mappings you need to use the norm
command (:h :norm
).
For example, vim -c 'norm 2\wi'
if your Leader key is the default \
(backslash).
BTW, if you want to run multiple commands using this method just use a separate -c
for each. Example:
vim -c 'norm 2\wi' -c 'wq'