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?
Vi and Vim Stack Exchange is a question and answer site for people using the vi and Vim families of text editors. It only takes a minute to sign up.
Sign up to join this communityAdd 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
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.)