made indent work again

This commit is contained in:
dave 2008-11-15 18:50:32 -06:00
parent 2e78d040e7
commit 0639cab258

12
vimrc
View file

@ -70,17 +70,17 @@ if has('eval')
let g:detectindent_preferred_indent = 4 let g:detectindent_preferred_indent = 4
endif endif
fun! DetectDetectIndent() fun! <SID>DetectDetectIndent()
try try
call DetectIndent() :DetectIndent
catch catch
endtry endtry
endfun endfun
if has('autocmd') if has('autocmd')
autocmd BufEnter * :call WideFold() autocmd BufEnter * :call WideFold()
if exists("*DetectIndent") if has('eval')
autocmd BufReadPost * :call DetectIndent() autocmd BufReadPost * :call s:DetectDetectIndent()
endif endif
endif endif
@ -122,7 +122,6 @@ if has('eval')
endtry endtry
endwhile endwhile
endfun endfun
endif
if has("gui_running") if has("gui_running")
set background=light " We use a light background here set background=light " We use a light background here
@ -137,6 +136,7 @@ else
set background=dark " We use a dark background here set background=dark " We use a dark background here
call LoadColorScheme("zellner") " Set the colorscheme call LoadColorScheme("zellner") " Set the colorscheme
endif endif
endif
" Show trailing whitespace visually " Show trailing whitespace visually
" Shamelessly stolen from Ciaran McCreesh <ciaranm@gentoo.org> " Shamelessly stolen from Ciaran McCreesh <ciaranm@gentoo.org>
@ -218,6 +218,7 @@ nmap <C-]> :call GoDefinition()<CR>
if has('autocmd') if has('autocmd')
" Shortcuts " Shortcuts
if has('eval')
fun! <SID>cabbrev() fun! <SID>cabbrev()
iab #i #include iab #i #include
iab #I #include iab #I #include
@ -230,6 +231,7 @@ if has('autocmd')
endfun endfun
autocmd FileType c,cpp :call <SID>cabbrev() autocmd FileType c,cpp :call <SID>cabbrev()
endif
" make tab reindent in normal mode " make tab reindent in normal mode
autocmd FileType c,cpp,cs,java nmap <Tab> =0<CR> autocmd FileType c,cpp,cs,java nmap <Tab> =0<CR>