I am using the above and editing new files using mvim <filename>
. The first time after I installed mvim in the /usr/local/bin directory it seemed to open files in new tabs by default, this behaviour has now stopped.
I would like to know the .vimrc setting to turn it back on or mvim switch that I should use to open files so that they are tabbed instead of opened as new windows.
The .vimrc I am using currently is:
set number
set ruler
"folding settings
set foldmethod=indent "fold based on indent
set foldnestmax=20 "deepest fold is 10 levels
set nofoldenable "dont fold by default
set foldlevel=31 "this is just what i use
set ignorecase
I don't think any of the above should change the behaviour of mvim and the way it opens new files.
I've already read:
MacVim — switch to tab where file is opened if trying to open an already-opened file; and
Use MacVim as standard Terminal?; and I am also in the middle of reading :help mvim
I am sure I have read the answer somewhere, however I cannot remember where and now cannot find it.
Best Answer
use the
--remote-tab
command line switch, as in:The answer was obtained by reading
help:mvim
it is located in section 14 of the help file titled macvim-hints.Extracted here is the relevant section of the MacVim 7.4 help file: