From 11b366dcf5c55074653940dded1cd9d09a0ff050 Mon Sep 17 00:00:00 2001 From: katherine Date: Tue, 28 Mar 2017 19:31:35 -0700 Subject: clean up .vimrc filetype handling --- .vimrc | 32 ++++++++++---------------------- 1 file changed, 10 insertions(+), 22 deletions(-) (limited to '.vimrc') diff --git a/.vimrc b/.vimrc index 02cad08..650fb7f 100644 --- a/.vimrc +++ b/.vimrc @@ -20,7 +20,6 @@ Plugin 'luisjure/csound' Plugin 'elixir-lang/vim-elixir' Plugin 'plasticboy/vim-markdown' Plugin 'shmibs/mips.vim' -Plugin 'zah/nim.vim' Plugin 'wlangstroth/vim-racket' Plugin 'rust-lang/rust.vim' Plugin 'cakebaker/scss-syntax.vim' @@ -226,7 +225,7 @@ autocmd BufNewFile,BufRead *.mips set filetype=mips "the FileTypes in one dict (mostly because i have no idea what i'm "doing with viml), so separate lines it is. autocmd FileType asm call Settings_asm() -autocmd FileType bash call Settings_script() +autocmd FileType bash call Settings_shell() autocmd FileType c call Settings_c() autocmd FileType coffee call Settings_coffee() autocmd FileType conf call Settings_conf() @@ -242,7 +241,6 @@ autocmd FileType make call Settings_script() autocmd FileType matlab call Settings_matlab() autocmd FileType mips call Settings_mips() autocmd FileType mkd call Settings_text() -autocmd FileType nim call Settings_nim() autocmd FileType perl call Settings_script() autocmd FileType php call Settings_html() autocmd FileType python call Settings_script() @@ -252,7 +250,7 @@ autocmd FileType scss call Settings_css() autocmd FileType sh call Settings_script() autocmd FileType text call Settings_text() autocmd FileType vim call Settings_vim() -autocmd FileType zsh call Settings_script() +autocmd FileType zsh call Settings_shell() function! Settings_asm() "settings @@ -270,7 +268,7 @@ function! Settings_c() "mappings "note: these mappings are in weird reverse order to avoid opening folds nnoremap -- O*/hhi/* - inoremap { }i{O + inoremap { }i{O endfunction function! Settings_coffee() @@ -344,21 +342,6 @@ function! Settings_mips() nnoremap -- O# endfunction -function! Settings_nim() - call Settings_script() - function! JumpToDef() - if exists("*GotoDefinition_" . &filetype) - call GotoDefinition_{&filetype}() - else - execute "norm! " - endif - endfunction - "mappings - nnoremap :call JumpToDef() - inoremap :call JumpToDef()i - nnoremap -_ O## -endfunction - function! Settings_script() "settings setlocal shiftwidth=4 @@ -370,8 +353,8 @@ endfunction function! Settings_ruby() call Settings_script() - nnoremap r :execute "silent w !sonic_pi" - nnoremap s :execute "silent !sonic_pi stop" + nnoremap r :execute "silent w !sonic_pi" + nnoremap s :execute "silent !sonic_pi stop" endfunction function! Settings_rust() @@ -379,6 +362,11 @@ function! Settings_rust() nnoremap -_ O/// endfunction +function! Settings_shell() + call Settings_script() + inoremap { }i{O +endfunction + function! Settings_tex() "settings setlocal noautoindent -- cgit v1.2.3