1 " GIMP coding style for vim "
3 " To enable these vim rules for GIMP only, add this command to your vimrc:
4 " autocmd BufNewFile,BufRead /path/to/gimp/*.[ch] source /path/to/gimp/devel-docs/c.vim
6 " Do not use `set exrc` which is a security risk for your system since vim may
7 " be tricked into running shell commands by .vimrc files hidden in malicious
8 " projects (`set secure` won't protect you since it is not taken into account
9 " if the files are owned by you).
13 setlocal cinoptions=>4,n-2,{2,^-2,:2,=2,g0,h2,p5,t0,+2,(0,u0,w1,m1
15 setlocal softtabstop=2
17 setlocal fo-=ro fo+=cql
19 " Tabs are always inserted as spaces.
21 " But if there are tabs already, show them as 8 columns.
24 " Highlight in red trailing whitespaces and tabs everywhere.
25 highlight TrailingWhitespace ctermbg=LightRed guibg=LightRed
26 match TrailingWhitespace /\s\+$/
27 highlight ForbiddenTabs ctermbg=DarkRed guibg=DarkRed
28 2match ForbiddenTabs /\t/