From b7c2587cb4079c03197eb1713083401439ed9187 Mon Sep 17 00:00:00 2001 From: Nicole Tietz-Sokolskaya Date: Wed, 28 Sep 2022 09:16:38 -0400 Subject: [PATCH] Better vim resuming --- bash/.bashrc | 8 ++++++++ nvim/.config/nvim/init.vim | 3 --- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/bash/.bashrc b/bash/.bashrc index 193ce7a..7fdc779 100644 --- a/bash/.bashrc +++ b/bash/.bashrc @@ -42,6 +42,14 @@ fi alias vim="nvim" +function vim-resume { + if test -f "Session.vim"; then + vim -S Session.vim + else + vim -c "Obsession" + fi +} + # enable programmable completion features if ! shopt -oq posix; then if [ -f /usr/share/bash-completion/bash_completion ]; then diff --git a/nvim/.config/nvim/init.vim b/nvim/.config/nvim/init.vim index 2e87a9b..1ed9313 100644 --- a/nvim/.config/nvim/init.vim +++ b/nvim/.config/nvim/init.vim @@ -11,9 +11,6 @@ map :NERDTreeToggle map :Files map :Rg -" Automatically start Obsession if we open a Session file -autocmd VimEnter * if !empty(v:this_session) && ObsessionStatus('on', 'off') == 'off' | Obsession | endif - " Disable mouse input set mouse=