Changing licensing
[dotfiles] / .vimrc
diff --git a/.vimrc b/.vimrc
index 5aa1f56..af5c4d6 100644 (file)
--- a/.vimrc
+++ b/.vimrc
@@ -11,6 +11,9 @@ set wildignore=*.swp,*.bak,*.pyc,*.class,*.o,*.exe
 " Set filetype stuff to on.
 filetype on
 filetype plugin on
+
+" Set up autoindentation.
+set smartindent
 filetype indent on
 
 " Example filetype-specific setting:
@@ -18,6 +21,11 @@ filetype indent on
 "     autocmd filetype python set expandtab
 " endif
 
+" Allow folding.
+set foldenable
+set foldmethod=syntax
+set foldlevelstart=99
+
 " Show line numbers.
 set number
 set numberwidth=4
@@ -28,16 +36,18 @@ set scrolloff=5
 " Turn off error bells and visual bell
 set noeb vb t_vb=
 
-" Set up autoindentation.
-set smartindent
-filetype indent on
-
 " Set tabs to width 4.
+filetype plugin indent on
+set shiftwidth=4
 set softtabstop=4
 set tabstop=4
-set shiftwidth=4
 set expandtab
 
+" language-specific settings
+autocmd FileType html       setlocal shiftwidth=2 softtabstop=2 tabstop=2
+autocmd FileType javascript setlocal shiftwidth=2 softtabstop=2 tabstop=2
+autocmd FileType ruby       setlocal shiftwidth=2 softtabstop=2 tabstop=2
+
 " Allow backspacing over everything in insert mode.
 set backspace=indent,eol,start
 
@@ -51,9 +61,6 @@ augroup Spacing
     autocmd FileType help,make match BadSpacing /  *$/
 augroup END
 
-" Highlight search terms.
-set hlsearch
-
 " Search as you type.
 set incsearch