vmiklos.hu
shameless self-promoting website
»Root
»Rejourn root
Posted Tuesday, 19 May 2009 by Miklos
Tags: en hacking

So swig uses two spaces instead of tabs, horrible. But I'll get used to it - just I don't want to fuck up my vimrc just because of their idiotic settings.

Here is the trick:

au BufRead */swig*/* set tabstop=8 | set shiftwidth=2 | set softtabstop=2 | set expandtab " SWIG
au BufRead */swig*/Source/* set tabstop=8 | set shiftwidth=2 | set softtabstop=2 | set noexpandtab " SWIG Source
au BufNewFile,BufRead *.i set filetype=swig
au BufNewFile,BufRead *.swg set filetype=swig

The swig syntax file is here.

Comments