When I run mvim . it opens NERDTree but doesnt open a new file/buffer.
-
How might I accomplish this? Ideally when you type
mvim .from terminal it would open MacVim, close NERDtree, and open a new buffer -
I’m not sure if this is possible but is there a way that if I run
mvim .from the command line multiple times it wouldn’t open vim in a new window each time?
1.You are asking it to open your directory viewer, right? If not, why do you start vim passing the current directory (
.) as argument? Leave it off and it will start with an empty buffer.2.Take a look in the vim manual (
man vim). You probably want the--remote-silentoption.I personally use this so often that I’ve created an alias for it in my .profile: