I would like to put something into my vimrc so that if I open 2 files they automatically open in separate split windows. I don’t want to start it with -o because I sometimes open a lot of files at once and having 15+ splits would not work very good. so I would like some logic that checks how many files were open and if it is 2 to put each one into its own split window.
Thanks
PS I will most likely use this most often to view the .cc and .hh files of a c++ project.
The simplest way would be to add
to your .vimrc.