1. How to set the default vertical split screen when opening multiple files?
It can only be realized now, with the default horizontal split screen.
2. How to set syntax highlighting to be supported when Macvim is turned on?
Now open a blank, save it as XXX.cpp, and then reopen it to support highlighting.
This is vim’s problem and has nothing to do with Mac
vim -o file1 file2
Andvim -O file1 file2
When vim is opened, it is directly divided horizontally and vertically, or -o and -O are followed by digital parameters to indicate the number of desired divided screens. Of course, gvim or mvim parameters are the same. If vim is already turned on, use:split
And:vsplit
Separately divide the screen horizontally and vertically.If you are an unsaved file and want to force highlighting with the syntax of a language, use the command
:set syntax=XXX
, for example:set syntax=cpp
,:set syntax=off
Can be closed