diff options
author | Cody Hiar <codyfh@gmail.com> | 2018-06-11 11:52:27 -0600 |
---|---|---|
committer | Cody Hiar <codyfh@gmail.com> | 2018-06-11 11:52:27 -0600 |
commit | ca6aaafb0b1ccf3b0c5bb1ccb2f811498b701cc0 (patch) | |
tree | 634f784b8ebbd6413e50f10b2d791a30648faae4 /plugin/vim-options.vim | |
parent | 98105e44edcdd3e0282c253fbb7b5eeab292559b (diff) |
Add session save/restore. fzf buffers jumps instead of opening
Diffstat (limited to 'plugin/vim-options.vim')
-rw-r--r-- | plugin/vim-options.vim | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/plugin/vim-options.vim b/plugin/vim-options.vim index 6f0634b..893d10d 100644 --- a/plugin/vim-options.vim +++ b/plugin/vim-options.vim @@ -16,6 +16,8 @@ set splitbelow " New windows split below the current one set completeopt-=preview " Hide the preview/scratch window set path=** " Allow commands like 'gf' to find files set wildignore=*/app/cache,*/vendor,*/env,*.pyc,*/venv,*/__pycache__,*/venv " Ignore folders +set sessionoptions+=globals " Append global variables to the default session options (Window Names) + " Custom status line set statusline= @@ -104,6 +106,13 @@ noremap <c-w>f <c-w>f<c-w>H noremap <c-w>] <c-w>v<c-]><c-w>H " Run isort on file noremap <leader>ei :!isort %<CR> +" Session saving +function! SaveSession() + :mksession! $SessionDir/session.vim + :echo 'Session Saved!' +endfunction +nnoremap <leader>ess :call SaveSession()<CR> +nnoremap <leader>esr :source $SessionDir/session.vim<CR> @@ -173,6 +182,8 @@ if !empty(glob($EditorDir.'plugged/fzf.vim/plugin/fzf.vim')) nnoremap <leader>fg :GFiles?<CR> " Enable C-N and C-P to go backwards in history let g:fzf_history_dir = $HOME.'.local/share/fzf-history' + " [Buffers] Jump to the existing window if possible + let g:fzf_buffers_jump = 1 endif "----------------------------------------------------------------------------------------------------------------------- |