zk: Move nvim wiki index opening to zk module
While technically invoking nvim, it belongs more into the zk module since it is only to be added if zk exists.
This commit is contained in:
parent
fd01c8aac2
commit
083ef0a6ad
2 changed files with 7 additions and 3 deletions
|
@ -5,8 +5,5 @@ 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\")()" +"edit ~/documents/notes/index.md"'
|
||||
alias vs='nvim +"lua require \"personal.scratchpad\".create()"'
|
||||
fi
|
||||
|
|
|
@ -8,3 +8,10 @@ n() {
|
|||
zk "${@}"
|
||||
fi
|
||||
}
|
||||
|
||||
# open notes with my vim zettelkasten plugin
|
||||
# TODO better implementation conditional on zk.nvim & zettelkasten existing
|
||||
# nvim +'lua pcall(require "zk.commands"') --headless +qa 2>&1 or similar to check - but slow
|
||||
if command -v nvim >/dev/null 2>&1; then
|
||||
alias ni='nvim +"lua require \"zk.commands\".get(\"ZkCd\")()" +"edit $WIKIROOT/index.md"'
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue