aboutsummaryrefslogtreecommitdiffstats
path: root/.vimrc
diff options
context:
space:
mode:
authorshmibs <shmibs@gmail.com>2014-01-23 19:50:56 -0700
committershmibs <shmibs@gmail.com>2014-01-23 19:50:56 -0700
commit2171925199d09b88952d140e095155f3e4045927 (patch)
tree7b85352e7409688797c9c3eea218aaeb875b0a70 /.vimrc
parent109744b2114c1966644638a15b1edae40a4290e2 (diff)
downloaddotfiles-2171925199d09b88952d140e095155f3e4045927.tar.gz
added filetype-based options to vimrc
Diffstat (limited to '.vimrc')
-rw-r--r--.vimrc15
1 files changed, 14 insertions, 1 deletions
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 <C-n> <Esc>:tabn<CR>
@@ -32,3 +32,16 @@ if &term != "linux"
xnoremap <expr> p (v:register ==# '"' ? '"+' : '') . 'p'
xnoremap <expr> 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
+