From cde8cf577babc5675909dc61c2f2e9eb0eaee8b4 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Wed, 12 Nov 2014 22:50:25 -0500 Subject: vimrc: set sessionoptions-=options This setting tells vim not to save options & mappings in persisted sessions. This allows open buffers, windows, and tabs to be saved but configuration options and plugins to be different when reopening a session. Useful if I've made modifications to my vimrc after creating a session. Found out about this from https://github.com/xolox/vim-session. Really cool that this exists. It's been something that annoyed me for a while but I never bothered to find a solution. --- vimrc | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'vimrc') diff --git a/vimrc b/vimrc index 544b8eb..a62bd61 100644 --- a/vimrc +++ b/vimrc @@ -258,6 +258,10 @@ " * Add command mode mappings to allow movement forward and backward by " word. OS X Terminal doesn't handle the Shift & Control mappings. " +" 2014.11.12: +" * Set sessionoptions-=options so that options and mappings are not +" saved in vim sessions. +" " Pathogen @@ -305,6 +309,9 @@ set grepprg=ack " Use ack instead of grep set ignorecase " Case insensitive set smartcase " Case insensitive unless an uppercase character is entered +" Don't persist options & mappings in saved sessions +set sessionoptions-=options + " Store swap files in .vim/ directory " http://stackoverflow.com/a/15317146 set backupdir=~/.vim/backup/backup// -- cgit v1.2.3