I've used Go with the default setting of eight spaces per tab for a long
time but the lines do indeed get very long. So permit using a modeline
to switch back to four spaces per tab.
endif
" Settings for securemodelines.
endif
" Settings for securemodelines.
- " Only allow items I need (also includes spl which is not enabled by
- " default).
+ " Only allow items I need
if v:version >= 700 " need lists
let g:secure_modelines_allowed_items = ['ft', 'spl', 'fdm',
if v:version >= 700 " need lists
let g:secure_modelines_allowed_items = ['ft', 'spl', 'fdm',
+ \ 'ts', 'sw', 'sts', 'noet']
endif
" Settings for gnupg.
endif
" Settings for gnupg.
autocmd FileType vimperator setlocal commentstring=\"%s
" Use TeX compiler for (La)TeX files.
autocmd FileType tex compiler tex
autocmd FileType vimperator setlocal commentstring=\"%s
" Use TeX compiler for (La)TeX files.
autocmd FileType tex compiler tex
-" Go always uses tabs for indentation.
- autocmd FileType go call <SID>UseTabs()
+" Go always uses tabs for indentation; use BufRead so modelines can overwrite
+" settings like 'tabstop'
+ autocmd BufRead,StdinReadPost *.go call <SID>UseTabs()