diff --git a/config/.tmux.conf b/config/.tmux.conf index f39cab7..4db64f0 100644 --- a/config/.tmux.conf +++ b/config/.tmux.conf @@ -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 \;\ diff --git a/vim/colors/vahagn_black_terminal.vim b/vim/colors/vahagn_black_terminal.vim index 9f6e932..e5a8c6b 100644 --- a/vim/colors/vahagn_black_terminal.vim +++ b/vim/colors/vahagn_black_terminal.vim @@ -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 diff --git a/vim/vimrc b/vim/vimrc index 361a4d0..fe9414c 100755 --- a/vim/vimrc +++ b/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 - " ih switches to file under cursor - " is switches to the alternate file of file under - " cursor (e.g. on switches to foo.cpp) - " 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 :NERDTreeToggle -map :NERDTreeFind - -"map :Explore -"map :Explore %:p:h -let g:NERDTreeQuitOnOpen = 1 -let g:NERDTreeDirArrows = 1 -let NERDTreeIgnore = ['\.o$', '\.so$', '\.tsk$'] - -" - - - - - - - - - - - - - - -" tagbar settings -" - - - - - - - - - - - - - - -map :TagbarToggle -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 %' - -" 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 \set showtabline=1 \endif - - " 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 :tab split:exec("tag ".expand("")) " Create a new tab. -map :tabnew +"map :tabnew " " F4 grep the word under cursor. " -map :execute "grep " . expand("") . " -r --include \*.h --include \*.cpp --include \*.c --include \*.f ." cw +map :execute "grep " . expand("") . " -r --include \*.h --include \*.cpp --include \*.c --include \*.f ." cw " " Loads CF5Compile @@ -609,6 +390,215 @@ nnoremap tm :tabm nnoremap td :tabclose """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -" 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 :BuffergatorToggle + map :BuffergatorTabsToggle + + " + " + " + "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 :Explore + "map :Explore %:p:h + + " + " + " + Plugin 'scrooloose/nerdtree' + let g:NERDTreeQuitOnOpen = 1 + let g:NERDTreeDirArrows = 1 + let g:NERDTreeIgnore = ['\.o$', '\.so$', '\.tsk$'] + map :NERDTreeToggle + map :NERDTreeFind + + " + " :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 + " ih switches to file under cursor + " is switches to the alternate file of file under + " cursor (e.g. on switches to foo.cpp) + " 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 + " hs - stage the hunk + " 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 :TagbarToggle +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 +