From 5868104f033ebf2ffceb7458baeaa748574ce310 Mon Sep 17 00:00:00 2001 From: shmibs Date: Sun, 29 Jun 2014 10:38:59 -0700 Subject: fixed vim indenting i'm a dankas sometimes... --- .vimrc | 43 ++++++++++++++++++++++++++++++++----------- 1 file changed, 32 insertions(+), 11 deletions(-) (limited to '.vimrc') diff --git a/.vimrc b/.vimrc index 0fc9402..d5cd54f 100644 --- a/.vimrc +++ b/.vimrc @@ -1,5 +1,5 @@ syntax on -filetype plugin on +filetype plugin indent on "set omnifunc=syntaxcomplete#Complete set autoindent @@ -28,10 +28,9 @@ nnoremap :tabn nnoremap :tabp nnoremap sT -"insert lines above and below with (=|+) -"very hackish, but i couldn't think of a better way +"insert lines below +nnoremap ++ == nnoremap = Oaj -nnoremap + oak "folds! nnoremap fo zO @@ -72,44 +71,66 @@ let g:c_no_if0_fold = 1 autocmd FileType asm call Settings_asm() autocmd FileType c call Settings_c() autocmd FileType cpp call Settings_cpp() +autocmd FileType tex call Settings_tex() autocmd FileType haskell call Settings_haskell() autocmd FileType make call Settings_script() autocmd FileType perl call Settings_script() autocmd FileType python call Settings_script() autocmd FileType sh call Settings_script() autocmd FileType vim call Settings_vim() +autocmd FileType zsh call Settings_script() function! Settings_asm() - setlocal cindent + "settings setlocal foldmethod=syntax + "mappings nnoremap -- A; endfunction function! Settings_c() - setlocal cindent + "settings setlocal foldmethod=syntax + "mappings + nnoremap c :!make nnoremap -- O*/hhi/* endfunction function! Settings_cpp() - setlocal cindent + "settings setlocal foldmethod=syntax setlocal shiftwidth=4 setlocal tabstop=4 + "mappings + nnoremap c :!make nnoremap -- O*/hhi/* endfunction function! Settings_haskell() - setlocal smartindent + "settings + "mappings nnoremap -- O-- endfunction function! Settings_script() - setlocal smartindent + "settings + setlocal shiftwidth=4 + setlocal tabstop=4 + "mappings nnoremap -- O# endfunction +function! Settings_tex() + "settings + setlocal shiftwidth=4 + setlocal tabstop=4 + "mappings + nnoremap -- O% + nnoremap c :!latex -output-format=pdf % + nnoremap C :!latex -output-format=pdf % +endfunction + function! Settings_vim() - setlocal smartindent - nnoremap -- A" + "settings + "mappings + nnoremap -- O" endfunction -- cgit v1.2.3