From 32545b5cb0ea021fed466047d67b7c23cfaa86b6 Mon Sep 17 00:00:00 2001 From: Hektor Misplon Date: Sat, 29 Apr 2023 17:45:05 +0200 Subject: [PATCH] Auto cd into wiki --- .vim/after/plugin/wiki.vim | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .vim/after/plugin/wiki.vim diff --git a/.vim/after/plugin/wiki.vim b/.vim/after/plugin/wiki.vim new file mode 100644 index 0000000..11b8352 --- /dev/null +++ b/.vim/after/plugin/wiki.vim @@ -0,0 +1,5 @@ +" " Change local buffer to directory of current file after the plugin has loaded +autocmd VimEnter * lcd %:p:h + +" " Override wiki index mapping to also cd into the wiki +nm ww (wiki-index) \| :lcd %:p:h