Copy from Artur, not sorted.
This commit is contained in:
248
vim/vimrc
248
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,17 +344,48 @@ 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>
|
" .gvimrc content here.
|
||||||
|
"
|
||||||
|
if has("gui_running")
|
||||||
|
":tab drop {file}
|
||||||
|
|
||||||
|
" Hide show menu and toolbar.
|
||||||
|
map <silent> <C-F2> :if &guioptions =~# 'm' <Bar>
|
||||||
|
\set guioptions-=m <Bar>
|
||||||
|
\set guioptions-=T <Bar>
|
||||||
|
\set showtabline=0 <Bar>
|
||||||
|
\else <Bar>
|
||||||
|
\set guioptions+=m <Bar>
|
||||||
|
\set guioptions+=T <Bar>
|
||||||
|
\set showtabline=1 <Bar>
|
||||||
|
\endif <CR>
|
||||||
|
|
||||||
|
" Open file in a new tab.
|
||||||
|
if has("browsefilter")
|
||||||
|
let g:browsefilter = "All Files (*.*)\t*\n"
|
||||||
|
endif
|
||||||
|
|
||||||
|
else
|
||||||
|
endif
|
||||||
|
|
||||||
|
" open ctag definition in new tab
|
||||||
|
map <C-\> :tab split<CR>:exec("tag ".expand("<cword>"))<CR>
|
||||||
|
|
||||||
" Create a new tab.
|
" Create a new tab.
|
||||||
map <silent> <C-F3> :tabnew<CR>
|
map <silent> <C-F3> :tabnew<CR>
|
||||||
|
|
||||||
"
|
"
|
||||||
"command! -nargs=* PFdiff :!p4 diff <args> %
|
" F4 grep the word under cursor.
|
||||||
|
"
|
||||||
|
map <F4> :execute "grep " . expand("<cword>") . " -r --include \*.h --include \*.cpp --include \*.c --include \*.f ." <Bar> cw<CR>
|
||||||
|
|
||||||
"
|
"
|
||||||
" Loads CF5Compile
|
" Loads CF5Compile
|
||||||
" Compile and run file if Ctrl-F5 is pressed.
|
" Compile and run file if Ctrl-F5 is pressed.
|
||||||
@@ -350,39 +416,149 @@ nnoremap tk :tabprev<CR>
|
|||||||
nnoremap tl :tablast<CR>
|
nnoremap tl :tablast<CR>
|
||||||
nnoremap tm :tabm<Space>
|
nnoremap tm :tabm<Space>
|
||||||
nnoremap td :tabclose<CR>
|
nnoremap td :tabclose<CR>
|
||||||
|
|
||||||
|
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||||
|
" Experimental staff
|
||||||
"
|
"
|
||||||
" .gvimrc content here.
|
|
||||||
"
|
|
||||||
if has("gui_running")
|
|
||||||
":tab drop {file}
|
|
||||||
|
|
||||||
" Hide show menu and toolbar.
|
if 0 = 1
|
||||||
map <silent> <C-F2> :if &guioptions =~# 'm' <Bar>
|
"--------------
|
||||||
\set guioptions-=m <Bar>
|
" Plugins
|
||||||
\set guioptions-=T <Bar>
|
"--------------
|
||||||
\set showtabline=0 <Bar>
|
"Plugin 'Rip-Rip/clang_complete'
|
||||||
\else <Bar>
|
"Plugin 'altercation/vim-colors-solarized.git'
|
||||||
\set guioptions+=m <Bar>
|
"Plugin 'flazz/vim-colorschemes'
|
||||||
\set guioptions+=T <Bar>
|
"Plugin 'Valloric/YouCompleteMe'
|
||||||
\set showtabline=1 <Bar>
|
"Plugin 'rhysd/vim-clang-format'
|
||||||
\endif <CR>
|
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'
|
||||||
|
|
||||||
" Open file in a new tab.
|
Plugin 'xterm-color-table.vim'
|
||||||
if has("browsefilter")
|
|
||||||
let g:browsefilter = "All Files (*.*)\t*\n"
|
" All of your Plugins must be added before the following line
|
||||||
endif
|
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
|
||||||
|
|
||||||
else
|
|
||||||
endif
|
|
||||||
|
|
||||||
"
|
|
||||||
" 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
|
endif
|
||||||
|
|||||||
Reference in New Issue
Block a user