nvim: Enter notes dir when calling zettel index
When switching the current buffer to the Zettelkasten index page (`<leader>ni`), we now also switch the working directory to the corresponding notes directory.
This commit is contained in:
parent
20b9d432ac
commit
22b70a0639
3 changed files with 20 additions and 13 deletions
9
nvim/.config/sh/alias.d/neovim.sh
Normal file
9
nvim/.config/sh/alias.d/neovim.sh
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
# v shorthand for neovim
|
||||
if exist nvim; then
|
||||
alias v="nvim"
|
||||
alias vim="nvim"
|
||||
|
||||
# open notes with my vim zettelkasten plugin
|
||||
# TODO better implementation conditional on zk & zettelkasten existing
|
||||
alias vn='nvim +"lua require \"zk.commands\".get(\"ZkCd\")()" +"lua require \"zettelkasten\".index_open()"'
|
||||
fi
|
||||
Loading…
Add table
Add a link
Reference in a new issue