diff options
author | shmibs <shmibs@gmail.com> | 2014-01-23 19:50:56 -0700 |
---|---|---|
committer | shmibs <shmibs@gmail.com> | 2014-01-23 19:50:56 -0700 |
commit | 2171925199d09b88952d140e095155f3e4045927 (patch) | |
tree | 7b85352e7409688797c9c3eea218aaeb875b0a70 /.vimrc | |
parent | 109744b2114c1966644638a15b1edae40a4290e2 (diff) | |
download | dotfiles-2171925199d09b88952d140e095155f3e4045927.tar.gz |
added filetype-based options to vimrc
Diffstat (limited to '.vimrc')
-rw-r--r-- | .vimrc | 15 |
1 files changed, 14 insertions, 1 deletions
@@ -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 + |