Skip to content

Instantly share code, notes, and snippets.

@alfredodeza
Created December 3, 2012 19:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alfredodeza/4197531 to your computer and use it in GitHub Desktop.
Save alfredodeza/4197531 to your computer and use it in GitHub Desktop.
Open tabs with mvim always

The mvim file is usually not writeable, change that:

sudo chmod u+w `which mvim`

Now open it for editing:

sudo vim `which mvim`

Add the following line to the top of the file, below the commented section:

tabs=true

Replace the if structure at the bottom of the file with the following:

Last step: fire up vim:

if [ "$gui" ]; then
  if $tabs && [[ `$binary --serverlist` = "VIM" ]]; then
    exec "$binary" -g $opts --remote-tab-silent ${1:+"$@"}
  else
    exec "$binary" -g $opts ${1:+"$@"}
  fi  
else
  exec "$binary" $opts ${1:+"$@"}
fi  
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment