Misc update (for C++ editing).
(Cool) shortcuts to navigate in ctags. Use Deja Vu Sans Mono instead of Inconsolata (which is bugged for italic) Working shortcut to duplicate-and-comment. Autorelad .vimrc on save. Smaller tab char. Highly visible active status line. More logical ctags location.
This commit is contained in:
parent
1878003d18
commit
f4aaaad253
1 changed files with 29 additions and 15 deletions
36
.vimrc
36
.vimrc
|
|
@ -2,7 +2,7 @@ set nocompatible " do not try to be vi-compatible
|
||||||
|
|
||||||
call pathogen#infect()
|
call pathogen#infect()
|
||||||
|
|
||||||
set guifont=Inconsolata\ 11
|
set guifont=Deja\ Vu\ Sans\ Mono\ 9
|
||||||
|
|
||||||
syntax on " syntax coloring by default
|
syntax on " syntax coloring by default
|
||||||
|
|
||||||
|
|
@ -78,7 +78,7 @@ nnoremap xx "_dd
|
||||||
nnoremap <leader>t :set noexpandtab<CR>
|
nnoremap <leader>t :set noexpandtab<CR>
|
||||||
|
|
||||||
" Yank the line, comment it, paste it
|
" Yank the line, comment it, paste it
|
||||||
nnoremap <leader>g yygccp
|
nmap <leader>g yygccp
|
||||||
|
|
||||||
" When jumping to a given line, center the screen
|
" When jumping to a given line, center the screen
|
||||||
nnoremap G Gzz
|
nnoremap G Gzz
|
||||||
|
|
@ -112,13 +112,13 @@ nnoremap <leader>u :GundoToggle<CR>
|
||||||
nnoremap <leader>c :%s/\/\*\_.*\*\/\n\{,1}\|^\s*\/\/.*\n\|\s*\/\/.*//<CR>:%s/^\s*\n//<CR>
|
nnoremap <leader>c :%s/\/\*\_.*\*\/\n\{,1}\|^\s*\/\/.*\n\|\s*\/\/.*//<CR>:%s/^\s*\n//<CR>
|
||||||
|
|
||||||
" set a tiny guifont size
|
" set a tiny guifont size
|
||||||
nnoremap <leader>h :set guifont=Inconsolata\ 4<CR>
|
nnoremap <leader>h :set guifont=Deja\ Vu\ Sans\ Mono\ 4<CR>
|
||||||
|
|
||||||
" set a normal guifont size
|
" set a normal guifont size
|
||||||
nnoremap <leader>f :set guifont=Inconsolata\ 11<CR>
|
nnoremap <leader>f :set guifont=Deja\ Vu\ Sans\ Mono\ 9<CR>
|
||||||
|
|
||||||
" set a big guifont size
|
" set a big guifont size
|
||||||
nnoremap <leader>ç :set guifont=Inconsolata\ 14<CR>
|
nnoremap <leader>ç :set guifont=Deja\ Vu\ Sans\ Mono\ 11<CR>
|
||||||
|
|
||||||
" double percentage sign in command mode is expanded
|
" double percentage sign in command mode is expanded
|
||||||
" to directory of current file - http://vimcasts.org/e/14
|
" to directory of current file - http://vimcasts.org/e/14
|
||||||
|
|
@ -129,11 +129,15 @@ map <leader>p :CtrlP %%<cr>
|
||||||
map + <Plug>(expand_region_expand)
|
map + <Plug>(expand_region_expand)
|
||||||
map - <Plug>(expand_region_shrink)
|
map - <Plug>(expand_region_shrink)
|
||||||
|
|
||||||
|
" reload config after editing vimrc
|
||||||
|
autocmd! BufWritePost .vimrc source $MYVIMRC
|
||||||
|
|
||||||
" use shift-space as escape
|
" use shift-space as escape
|
||||||
"inoremap <S-Space> <Esc>
|
"inoremap <S-Space> <Esc>
|
||||||
|
|
||||||
" print tabs with a special character (add ",eol:·" for end of lines)
|
" print tabs with a special character (add ",eol:·" for end of lines)
|
||||||
set listchars=trail:·,nbsp:·,tab:▸\ ,extends:»,precedes:«,
|
" set listchars=trail:·,nbsp:·,tab:▸\ ,extends:»,precedes:«,
|
||||||
|
set listchars=trail:·,nbsp:·,tab:˲\ ,extends:»,precedes:«,
|
||||||
set list
|
set list
|
||||||
|
|
||||||
au VimEnter * echomsg system('/usr/games/fortune vimtweets')
|
au VimEnter * echomsg system('/usr/games/fortune vimtweets')
|
||||||
|
|
@ -149,6 +153,11 @@ set laststatus=2 " always show the statusline, even when there is only one fi
|
||||||
" set ruler " show current line and column number
|
" set ruler " show current line and column number
|
||||||
" endif
|
" endif
|
||||||
|
|
||||||
|
" Style of the status line of the current window
|
||||||
|
hi StatusLine ctermfg=15 ctermbg=239 cterm=bold guifg=#000000 guibg=#ffaa00 gui=bold
|
||||||
|
|
||||||
|
" Style of the status line of the Non-Current window
|
||||||
|
"hi StatusLineNC ctermfg=249 guifg=#b2b2b2 ctermbg=237 guibg=#3a3a3a cterm=none gui=none
|
||||||
|
|
||||||
if has("fname_case")
|
if has("fname_case")
|
||||||
au BufNewFile,BufRead *.lsp,*.lisp,*.el,*.cl,*.jl,*.L,.emacs,.sawfishrc,*.pddl setf lisp
|
au BufNewFile,BufRead *.lsp,*.lisp,*.el,*.cl,*.jl,*.L,.emacs,.sawfishrc,*.pddl setf lisp
|
||||||
|
|
@ -234,13 +243,18 @@ map <F11> :NERDTreeToggle<cr>
|
||||||
" nnoremap <leader>t :NERDTreeToggle<cr>
|
" nnoremap <leader>t :NERDTreeToggle<cr>
|
||||||
|
|
||||||
" configure tags - add additional tags here or comment out not-used ones
|
" configure tags - add additional tags here or comment out not-used ones
|
||||||
|
set tags+=./tags;$HOME
|
||||||
|
set tags+=~/code/paradiseo/tags
|
||||||
set tags+=~/.vim/tags/cpp
|
set tags+=~/.vim/tags/cpp
|
||||||
set tags+=~/.vim/tags/bmdd
|
|
||||||
set tags+=~/.vim/tags/bmddsolver
|
|
||||||
set tags+=~/.vim/tags/dae
|
|
||||||
set tags+=~/.vim/tags/eodev
|
|
||||||
" build tags of your own project with CTRL+F12
|
" build tags of your own project with CTRL+F12
|
||||||
map <C-F12> :!ctags -R --c++-kinds=+p --fields=+iaS --extra=+q .<CR>
|
map <C-F12> :!ctags -R --c++-kinds=+p --fields=+iaS --extra=+q .<CR>
|
||||||
|
" go to definition and center screen (navigate forward in the tags stack)
|
||||||
|
nnoremap <leader><Up> <C-]>zz
|
||||||
|
" jump back from definition (navigate backward in the tags stack)
|
||||||
|
nnoremap <leader><Down> <C-T>
|
||||||
|
" open the definition in a vertical split and center screen
|
||||||
|
nnoremap <leader><Right> :vsp <CR>:exec("tag ".expand("<cword>"))<CR>zz
|
||||||
|
|
||||||
" OmniCppComplete
|
" OmniCppComplete
|
||||||
let OmniCpp_NamespaceSearch = 1
|
let OmniCpp_NamespaceSearch = 1
|
||||||
|
|
@ -257,6 +271,6 @@ au CursorMovedI,InsertLeave * if pumvisible() == 0|silent! pclose|endif
|
||||||
set completeopt=menuone,menu,longest,preview
|
set completeopt=menuone,menu,longest,preview
|
||||||
|
|
||||||
" close the buffer without deleting its window
|
" close the buffer without deleting its window
|
||||||
:runtime plugins/bclose.vim
|
":runtime bundle/bclose.vim
|
||||||
nmap :bc <Plug>Kwbd
|
nmap :bc <Plug>Kwbd
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue