Copy from Artur, not sorted.
This commit is contained in:
268
vim/vimrc
268
vim/vimrc
@@ -82,6 +82,8 @@ set cino+=N-s
|
|||||||
" lines.
|
" lines.
|
||||||
set cino+=(0
|
set cino+=(0
|
||||||
|
|
||||||
|
" enable omni completion
|
||||||
|
set omnifunc=syntaxcomplete#Complete
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -172,6 +174,9 @@ if &t_Co > 2 || has("gui_running")
|
|||||||
set hlsearch
|
set hlsearch
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
" Highlight searched string as typed.
|
||||||
|
set incsearch
|
||||||
|
|
||||||
" Enable syntax highlighting
|
" Enable syntax highlighting
|
||||||
highlight DiffAdd cterm=none ctermfg=Black ctermbg=Green gui=none guifg=Black guibg=Green
|
highlight DiffAdd cterm=none ctermfg=Black ctermbg=Green gui=none guifg=Black guibg=Green
|
||||||
highlight DiffDelete cterm=none ctermfg=Black ctermbg=Red gui=none guifg=Black guibg=Red
|
highlight DiffDelete cterm=none ctermfg=Black ctermbg=Red gui=none guifg=Black guibg=Red
|
||||||
@@ -207,7 +212,10 @@ else
|
|||||||
endif
|
endif
|
||||||
" Configure coloring on command line terminals.
|
" Configure coloring on command line terminals.
|
||||||
if &term=="xterm"
|
if &term=="xterm"
|
||||||
set t_Co=8
|
" enable 256 colors
|
||||||
|
set t_Co=256
|
||||||
|
" set t_Co=8
|
||||||
|
|
||||||
set t_Sb=[4%dm
|
set t_Sb=[4%dm
|
||||||
set t_Sf=[3%dm
|
set t_Sf=[3%dm
|
||||||
endif
|
endif
|
||||||
@@ -219,7 +227,12 @@ endif
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||||
|
" vimdiff
|
||||||
|
"
|
||||||
|
|
||||||
|
" ignore whitespaces
|
||||||
|
set diffopt+=iwhite
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -301,6 +314,28 @@ if has("autocmd")
|
|||||||
|
|
||||||
endif " has("autocmd")
|
endif " has("autocmd")
|
||||||
|
|
||||||
|
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||||
|
" Plugins
|
||||||
|
"
|
||||||
|
|
||||||
|
"
|
||||||
|
" Vundle experimental stuff here.
|
||||||
|
"
|
||||||
|
if filereadable(expand("~/.vim/bundle/Vundle.vim/README.md"))
|
||||||
|
filetype off
|
||||||
|
set rtp+=~/.vim/bundle/Vundle.vim
|
||||||
|
call vundle#begin()
|
||||||
|
Plugin 'VundleVim/Vundle.vim'
|
||||||
|
call vundle#end()
|
||||||
|
filetype plugin indent on
|
||||||
|
endif
|
||||||
|
|
||||||
|
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||||
|
" Commands
|
||||||
|
"
|
||||||
|
|
||||||
|
"command! -nargs=* PFdiff :!p4 diff <args> %'
|
||||||
|
|
||||||
" Convenient command to see the difference between the current buffer and the
|
" Convenient command to see the difference between the current buffer and the
|
||||||
" file it was loaded from, thus the changes you made.
|
" file it was loaded from, thus the changes you made.
|
||||||
" Only define it when not defined already.
|
" Only define it when not defined already.
|
||||||
@@ -309,47 +344,12 @@ if !exists(":DiffOrig")
|
|||||||
\ | wincmd p | diffthis
|
\ | wincmd p | diffthis
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||||
" Key Mappings
|
" Key Mappings
|
||||||
"
|
"
|
||||||
|
|
||||||
" F4 grep the word under cursor.
|
|
||||||
"map <F4> :execute "grep " . expand("<cword>") . " -r *.h *.cpp *.c *.f" <Bar> cw<CR>
|
|
||||||
map <F4> :execute "grep " . expand("<cword>") . " -r --include \*.h --include \*.cpp --include \*.c --include \*.f ." <Bar> cw<CR>
|
|
||||||
" Create a new tab.
|
|
||||||
map <silent> <C-F3> :tabnew<CR>
|
|
||||||
"
|
|
||||||
"command! -nargs=* PFdiff :!p4 diff <args> %
|
|
||||||
"
|
|
||||||
" Loads CF5Compile
|
|
||||||
" Compile and run file if Ctrl-F5 is pressed.
|
|
||||||
"
|
|
||||||
if !exists('*CF5Compile')
|
|
||||||
runtime plugin/cf5-compiler.vim
|
|
||||||
endif
|
|
||||||
map <silent> <C-F5> :call CF5Compile(1)<CR>
|
|
||||||
map <silent> <F5> :call CF5Compile(0)<CR>
|
|
||||||
"
|
|
||||||
" CTRL-U in insert mode deletes a lot. Use CTRL-G u to first break undo,
|
|
||||||
" so that you can undo CTRL-U after inserting a line break.
|
|
||||||
"
|
|
||||||
inoremap <C-U> <C-G>u<C-U>
|
|
||||||
"
|
|
||||||
" Move through wrapped lines instead of buffer lines.
|
|
||||||
"
|
|
||||||
noremap <Up> gk
|
|
||||||
noremap <Down> gj
|
|
||||||
imap <Up> <C-O>gk
|
|
||||||
imap <Down> <C-O>gj
|
|
||||||
"
|
|
||||||
" Working with tabs especially if using console version.
|
|
||||||
"
|
|
||||||
nnoremap th :tabfirst<CR>
|
|
||||||
nnoremap tj :tabnext<CR>
|
|
||||||
nnoremap tk :tabprev<CR>
|
|
||||||
nnoremap tl :tablast<CR>
|
|
||||||
nnoremap tm :tabm<Space>
|
|
||||||
nnoremap td :tabclose<CR>
|
|
||||||
"
|
"
|
||||||
" .gvimrc content here.
|
" .gvimrc content here.
|
||||||
"
|
"
|
||||||
@@ -375,14 +375,190 @@ if has("gui_running")
|
|||||||
else
|
else
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
" open ctag definition in new tab
|
||||||
|
map <C-\> :tab split<CR>:exec("tag ".expand("<cword>"))<CR>
|
||||||
|
|
||||||
|
" Create a new tab.
|
||||||
|
map <silent> <C-F3> :tabnew<CR>
|
||||||
|
|
||||||
"
|
"
|
||||||
" Vundle experimental stuff here.
|
" F4 grep the word under cursor.
|
||||||
"
|
"
|
||||||
if filereadable(expand("~/.vim/bundle/Vundle.vim/README.md"))
|
map <F4> :execute "grep " . expand("<cword>") . " -r --include \*.h --include \*.cpp --include \*.c --include \*.f ." <Bar> cw<CR>
|
||||||
filetype off
|
|
||||||
set rtp+=~/.vim/bundle/Vundle.vim
|
"
|
||||||
call vundle#begin()
|
" Loads CF5Compile
|
||||||
Plugin 'VundleVim/Vundle.vim'
|
" Compile and run file if Ctrl-F5 is pressed.
|
||||||
call vundle#end()
|
"
|
||||||
filetype plugin indent on
|
if !exists('*CF5Compile')
|
||||||
|
runtime plugin/cf5-compiler.vim
|
||||||
|
endif
|
||||||
|
map <silent> <C-F5> :call CF5Compile(1)<CR>
|
||||||
|
map <silent> <F5> :call CF5Compile(0)<CR>
|
||||||
|
"
|
||||||
|
" CTRL-U in insert mode deletes a lot. Use CTRL-G u to first break undo,
|
||||||
|
" so that you can undo CTRL-U after inserting a line break.
|
||||||
|
"
|
||||||
|
inoremap <C-U> <C-G>u<C-U>
|
||||||
|
"
|
||||||
|
" Move through wrapped lines instead of buffer lines.
|
||||||
|
"
|
||||||
|
noremap <Up> gk
|
||||||
|
noremap <Down> gj
|
||||||
|
imap <Up> <C-O>gk
|
||||||
|
imap <Down> <C-O>gj
|
||||||
|
"
|
||||||
|
" Working with tabs especially if using console version.
|
||||||
|
"
|
||||||
|
nnoremap th :tabfirst<CR>
|
||||||
|
nnoremap tj :tabnext<CR>
|
||||||
|
nnoremap tk :tabprev<CR>
|
||||||
|
nnoremap tl :tablast<CR>
|
||||||
|
nnoremap tm :tabm<Space>
|
||||||
|
nnoremap td :tabclose<CR>
|
||||||
|
|
||||||
|
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||||
|
" Experimental staff
|
||||||
|
"
|
||||||
|
|
||||||
|
if 0 = 1
|
||||||
|
"--------------
|
||||||
|
" Plugins
|
||||||
|
"--------------
|
||||||
|
"Plugin 'Rip-Rip/clang_complete'
|
||||||
|
"Plugin 'altercation/vim-colors-solarized.git'
|
||||||
|
"Plugin 'flazz/vim-colorschemes'
|
||||||
|
"Plugin 'Valloric/YouCompleteMe'
|
||||||
|
"Plugin 'rhysd/vim-clang-format'
|
||||||
|
Plugin 'vim-scripts/Mark'
|
||||||
|
Plugin 'bling/vim-airline'
|
||||||
|
Plugin 'danro/rename.vim'
|
||||||
|
Plugin 'gmarik/Vundle.vim'
|
||||||
|
Plugin 'kana/vim-operator-user'
|
||||||
|
Plugin 'kien/ctrlp.vim'
|
||||||
|
Plugin 'majutsushi/tagbar'
|
||||||
|
Plugin 'mattn/emmet-vim'
|
||||||
|
Plugin 'mileszs/ack.vim'
|
||||||
|
Plugin 'nanotech/jellybeans.vim'
|
||||||
|
Plugin 'scrooloose/nerdtree'
|
||||||
|
Plugin 'scrooloose/syntastic'
|
||||||
|
Plugin 'tmhedberg/matchit'
|
||||||
|
Plugin 'tpope/vim-commentary'
|
||||||
|
Plugin 'tpope/vim-dispatch'
|
||||||
|
Plugin 'tpope/vim-eunuch'
|
||||||
|
Plugin 'tpope/vim-fugitive'
|
||||||
|
Plugin 'tpope/vim-unimpaired'
|
||||||
|
Plugin 'vim-scripts/Align'
|
||||||
|
Plugin 'vim-scripts/Buffergator'
|
||||||
|
Plugin 'vim-scripts/a.vim'
|
||||||
|
Plugin 'vim-scripts/taglist.vim'
|
||||||
|
Plugin 'vim-scripts/DoxyGen-Syntax'
|
||||||
|
Plugin 'vim-scripts/DoxygenToolkit.vim'
|
||||||
|
Plugin 'msanders/snipmate.vim'
|
||||||
|
Plugin 'vim-scripts/xml.vim'
|
||||||
|
Plugin 'junegunn/vim-easy-align'
|
||||||
|
Plugin 'ntpeters/vim-better-whitespace'
|
||||||
|
Plugin 'airblade/vim-gitgutter'
|
||||||
|
"Plugin 'eiginn/netrw'
|
||||||
|
"Plugin 'vim-scripts/TagHighlight'
|
||||||
|
"Plugin 'gcmt/taboo.vim'
|
||||||
|
|
||||||
|
Plugin 'xterm-color-table.vim'
|
||||||
|
|
||||||
|
" All of your Plugins must be added before the following line
|
||||||
|
call vundle#end() " required
|
||||||
|
filetype plugin indent on " required
|
||||||
|
" To ignore plugin indent changes, instead use:
|
||||||
|
filetype plugin on
|
||||||
|
|
||||||
|
" - - - - - - - - - - - - - -
|
||||||
|
" NERDTree settings
|
||||||
|
" - - - - - - - - - - - - - -
|
||||||
|
map <C-n> :NERDTreeToggle<CR>
|
||||||
|
map <C-m> :NERDTreeFind<CR>
|
||||||
|
|
||||||
|
"map <C-n> :Explore<CR>
|
||||||
|
"map <C-m> :Explore %:p:h<CR>
|
||||||
|
let g:NERDTreeQuitOnOpen = 1
|
||||||
|
let g:NERDTreeDirArrows = 1
|
||||||
|
let NERDTreeIgnore = ['\.o$', '\.so$', '\.tsk$']
|
||||||
|
|
||||||
|
" - - - - - - - - - - - - - -
|
||||||
|
" tagbar settings
|
||||||
|
" - - - - - - - - - - - - - -
|
||||||
|
map <C-t> :TagbarToggle<CR>
|
||||||
|
let g:tagbar_autoclose = 1
|
||||||
|
let g:tagbar_autofocus = 1
|
||||||
|
let g:tagbar_autoshowtag = 1
|
||||||
|
let g:tagbar_compact = 1
|
||||||
|
let g:tagbar_indent = 1
|
||||||
|
let g:tagbar_sort = 1
|
||||||
|
let g:tagbar_width = 60
|
||||||
|
let g:tagbar_ctags_bin = "/opt/swt/bin/ctags"
|
||||||
|
|
||||||
|
" - - - - - - - - - - - - - -
|
||||||
|
" powerline
|
||||||
|
" - - - - - - - - - - - - - -
|
||||||
|
let g:Powerline_symbols = "unicode"
|
||||||
|
|
||||||
|
" - - - - - - - - - - - - - -
|
||||||
|
" CtrlP
|
||||||
|
" - - - - - - - - - - - - - -
|
||||||
|
let g:ctrlp_root_markers = ['.ctrlp']
|
||||||
|
let g:ctrlp_custom_ignore = {
|
||||||
|
\ 'file': '\v\.(o|d|dd)$',
|
||||||
|
\ }
|
||||||
|
|
||||||
|
" - - - - - - - - - - - - - -
|
||||||
|
" Buffergator
|
||||||
|
" - - - - - - - - - - - - - -
|
||||||
|
let g:buffergator_viewport_split_policy = "L"
|
||||||
|
|
||||||
|
" - - - - - - - - - - - - - -
|
||||||
|
" syntastic
|
||||||
|
" - - - - - - - - - - - - - -
|
||||||
|
"let g:syntastic_cpp_compiler_options = ' -std=c++1y'
|
||||||
|
let g:syntastic_mode_map = {
|
||||||
|
\ "mode": "active",
|
||||||
|
\ "active_filetypes": ["ruby", "php"],
|
||||||
|
\ "passive_filetypes": ["c", "cpp"] }
|
||||||
|
|
||||||
|
|
||||||
|
" - - - - - - - - - - - - - -
|
||||||
|
" vim-colorschemes
|
||||||
|
" - - - - - - - - - - - - - -
|
||||||
|
colorscheme jellybeans
|
||||||
|
let g:jellybeans_use_lowcolor_black = 0
|
||||||
|
|
||||||
|
" - - - - - - - - - - - - - -
|
||||||
|
" Ack
|
||||||
|
" - - - - - - - - - - - - - -
|
||||||
|
let g:ack_default_options = " --ignore-file=is:tags -s -H --nocolor --nogroup --column"
|
||||||
|
let g:ack_highlight = 1
|
||||||
|
|
||||||
|
" - - - - - - - - - - - - - -
|
||||||
|
" a
|
||||||
|
" - - - - - - - - - - - - - -
|
||||||
|
let g:alternateExtensions_h = "cpp,c"
|
||||||
|
let g:alternateExtensions_cpp = "h"
|
||||||
|
let g:alternateExtensions_c = "h"
|
||||||
|
|
||||||
|
" - - - - - - - - - - - - - -
|
||||||
|
" netrw
|
||||||
|
" - - - - - - - - - - - - - -
|
||||||
|
let g:netrw_altv = 1
|
||||||
|
let g:netrw_fastbrowse = 2
|
||||||
|
let g:netrw_keepdir = 0
|
||||||
|
let g:netrw_liststyle = 3
|
||||||
|
let g:netrw_retmap = 1
|
||||||
|
let g:netrw_silent = 1
|
||||||
|
let g:netrw_special_syntax= 1
|
||||||
|
|
||||||
|
" - - - - - - - - - - - - - -
|
||||||
|
" taboo vim
|
||||||
|
" - - - - - - - - - - - - - -
|
||||||
|
"let g:taboo_tab_format = "[%m:%N:%W] %f"
|
||||||
|
|
||||||
|
let g:strip_whitespace_on_save = 1
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|||||||
Reference in New Issue
Block a user