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
54
vimrc
54
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,20 +122,20 @@ if has('eval')
|
|||
endtry
|
||||
endwhile
|
||||
endfun
|
||||
endif
|
||||
|
||||
if has("gui_running")
|
||||
set background=light " We use a light background here
|
||||
call LoadColorScheme("wombat:desert") " Set the colorscheme
|
||||
elseif &t_Co == 256
|
||||
set background=light " We use a light background here
|
||||
call LoadColorScheme("wombat:inkpot") " Set the colorscheme
|
||||
elseif &t_Co == 88
|
||||
set background=dark " We use a dark background here
|
||||
call LoadColorScheme("inkpot:zellner") " Set the colorscheme
|
||||
else
|
||||
set background=dark " We use a dark background here
|
||||
call LoadColorScheme("zellner") " Set the colorscheme
|
||||
if has("gui_running")
|
||||
set background=light " We use a light background here
|
||||
call LoadColorScheme("wombat:desert") " Set the colorscheme
|
||||
elseif &t_Co == 256
|
||||
set background=light " We use a light background here
|
||||
call LoadColorScheme("wombat:inkpot") " Set the colorscheme
|
||||
elseif &t_Co == 88
|
||||
set background=dark " We use a dark background here
|
||||
call LoadColorScheme("inkpot:zellner") " Set the colorscheme
|
||||
else
|
||||
set background=dark " We use a dark background here
|
||||
call LoadColorScheme("zellner") " Set the colorscheme
|
||||
endif
|
||||
endif
|
||||
|
||||
" Show trailing whitespace visually
|
||||
|
@ -218,18 +218,20 @@ nmap <C-]> :call GoDefinition()<CR>
|
|||
|
||||
if has('autocmd')
|
||||
" Shortcuts
|
||||
fun! <SID>cabbrev()
|
||||
iab #i #include
|
||||
iab #I #include
|
||||
if has('eval')
|
||||
fun! <SID>cabbrev()
|
||||
iab #i #include
|
||||
iab #I #include
|
||||
|
||||
iab #d #define
|
||||
iab #D #define
|
||||
iab #d #define
|
||||
iab #D #define
|
||||
|
||||
iab #e #endif
|
||||
iab #E #endif
|
||||
endfun
|
||||
iab #e #endif
|
||||
iab #E #endif
|
||||
endfun
|
||||
|
||||
autocmd FileType c,cpp :call <SID>cabbrev()
|
||||
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