aboutsummaryrefslogtreecommitdiffstats
path: root/vimrc
diff options
context:
space:
mode:
authorTeddy Wing2014-11-12 22:50:25 -0500
committerTeddy Wing2014-11-12 22:54:48 -0500
commitcde8cf577babc5675909dc61c2f2e9eb0eaee8b4 (patch)
tree8b91b6bdb89b8c89566779caa65ff803617f6ed5 /vimrc
parent21badfd2f11d8f259c803f396f8d95de52439983 (diff)
downloaddotvim-cde8cf577babc5675909dc61c2f2e9eb0eaee8b4.tar.bz2
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.
Diffstat (limited to 'vimrc')
-rw-r--r--vimrc7
1 files changed, 7 insertions, 0 deletions
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//