❯ Guillaume Laforge

Also back to vi... MacVim actually

Some of my friends are going back to vi like me, for instance Hibernate’s Emmanuel and IzPack’s Julien. I also mentioned a few good links about that move on the French Les Castcodeurs podcast. And to be precise, I’m using MacVim on my MacBook Pro laptop, but also vim on the command-line.

Emmanuel and Julien gave some good tips and links too, and like Julien, I’m going to show you my current .vimrc in case anyone’s interested:

let mapleader = ","
let g:mapleader=","

if has("gui_running")
   color solarized
endif

set background=dark

set number

set expandtab
set shiftwidth=4
set tabstop=4
set smarttab

set ai "Auto indent
set si "Smart indent

set ruler

set hlsearch

set nocompatible

set bs=2

set autoread

set so=7

filetype on
filetype indent on
filetype plugin on

set guifont=Inconsolata:h16

autocmd! bufwritepost .vimrc source ~/.vimrc

syntax enable

au BufNewFile,BufRead *.gradle set filetype=groovy

function! RunGroovy()
    let gfname=@%
    botright new
    setlocal buftype=nofile bufhidden=wipe nobuflisted noswapfile nowrap
    let gtmpf = tempname()
    let gcmd = ':!groovy ' . gfname . ' > ' . gtmpf
    silent execute gcmd
    silent execute '0r ' . gtmpf
endfunction

map   :call RunGroovy()
nmap @ :NERDTree