From 2171925199d09b88952d140e095155f3e4045927 Mon Sep 17 00:00:00 2001 From: shmibs Date: Thu, 23 Jan 2014 19:50:56 -0700 Subject: added filetype-based options to vimrc --- .vimrc | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to '.vimrc') diff --git a/.vimrc b/.vimrc index 31deab6..2b1863f 100644 --- a/.vimrc +++ b/.vimrc @@ -1,6 +1,6 @@ syntax on filetype plugin on -set cindent +set autoindent "tab controls to match pentadactyl map :tabn @@ -32,3 +32,16 @@ if &term != "linux" xnoremap p (v:register ==# '"' ? '"+' : '') . 'p' xnoremap P (v:register ==# '"' ? '"+' : '') . 'P' end + +"filetype-specific settings. i can't figure out how to stick all the +"FileTypes in one list (mostly because i have no idea what i'm doing +"with viml), so separate lines it is. +autocmd FileType c call Settings_c() +autocmd FileType cpp call Settings_c() + +function! Settings_c() + "i want autoindent as the default, and doing that along with + "filetype indent on yields wonky results + setlocal cindent +endfunction + -- cgit v1.2.3