Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

No syntax highlighting after Vim session restore in Terminal

Tags:

terminal

vim

I'm using this Vim configuration. I save and restore Vim sessions using these 2 commands:

 :mksession! ~/.vim_session
 :source ~/.vim_session                                                                                                                                   

There's no syntax highlighting after I restore a session. How can I fix this?

My Vim version:

VIM - Vi IMproved 7.3.462 (2010 Aug 15, compiled Mar 26 2012 21:45:48)
MacOS X (unix) version
Included patches: 1-462
like image 314
David Xia Avatar asked Nov 05 '22 03:11

David Xia


1 Answers

There is a note at the end of the "Views and Sessions" chapter of the documentation (see the last paragraph of this section). In particular, :syntax on is not restored by the session file.

Does it work if you enter :syntax on manually after loading the session?

like image 180
Prince Goulash Avatar answered Nov 15 '22 13:11

Prince Goulash