@ Björn Winckler's answer shows how to do this for files opened through search engines and other OS opening mechanisms.
If you want it to work with the mvim command, find the mvim file and change the lines below
if [ "$gui" ]; then
to
if [ "$gui" ]; then
This will cause all files opened from the command line to open in the same window.
Also, if you want the file to open the same buffer if this file is already open instead of splitting or adding a new tab
au VimEnter,BufWinEnter * NERDTreeFind to your gvimrc (so as not to interfere with your regular vim)
(this last part requires the installation of NERDTree)
Will Aug 27 '12 at 16:23 2012-08-27 16:23
source share