Closed cvincent closed 4 years ago
Haven't tested but you can probably achieve this with :set sessionoptions+=localoptions
.
Coming back to this a couple years later while reconfiguring my Vim from scratch, I realize that this worked for winfixwidth
but also created a number of issues which had been vexxing me. localoptions
also causes all <buffer>
mappings to be saved to the session, which can wreak all kinds of havoc when, for example, switching plugins in and out or changing your own mappings.
Not looking for a "fix" or solution, I will just live without persisting winfixwidth
for now and wanted to post this here for the benefit of intrepid internet searchers. However, a dirty fix might be to remove all mapping lines from the session file after it's written, just not sure what a relatively clean way to trigger that would be.
On the autocmd User Obsession
event, you could probably readfile(g:this_obsession)
, filter out the lines you don't want, and write it back out.
Thanks, I'll give that a shot!
Is there a way to configure this plugin, or the Vim session functionality it builds upon, to persist
winfixwidth
on my windows? This is the only aspect of my layouts that don't get restored. From my searching, there doesn't seem to be a way to tell Vim what settings to save.