syntax highlighting doesn't work after restore a previous vim session

后端 未结 3 1739
自闭症患者
自闭症患者 2021-02-07 06:22

since dividing and loading each windows every time are kinda bothersome, I saved my session using:

mksession ~/session1.vim

and restored it usi

3条回答
  •  野趣味
    野趣味 (楼主)
    2021-02-07 06:55

    I can across this Issue using the Obsession vim plugin and Neovim aswell. The answer in this thread helped me finding the solution although in my case the solution provided here didn't work immediately.

    I took a look at the sessionoptions help page. For me the setting that fixed the problem was set sessionoptions+=localoptions. Then after reloading vim with this option in the config and after reloading the syntax highlighting, the highlighting was saved in the session.

提交回复
热议问题