Mercurial > public > dotfiles
changeset 9:d3c383a0a5e8
New settings inspired from recent blog posts on the net.
author | Brian Neal <bgneal1@rockwellcollins.com> |
---|---|
date | Wed, 19 Sep 2012 15:07:55 -0500 |
parents | 097c95760fd0 |
children | b113527fa5d1 |
files | vim/.vimrc |
diffstat | 1 files changed, 45 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- 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 <silent> ,/ :let @/=""<CR> - " NERD tree plugin " nmap ,n :NERDTreeToggle<CR> " 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 <F8> :call BgnCtags()<CR> +nnoremap <F9> :tn<CR> +nnoremap <F10> :tp<CR> +nnoremap <F11> :tj<CR> +set tags=tags;/ + +" Trial settings +set wildmenu +set wildmode=list:longest +set laststatus=2 +set gdefault +set showmatch +set formatoptions=qrn1 +nnoremap ,/ :noh<CR> +" nnoremap / /\v +" vnoremap / /\v + +" Splitting windows and moving around between them: +nnoremap ,v <C-w>v<C-w>l +nnoremap <C-h> <C-w>h +nnoremap <C-j> <C-w>j +nnoremap <C-k> <C-w>k +nnoremap <C-l> <C-w>l + +" Absolute vs relative line numbers: +nnoremap ,na :set norelativenumber<CR>:set number<CR> +nnoremap ,nr :set relativenumber<CR> + +" Format paragraph +nnoremap ,p gqip + " Pathogen support call pathogen#infect()