Created
January 8, 2014 22:20
-
-
Save mooware/8325507 to your computer and use it in GitHub Desktop.
My .vimrc for work
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set nocompatible | |
syntax on | |
filetype plugin on | |
filetype plugin indent on | |
" by itself, jellybeans doesnt enable 256 colors | |
set t_Co=256 | |
set background=dark | |
colorscheme jellybeans | |
" tabs and indentation | |
set autoindent | |
set expandtab | |
set smarttab | |
set tabstop=2 | |
set softtabstop=2 | |
set shiftwidth=2 | |
" no line wrapping | |
set nowrap | |
" don't complain about unsaved files when another file is opened | |
set hidden | |
" line numbers | |
set number | |
" show position in status bar | |
set ruler | |
" current line highlighted | |
set cursorline | |
" nice characters for 'set list' | |
set listchars=tab:» ,eol:¶,trail:· | |
" nice list for command autocompletion | |
set wildmenu | |
set showcmd | |
set showmatch | |
" incremental and highlighted search | |
set incsearch | |
set hlsearch | |
" backspace can delete line endings | |
set backspace=2 | |
" dont litter every dir with backup or swap files | |
set backupdir=~/.vim/backup | |
set directory=~/.vim/tmp | |
" longer command history | |
set history=10000 | |
" persistent undo | |
set undodir=~/.vim/undodir | |
set undofile | |
set undolevels=100000 "maximum number of changes that can be undone | |
set undoreload=10000 "maximum number lines to save for undo on a buffer reload | |
" use gmk for :make | |
set makeprg=gmk | |
" avoid parsing "[ yyyy-mm-dd hh:mm:ss ]" as quickfix item | |
set errorformat-=%f:%l:%m | |
" add all PLF source folders to the path | |
command! -nargs=1 -complete=dir PLFsetpath call PLF_AddToPath(<f-args>) | set path? | |
" find PLF source code folders | |
function! PLF_FindFolders(basedir) | |
let l:marker = "__build.l4m" | |
let l:path = resolve(expand(a:basedir)) | |
let l:result = split(glob(path . "/**/" . marker), "\n") | |
return map(result, 'v:val[0:-' . (strlen(marker) + 2) . ']') | |
endfunction | |
" add PLF source code folders to path | |
function! PLF_AddToPath(basedir) | |
let l:dirs = PLF_FindFolders(a:basedir) | |
for dir in dirs | |
let &path .= ',' . dir | |
endfor | |
endfunction | |
" error format for PC Lint csv files | |
set errorformat+=\"%f\";\"#%l\";\"%*[^\"]\";\"\";\"%m\";\"#%n\";\"%*[0-9]\" | |
set errorformat+=\"%f\";\"#%l\";\"%*[^\"]\";\"%*[^\"]\";\"%m\";\"#%n\";\"%*[0-9]\" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment