1

For opening the index page of my Vimwiki instance, I have the following alias in my ~/.bashrc:

alias vimwiki='vim -c VimwikiIndex'

But how to open a specific Vimwiki page right from a command prompt?

1

Add a function like this to you ~/.bashrc:

function vimwikipage() {
  vim -c "VimwikiIndex" -c "VimwikiGoto $1"
}

Now, you can open/create a specific Vimwiki page like this:

$ vimwikipage ExampleVimwikiPage

Explanation

This command would be essentially equivalent to the following sequence of actions:

$ vim
\ww
:VimwikiGoto ExampleVimwikiPage

(I assume that VimwikiIndex is mapped to \ww, which is a default Vimwiki mapping.)

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.