Jeremy Conlin wrote:
I have noticed when I open a Vim session, my formatoptions and
textwidth variables are reset to the default even though I have the
following lines in my .vimrc file:
set linebreak
set textwidth=80
set formatoptions=ncroqt
Does opening a session prevent Vim from looking at ~/.vimrc?
[...]
Opening a session _overrides_ the vimrc by setting all settings mentioned in
the session after the vimrc has been sourced: according to ":help startup",
the vimrc is sourced at step 3, while (-S and) -c arguments are processed at
step 12 (the fact that -S is treated as a variant of -c is mentioned under
":help -S" in the same helpfile).
I suppose you may edit your session file manually to remove the 'nolinebreak',
'textwidth' and 'fo' settings.
Best regards,
Tony.
--
We have met the enemy, and he is us.
-- Walt Kelly