How to open macvim in terminal

1. Download the macvim package from gethub and unzip it. This package contains three files: MacVim, mvim and README.txt. The download address is: https://github.com/b4winckler/macvim/downloads
2. Copy macvim Enter the application
3. Edit the mvim file,
   add
    tabs=true
at the head of the    file and find # Last step: fire up vim. at the bottom of the file, and replace the following if block with:
  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

4. Copy the mvim file to the /usr/bin directory
   $sudo cp -f mvim /usr/bin/

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=327060555&siteId=291194637