# HG changeset patch # User Tomas Zeman # Date 1304570985 -7200 # Node ID 28f1b26621eb31a86814d2bd36247a90469d1968 # Parent 689760d614d396325e2bed00685d9dcfef85e875 vim: INI file syntax diff -r 689760d614d3 -r 28f1b26621eb config/.vim/filetype.vim --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/config/.vim/filetype.vim Thu May 05 06:49:45 2011 +0200 @@ -0,0 +1,5 @@ +" TXT files - default width +au BufNewFile,BufRead *.txt set tw=78 + +" INI file syntax +au BufNewFile,BufRead *.ini,*/.hgrc,*/.hg/hgrc setf ini diff -r 689760d614d3 -r 28f1b26621eb config/.vim/syntax/ini.vim --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/config/.vim/syntax/ini.vim Thu May 05 06:49:45 2011 +0200 @@ -0,0 +1,27 @@ +" Vim syntax file +" Language: Vim 7.2 script +" Filenames: *.ini, .hgrc, */.hg/hgrc +" Maintainer: Peter Hosey +" Last Change: Nov 11, 2008 +" Version: 7.2-02 + +" Quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +syn match iniSection skipwhite contains=iniRule "^\[.\+\]$" + +syn match iniRule "^[^=:]\{-1,}=" +syn match iniRule "^[^:=]\{-1,}:" + +syn match iniComment skipwhite "^[#;].*" + +" Highlighting Settings +" ==================== + +hi def link iniSection Keyword +hi def link iniRule Identifier +hi def link iniComment Comment + +let b:current_syntax = "ini"