mirror of
https://github.com/NaomiAmethyst/dots.git
synced 2025-09-18 21:39:54 +00:00
made indent work again
This commit is contained in:
parent
2e78d040e7
commit
0639cab258
1 changed files with 28 additions and 26 deletions
12
vimrc
12
vimrc
|
@ -70,17 +70,17 @@ if has('eval')
|
|||
let g:detectindent_preferred_indent = 4
|
||||
endif
|
||||
|
||||
fun! DetectDetectIndent()
|
||||
fun! <SID>DetectDetectIndent()
|
||||
try
|
||||
call DetectIndent()
|
||||
:DetectIndent
|
||||
catch
|
||||
endtry
|
||||
endfun
|
||||
|
||||
if has('autocmd')
|
||||
autocmd BufEnter * :call WideFold()
|
||||
if exists("*DetectIndent")
|
||||
autocmd BufReadPost * :call DetectIndent()
|
||||
if has('eval')
|
||||
autocmd BufReadPost * :call s:DetectDetectIndent()
|
||||
endif
|
||||
endif
|
||||
|
||||
|
@ -122,7 +122,6 @@ if has('eval')
|
|||
endtry
|
||||
endwhile
|
||||
endfun
|
||||
endif
|
||||
|
||||
if has("gui_running")
|
||||
set background=light " We use a light background here
|
||||
|
@ -137,6 +136,7 @@ else
|
|||
set background=dark " We use a dark background here
|
||||
call LoadColorScheme("zellner") " Set the colorscheme
|
||||
endif
|
||||
endif
|
||||
|
||||
" Show trailing whitespace visually
|
||||
" Shamelessly stolen from Ciaran McCreesh <ciaranm@gentoo.org>
|
||||
|
@ -218,6 +218,7 @@ nmap <C-]> :call GoDefinition()<CR>
|
|||
|
||||
if has('autocmd')
|
||||
" Shortcuts
|
||||
if has('eval')
|
||||
fun! <SID>cabbrev()
|
||||
iab #i #include
|
||||
iab #I #include
|
||||
|
@ -230,6 +231,7 @@ if has('autocmd')
|
|||
endfun
|
||||
|
||||
autocmd FileType c,cpp :call <SID>cabbrev()
|
||||
endif
|
||||
|
||||
" make tab reindent in normal mode
|
||||
autocmd FileType c,cpp,cs,java nmap <Tab> =0<CR>
|
||||
|
|
Loading…
Add table
Reference in a new issue