Add imperative cspell dictionary and views
- Vim views allow us to stay in the same place
- A cspell imperative dictionary lets us add words without having to rebuild
diff --git a/modules/neovim/binds/binds.vim b/modules/neovim/binds/binds.vim
index e9aeec5..85e8886 100644
--- a/modules/neovim/binds/binds.vim
+++ b/modules/neovim/binds/binds.vim
@@ -35,6 +35,7 @@
command W w
command Wq wq
call SetupCommandAlias("git","Git")
+call SetupCommandAlias("rg","Rg")
set ignorecase
set smartcase
@@ -43,3 +44,16 @@
let g:cursorhold_updatetime = 1000
autocmd CursorHoldI,CursorHold,BufLeave ?* silent! update
+
+set viewoptions-=options
+autocmd BufWinLeave ?* silent! mkview!
+
+function! s:loadViewOrUnfold()
+ try
+ loadview
+ catch
+ folddoclosed foldopen
+ endtry
+endfunction
+
+autocmd BufWinEnter ?* call s:loadViewOrUnfold()