2

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 Answer 1

2

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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