# HG changeset patch # User Brian Neal # Date 1348085275 18000 # Node ID d3c383a0a5e8ddfd1082e9e8dbf8655f6df2cf6e # Parent 097c95760fd03baef224078293452cfff2110d8d New settings inspired from recent blog posts on the net. diff -r 097c95760fd0 -r d3c383a0a5e8 vim/.vimrc --- a/vim/.vimrc Sun Apr 29 16:30:44 2012 -0500 +++ b/vim/.vimrc Wed Sep 19 15:07:55 2012 -0500 @@ -8,7 +8,7 @@ set shiftwidth=3 set backspace=indent,eol,start set expandtab -set textwidth=120 +set textwidth=79 set number set ruler set history=1000 @@ -16,7 +16,7 @@ set showcmd " CtrlP related settings -" set wildignore+=.git\*,.hg\*,.svn\*,*.d,*.dbo,*.o,*.ti +" set wildignore+=.git\*,.hg\*,.svn\*,*.d,*.dbo,*.o,*.ti,*.ii,*.swp,*.pyc set wildignore+=*/.git/*,*/.hg/*,*/.svn/* let g:ctrlp_working_path_mode = 2 @@ -34,7 +34,7 @@ " This puts more context around the cursor when scrolling set scrolloff=3 -" let g:netrw_sort_sequence = "[\/]$,*,\.bak$,\.o$,\.info$,\.swp$,\.obj$" +let g:netrw_sort_sequence = "[\/]$,*,\.bak$,\.o$,\.info$,\.swp$,\.obj$" syntax on filetype on @@ -45,7 +45,7 @@ " highlight trailing spaces let c_space_errors = 1 -" let python_space_error_highlight = 1 +let python_space_error_highlight = 1 set background=dark colorscheme peaksea2 @@ -65,12 +65,50 @@ let mapleader="," -" ,/ will clear any highlighted search results -nmap ,/ :let @/="" - " NERD tree plugin " nmap ,n :NERDTreeToggle " let g:NERDTreeQuitOnOpen=1 +" ctags support + +function BgnCtags() + let d = fnamemodify(findfile("root.dir", ";"), ":p:h") + let tags = d . "\\tags" + let s = "ctags -R --c++-kinds=+p --fields=+iaS --extra=+q --exclude=Coe_prune --exclude=Opnet --languages=-all --languages=+c,c++,python -f " . tags . " " . d + echo s + call system(s) +endfunction + +nnoremap :call BgnCtags() +nnoremap :tn +nnoremap :tp +nnoremap :tj +set tags=tags;/ + +" Trial settings +set wildmenu +set wildmode=list:longest +set laststatus=2 +set gdefault +set showmatch +set formatoptions=qrn1 +nnoremap ,/ :noh +" nnoremap / /\v +" vnoremap / /\v + +" Splitting windows and moving around between them: +nnoremap ,v vl +nnoremap h +nnoremap j +nnoremap k +nnoremap l + +" Absolute vs relative line numbers: +nnoremap ,na :set norelativenumber:set number +nnoremap ,nr :set relativenumber + +" Format paragraph +nnoremap ,p gqip + " Pathogen support call pathogen#infect()