From 3a7a94ed342e91ce8a65b77c217ac9e900ba2bc2 Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Wed, 14 Sep 2022 19:57:15 -0400 Subject: [PATCH] Try out nvim again --- .gitignore | 2 ++ install.sh | 2 +- nvim/.config/nvim/init.vim | 3 +++ nvim/.config/nvim/undo/.gitinclude | 0 vim/.vimrc | 7 ++++++- 5 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 nvim/.config/nvim/init.vim create mode 100644 nvim/.config/nvim/undo/.gitinclude diff --git a/.gitignore b/.gitignore index 74f9734..ee824c8 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,5 @@ zsh/.config/zsh/.zcompdump zsh/.config/zsh/.zsh_history zsh/.config/zsh/.zsh_sessions +vim/.config/vim/undo +nvim/.config/nvim/undo diff --git a/install.sh b/install.sh index ed66f35..6244531 100755 --- a/install.sh +++ b/install.sh @@ -128,7 +128,7 @@ main() { ;; esac - stow alacritty bin git ruby tmux vim zsh + stow alacritty bin git nvim ruby tmux vim zsh } main diff --git a/nvim/.config/nvim/init.vim b/nvim/.config/nvim/init.vim new file mode 100644 index 0000000..0716b3f --- /dev/null +++ b/nvim/.config/nvim/init.vim @@ -0,0 +1,3 @@ +set runtimepath+=~/.vim,~/.vim/after +set packpath+=~/.vim +source ~/.vimrc diff --git a/nvim/.config/nvim/undo/.gitinclude b/nvim/.config/nvim/undo/.gitinclude new file mode 100644 index 0000000..e69de29 diff --git a/vim/.vimrc b/vim/.vimrc index 3aa8b22..31c15ca 100644 --- a/vim/.vimrc +++ b/vim/.vimrc @@ -73,8 +73,13 @@ set shiftround " make >> go to next tab if has('persistent_undo') set undolevels=5000 - set undodir=$HOME/.vim/undo set undofile + + if has('nvim') + set undodir=$HOME/.config/nvim/undo + else + set undodir=$HOME/.vim/undo + endif endif " consistency is key - Y should act like C, D