Configuring VIM more.
This commit is contained in:
@@ -17,6 +17,11 @@ bind j select-pane -D
|
||||
bind k select-pane -U
|
||||
bind l select-pane -R
|
||||
|
||||
bind -r C-h resize-pane -L
|
||||
bind -r C-j resize-pane -D
|
||||
bind -r C-k resize-pane -U
|
||||
bind -r C-l resize-pane -R
|
||||
|
||||
bind m \
|
||||
set -g mode-mouse on \;\
|
||||
set -g mouse-resize=pane on \;\
|
||||
|
||||
@@ -18,7 +18,7 @@ hi ModeMsg term=bold cterm=bold gui=bold
|
||||
hi StatusLine term=reverse,bold cterm=reverse,bold gui=reverse,bold
|
||||
hi StatusLineNC term=reverse cterm=reverse gui=reverse
|
||||
hi VertSplit term=reverse cterm=reverse gui=reverse
|
||||
hi Visual term=reverse ctermbg=black guibg=grey60
|
||||
hi Visual term=reverse ctermbg=DarkGray guibg=grey60
|
||||
hi VisualNOS term=underline,bold cterm=underline,bold gui=underline,bold
|
||||
hi DiffText term=reverse cterm=bold ctermbg=Red gui=bold guibg=Red
|
||||
hi Cursor guibg=Green guifg=Black
|
||||
|
||||
434
vim/vimrc
434
vim/vimrc
@@ -308,8 +308,6 @@ if has("autocmd")
|
||||
" Put these in an autocmd group, so that we can delete them easily.
|
||||
augroup vimrcEx
|
||||
au!
|
||||
|
||||
|
||||
" When editing a file, always jump to the last known cursor position.
|
||||
" Don't do it when the position is invalid or when inside an event handler
|
||||
" (happens when dropping a file on gvim).
|
||||
@@ -324,225 +322,15 @@ if 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'
|
||||
|
||||
"
|
||||
" Adds nice status and tabline.
|
||||
"
|
||||
Plugin 'bling/vim-airline'
|
||||
let g:airline#extensions#tabline#enabled = 1
|
||||
let g:airline#extensions#tabline#left_sep = ' '
|
||||
let g:airline#extensions#tabline#left_alt_sep = '|'
|
||||
"
|
||||
" Color table and picker.
|
||||
" :XtermColorTable
|
||||
" press: # to yank, t to toggle, f to set text color
|
||||
"
|
||||
Plugin 'xterm-color-table.vim'
|
||||
|
||||
" :A switches to the header file (or vise versa)
|
||||
" :AS splits and switches
|
||||
" :AV vertical splits and switches
|
||||
" :AT new tab and switches
|
||||
" :AN cycles through matches
|
||||
" :IH switches to file under cursor
|
||||
" :IHS splits and switches
|
||||
" :IHV vertical splits and switches
|
||||
" :IHT new tab and switches
|
||||
" :IHN cycles through matches
|
||||
" <Leader>ih switches to file under cursor
|
||||
" <Leader>is switches to the alternate file of file under
|
||||
" cursor (e.g. on <foo.h> switches to foo.cpp)
|
||||
" <Leader>ihn cycles through matches
|
||||
Plugin 'vim-scripts/a.vim'
|
||||
|
||||
"
|
||||
" :set syntax=cpp.doxygen to highlight doxygen comments.
|
||||
"
|
||||
Plugin 'vim-scripts/DoxyGen-Syntax'
|
||||
"
|
||||
" In vim, place the cursor on the line and
|
||||
" :DoxLic - generates license comment.
|
||||
" :DoxAuthor - skeleton and leave the cursor just after @author tag.
|
||||
" :Dox - generates function/class comment.
|
||||
" :DoxUndoc(DEBUG) - if you want to ignore all code fragment ifdefed with
|
||||
" DEBUG.
|
||||
" :DoxBlock -
|
||||
"
|
||||
Plugin 'vim-scripts/DoxygenToolkit.vim'
|
||||
|
||||
|
||||
"
|
||||
call vundle#end()
|
||||
filetype plugin indent on
|
||||
filetype plugin on
|
||||
endif
|
||||
|
||||
if exists("dddd")
|
||||
|
||||
"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 'danro/rename.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/taglist.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 configuration
|
||||
"
|
||||
|
||||
" - - - - - - - - - - - - - -
|
||||
" 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
|
||||
|
||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" Commands
|
||||
"
|
||||
|
||||
"command! -nargs=* PFdiff :!p4 diff <args> %'
|
||||
|
||||
" Convenient command to see the difference between the current buffer and the
|
||||
" file it was loaded from, thus the changes you made.
|
||||
" Only define it when not defined already.
|
||||
if !exists(":DiffOrig")
|
||||
command DiffOrig vert new | set bt=nofile | r # | 0d_ | diffthis
|
||||
\ | wincmd p | diffthis
|
||||
endif
|
||||
|
||||
|
||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" Key Mappings
|
||||
"
|
||||
|
||||
|
||||
"
|
||||
" .gvimrc content here.
|
||||
"
|
||||
if has("gui_running")
|
||||
":tab drop {file}
|
||||
@@ -557,25 +345,18 @@ if has("gui_running")
|
||||
\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.
|
||||
map <silent> <C-F3> :tabnew<CR>
|
||||
"map <silent> <C-F3> :tabnew<CR>
|
||||
|
||||
"
|
||||
" F4 grep the word under cursor.
|
||||
"
|
||||
map <F4> :execute "grep " . expand("<cword>") . " -r --include \*.h --include \*.cpp --include \*.c --include \*.f ." <Bar> cw<CR>
|
||||
map <C-F3> :execute "grep " . expand("<cword>") . " -r --include \*.h --include \*.cpp --include \*.c --include \*.f ." <Bar> cw<CR>
|
||||
|
||||
"
|
||||
" Loads CF5Compile
|
||||
@@ -609,6 +390,215 @@ nnoremap tm :tabm<Space>
|
||||
nnoremap td :tabclose<CR>
|
||||
|
||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" Experimental staff
|
||||
" 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'
|
||||
|
||||
"
|
||||
" Adds nice status and tabline.
|
||||
"
|
||||
Plugin 'bling/vim-airline'
|
||||
let g:airline#extensions#tabline#enabled = 1
|
||||
let g:airline#extensions#tabline#left_sep = ' '
|
||||
let g:airline#extensions#tabline#left_alt_sep = '|'
|
||||
|
||||
"
|
||||
" Manipulation with buffers and tabs.
|
||||
"
|
||||
Plugin 'vim-scripts/Buffergator'
|
||||
let g:buffergator_suppress_keymaps = 1
|
||||
let g:buffergator_viewport_split_policy = "L"
|
||||
map <C-b> :BuffergatorToggle<CR>
|
||||
map <C-B> :BuffergatorTabsToggle<CR>
|
||||
|
||||
"
|
||||
"
|
||||
"
|
||||
"Plugin 'eiginn/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
|
||||
"map <C-n> :Explore<CR>
|
||||
"map <C-m> :Explore %:p:h<CR>
|
||||
|
||||
"
|
||||
"
|
||||
"
|
||||
Plugin 'scrooloose/nerdtree'
|
||||
let g:NERDTreeQuitOnOpen = 1
|
||||
let g:NERDTreeDirArrows = 1
|
||||
let g:NERDTreeIgnore = ['\.o$', '\.so$', '\.tsk$']
|
||||
map <C-n> :NERDTreeToggle<CR>
|
||||
map <C-m> :NERDTreeFind<CR>
|
||||
|
||||
"
|
||||
" :A switches to the header file (or vise versa)
|
||||
" :AS splits and switches
|
||||
" :AV vertical splits and switches
|
||||
" :AT new tab and switches
|
||||
" :AN cycles through matches
|
||||
" :IH switches to file under cursor
|
||||
" :IHS splits and switches
|
||||
" :IHV vertical splits and switches
|
||||
" :IHT new tab and switches
|
||||
" :IHN cycles through matches
|
||||
" <Leader>ih switches to file under cursor
|
||||
" <Leader>is switches to the alternate file of file under
|
||||
" cursor (e.g. on <foo.h> switches to foo.cpp)
|
||||
" <Leader>ihn cycles through matches
|
||||
"
|
||||
Plugin 'vim-scripts/a.vim'
|
||||
let g:alternateExtensions_h = "cpp,c"
|
||||
let g:alternateExtensions_cpp = "h"
|
||||
let g:alternateExtensions_c = "h"
|
||||
|
||||
|
||||
"
|
||||
" Comment code.
|
||||
" gc - visusl mode - comment selection.
|
||||
"
|
||||
"Plugin 'tpope/vim-commentary'
|
||||
"
|
||||
" Git wrapper.
|
||||
"
|
||||
Plugin 'tpope/vim-fugitive'
|
||||
"
|
||||
" Shows git diff.
|
||||
" [c - jump prev diff
|
||||
" ]c - jump nex diff
|
||||
" <Leader>hs - stage the hunk
|
||||
" <Leader>hr - revert the hunk
|
||||
" :GitGutterNextHunk
|
||||
" :GitGutterPrevHunk
|
||||
" :GitGutterStageHunk
|
||||
" :GitGutterRevertHunk
|
||||
" :GitGutterToggle
|
||||
" :GitGutterLineHighlightsToggle
|
||||
"
|
||||
Plugin 'airblade/vim-gitgutter'
|
||||
let g:gitgutter_sign_column_always = 1
|
||||
let g:gitgutter_map_keys = 0
|
||||
let g:gitgutter_realtime = 0
|
||||
let g:gitgutter_eager = 0
|
||||
|
||||
|
||||
"
|
||||
" Check syntaxis on fly.
|
||||
"
|
||||
"Plugin 'scrooloose/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"] }
|
||||
|
||||
"
|
||||
" Nice colorschemes.
|
||||
"
|
||||
if has("gui_running")
|
||||
Plugin 'nanotech/jellybeans.vim'
|
||||
"colorscheme jellybeans
|
||||
"let g:jellybeans_use_lowcolor_black = 0
|
||||
endif
|
||||
if has("gui_running")
|
||||
Plugin 'altercation/vim-colors-solarized.git'
|
||||
let g:solarized_termcolors=256
|
||||
"set backgroung=dark
|
||||
"set backgroung=light
|
||||
"colorscheme solarized
|
||||
endif
|
||||
|
||||
"
|
||||
" :set syntax=cpp.doxygen to highlight doxygen comments.
|
||||
"
|
||||
Plugin 'vim-scripts/DoxyGen-Syntax'
|
||||
"
|
||||
" In vim, place the cursor on the line and
|
||||
" :DoxLic - generates license comment.
|
||||
" :DoxAuthor - skeleton and leave the cursor just after @author tag.
|
||||
" :Dox - generates function/class comment.
|
||||
" :DoxUndoc(DEBUG) - if you want to ignore all code fragment ifdefed with
|
||||
" DEBUG.
|
||||
" :DoxBlock -
|
||||
"
|
||||
Plugin 'vim-scripts/DoxygenToolkit.vim'
|
||||
"
|
||||
" Color table and picker.
|
||||
" :XtermColorTable
|
||||
" press: # to yank, t to toggle, f to set text color
|
||||
"
|
||||
"Plugin 'xterm-color-table.vim'
|
||||
|
||||
"
|
||||
call vundle#end()
|
||||
filetype plugin indent on
|
||||
filetype plugin on
|
||||
endif
|
||||
|
||||
if exists("dddd")
|
||||
|
||||
"Plugin 'Rip-Rip/clang_complete'
|
||||
"Plugin 'flazz/vim-colorschemes'
|
||||
"Plugin 'Valloric/YouCompleteMe'
|
||||
"Plugin 'rhysd/vim-clang-format'
|
||||
Plugin 'vim-scripts/Mark'
|
||||
Plugin 'danro/rename.vim'
|
||||
Plugin 'kana/vim-operator-user'
|
||||
|
||||
Plugin 'kien/ctrlp.vim'
|
||||
let g:ctrlp_root_markers = ['.ctrlp']
|
||||
let g:ctrlp_custom_ignore = {
|
||||
\ 'file': '\v\.(o|d|dd)$',
|
||||
\ }
|
||||
|
||||
Plugin 'majutsushi/tagbar'
|
||||
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"
|
||||
|
||||
Plugin 'mattn/emmet-vim'
|
||||
Plugin 'tmhedberg/matchit'
|
||||
Plugin 'tpope/vim-dispatch'
|
||||
Plugin 'tpope/vim-unimpaired'
|
||||
Plugin 'vim-scripts/Align'
|
||||
Plugin 'vim-scripts/taglist.vim'
|
||||
Plugin 'vim-scripts/xml.vim'
|
||||
Plugin 'junegunn/vim-easy-align'
|
||||
Plugin 'ntpeters/vim-better-whitespace'
|
||||
let g:strip_whitespace_on_save = 1
|
||||
|
||||
"Plugin 'vim-scripts/TagHighlight'
|
||||
"Plugin 'gcmt/taboo.vim'
|
||||
"let g:taboo_tab_format = "[%m:%N:%W] %f"
|
||||
|
||||
" - - - - - - - - - - - - - -
|
||||
" powerline
|
||||
" - - - - - - - - - - - - - -
|
||||
let g:Powerline_symbols = "unicode"
|
||||
|
||||
" Ack
|
||||
Plugin 'mileszs/ack.vim'
|
||||
let g:ack_default_options = " --ignore-file=is:tags -s -H --nocolor --nogroup --column"
|
||||
let g:ack_highlight = 1
|
||||
|
||||
|
||||
endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user