Basierend auf Daniel Fischer’s Artikel habe ich hier dokumentiert wie ich von TextMate nach Jahren auf MacVIM umgestiegen bin. Das hat den Vorteil für mich, dass ich nur noch einen Texteditor verwende, egal ob ich auf Linux oder auf Mac OS X arbeite.
MacVim installieren
- MacVim von https://github.com/b4winckler/macvim/ (latest snapshot) runterladen
- MacVim.app in /Applications kopieren
- mvim in den Pfad kopieren (zu finden im entpackten MacVim-snapshot-xx Ordner mittels Terminal):
$ sudo mv mvim /usr/local/bin/
Install git
- download the lastest git build from http://code.google.com/p/git-osx-installer/
- open the image
- install git
Install Carlhuda’s vim Distribution
$ for i in ~/.vim ~/.vimrc ~/.gvimrc; do [ -e $i ] && mv $i $i.old; done
$ git clone git://github.com/carlhuda/janus.git ~/.vim
$ cd ~/.vim
$ rake
macVim tunen
Syntax Highlight für Actionscript
- runterladen von http://www.vim.org/scripts/script.php?script_id=1061
- actionscript.vim nach ~/.vim/syntax/ kopieren
- folgende Zeilen in ~/.vim/gvimrc und ~/.vim/vimrc hinzufügen:
" overwrite actionscript .as file detection
au BufRead,BufNewFile *.as set ft=actionscript
Farbschema auswählen
im gvimrc bzw vimrc nach einer Zeile die “color molokai” enthält suchen und mit folgender Zeile ersetzen:
color candycode
Taglists (zeigt Variablen, Funktionen in einem Fenster an)
Leider ist die ctags Version die in Mac OS X installiert ist zu alt und wir müssen eine aktuelle Version selbst runterladen und installieren:
$ curl -O http://prdownloads.sourceforge.net/ctags/ctags-5.8.tar.gz
$ tar xzvf ctags-5.8.tar.gz
$ cd ctags-5.8
$ ./configure
$ make
$ make install
Nun das Tag List Vim Plugin runterladen http://www.vim.org/scripts/script.php?script_id=273 und im gvimrc bzw. vimrc folgende Zeilen hinzufügen:
" Select the exuberant ctags (had to be downloaded and installed!)
let Tlist_Ctags_Cmd = '/usr/local/bin/ctags'
" configure Tag List
let Tlist_Show_One_File = 1
let Tlist_Use_Right_Window = 1
let Tlist_WinWidth = 40
Das Plugin lässt sich über :TlistToggle im VIM aktivieren.
Links
Based on Daniel Fischer’s article i document how i switched to Vim from TextMate after using TextMate for several years.
Install MacVim
- download from https://github.com/b4winckler/macvim/ (use latest snapshot)
- copy MacVim.app to your /Applications directory
- copy mvim into your path, change into the unzipped downloaded MacVim-snapshot-xx folder in your Terminal and enter:
$ sudo mv mvim /usr/local/bin/
Install git
- download the lastest git build from http://code.google.com/p/git-osx-installer/
- open the image
- install git
Install Carlhuda’s vim Distribution
$ for i in ~/.vim ~/.vimrc ~/.gvimrc; do [ -e $i ] && mv $i $i.old; done
$ git clone git://github.com/carlhuda/janus.git ~/.vim
$ cd ~/.vim
$ rake
Pimp macVim
syntax highlight file for actionscript
- get it from http://www.vim.org/scripts/script.php?script_id=1061
- copy actionscript.vim to ~/.vim/syntax/
- add this line to ~/.vim/gvimrc and ~/.vim/vimrc
" overwrite actionscript .as file detection
au BufRead,BufNewFile *.as set ft=actionscript
choose a default color theme
search for a line containing color molokai and replace it with
color candycode
Taglists (displays variables, functions, …)
Unfortunately the ctags needed for the TagList vim plugin which comes preinstalled with Mac OS X doesn’t work because it’s too old. Therefore we need to build it ourselves:
$ curl -O http://prdownloads.sourceforge.net/ctags/ctags-5.8.tar.gz
$ tar xzvf ctags-5.8.tar.gz
$ cd ctags-5.8
$ ./configure
$ make
$ make install
Now download and install the Tag List vim plugin from here: http://www.vim.org/scripts/script.php?script_id=273
Edit your .vimrc file:
" Select the exuberant ctags (had to be downloaded and installed!)
let Tlist_Ctags_Cmd = '/usr/local/bin/ctags'
" configure Tag List
let Tlist_Show_One_File = 1
let Tlist_Use_Right_Window = 1
let Tlist_WinWidth = 40
use the tag list plugin by typing :TlistToggle in your VIM