~ mkfs
/.vim_dev.rc
Vim config file with developer-friendly options (e.g. mark lines longer than 80 characters as errors). Be sure to note the dependencies that must be downloaded and installed for proper support of Python, Rails, C, Git. Sourced by ~mkfs/.vimrc
" ------------------------------------------------------------
" .vim_dev.rc : Vim config file for dev workstations
" vim: set filetype=vim : (vim modeline for syntax highlighting)
" Author: _m (http://eccentrix.com/misc/mammon)
" ------------------------------------------------------------
set showmatch " show matching paren/quote/brace
set virtualedit=block " cursor goes anywhere only in Visual mode
set wrap " wrap long lines
set foldmethod=syntax " Syntax plugin determines folds
set foldlevel=100 " Open all folds by default
" Version control (GIT)
" Requires syntax and filetype plugins from
" http://blog.madism.org/index.php/2006/10/17/109-vim-mode-for-git-commits
let git_diff_spawn_mode=1
autocmd BufNewFile,BufRead COMMIT_EDITMSG set filetype=git
autocmd FileType git set foldmethod=diff
autocmd FileType git set foldlevel=1
" Abbreviations for expanding to 70-char ASCII lines
iab --- ----------------------------------------------------------------------
iab ___ ______________________________________________________________________
" Abbreviations for automatically closing parens and braces
iab { {<CR>}<Up><End>
iab ( ()<Left>
" Auto/Omnicompletion for various programming languages
autocmd FileType python set omnifunc=pythoncomplete#Complete
autocmd FileType javascript set omnifunc=javascriptcomplete#CompleteJS
autocmd FileType html set omnifunc=htmlcomplete#CompleteTags
autocmd FileType css set omnifunc=csscomplete#CompleteCSS
autocmd FileType xml set omnifunc=xmlcomplete#CompleteTags
autocmd FileType php set omnifunc=phpcomplete#CompletePHP
autocmd FileType c set omnifunc=ccomplete#Complete
" FileType settings for various languages
" Python
" Download and install to ~/.vim the following:
" http://vim.sourceforge.net/scripts/script.php?script_id=790
" http://vim.sourceforge.net/scripts/script.php?script_id=1542
" http://www.vim.org/scripts/script.php?script_id=974
autocmd FileType python set tabstop=4
autocmd FileType python set softtabstop=4
autocmd FileType python set shiftwidth=4
autocmd FileType python set expandtab
autocmd FileType python set smarttab
autocmd FileType python set autoindent
autocmd FileType python set smartindent
autocmd FileType python set textwidth=80
autocmd FileType python set formatoptions+=l
autocmd FileType python match ErrorMsg /\%>80v.\+/ " Mark lines > 80 chars
" The Python syntax plugin does not provide fold markers
autocmd FileType python set foldmethod=indent
" Ruby
" Download and install to ~/.vim the following:
" http://www.vim.org/scripts/script.php?script_id=1567
autocmd FileType ruby set tabstop=2
autocmd FileType ruby set shiftwidth=2
autocmd FileType ruby set expandtab
autocmd FileType ruby set softtabstop=2
" C/C++
" Download and install to ~/.vim the following:
" http://vim.sourceforge.net/scripts/script.php?script_id=213
autocmd FileType c,cpp set noexpandtab
autocmd FileType c,cpp set tabstop=8
autocmd FileType c,cpp set shiftwidth=8
autocmd FileType c,cpp set smarttab
autocmd FileType c,cpp set cindent
autocmd FileType c,cpp set autoindent
autocmd FileType c,cpp set textwidth=80
autocmd FileType c,cpp set formatoptions+=l
autocmd FileType c,cpp match ErrorMsg /\%>80v.\+/ " Mark lines > 80 chars
" Make
autocmd FileType make set noexpandtab
autocmd FileType make set shiftwidth=8