wting / gitsessions.vim

Auto save/load vim sessions based on directory and git branch.
MIT License
74 stars 17 forks source link

No syntax highlighting for automatic session loading. #14

Open mrloop opened 8 years ago

mrloop commented 8 years ago

Loading a vim session explicitly with vim -S ~/.vim/sessions/path/to/my/gitsessions/vim/session results in expected syntax highlighting. Loading a vim session automatically with vim results in no syntax highlighting. Reloading the file(s) with :e and I get the syntax highlighting expected.

wting commented 8 years ago

Yeah there was an attempted fix (#12) but that PR broke gitsessions completely. Either the session loaded with syntax highlighting or didn't load at all. I figured that partially loading w/o syntax highlighting was a better alternative than complete breakage.

mrloop commented 8 years ago

Thanks @wting, I'm going to try running the attempted fix #12 and see how it goes. I've usually got 6 to 8 panes open and no syntax highlighting is a show stopper for me.

simonwahlgren commented 8 years ago

I'm using a custom script but I had the same issue when restoring the sessions, this answer solved my problem: http://stackoverflow.com/a/10525050

wting commented 8 years ago

Thanks for the comment @simonwahlgren, but the nested call that fixed the syntax highlighting issue broke session reloading.

cesarizu commented 7 years ago

Just for the record, the fix from #12 fixed the syntax highlighting for me. I think it is because I'm only saving the buffers (set sessionoptions=buffers).