diff --git a/vim/settings/NERDtree.vim b/vim/settings/NERDtree.vim index 30fadf3..f0f6865 100644 --- a/vim/settings/NERDtree.vim +++ b/vim/settings/NERDtree.vim @@ -1,5 +1,20 @@ -" Make nerdtree look nice -let NERDTreeMinimalUI = 1 -let NERDTreeDirArrows = 1 -let g:NERDTreeWinSize = 30 -map :NERDTreeToggle +" General properties +let NERDTreeDirArrows=1 +let NERDTreeMinimalUI=1 +let NERDTreeIgnore=['\.o$', '\.pyc$', '\.php\~$'] +let NERDTreeWinSize = 35 + +" Make sure that when NT root is changed, Vim's pwd is also updated +let NERDTreeChDirMode = 2 +let NERDTreeShowLineNumbers = 1 +let NERDTreeAutoCenter = 1 + +" Open NERDTree on startup, when no file has been specified +autocmd VimEnter * if !argc() | NERDTree | endif + +" Locate file in hierarchy quickly +map T :NERDTreeFind + +" Toogle on/off +nmap o :NERDTreeToggle + diff --git a/vim/settings/neocomplete.vim b/vim/settings/neocomplete.vim index 6701123..56c3eab 100644 --- a/vim/settings/neocomplete.vim +++ b/vim/settings/neocomplete.vim @@ -1,7 +1,6 @@ -" neocomplete -" Next generation completion framework. - +" Disable AutoComplPop. let g:acp_enableAtStartup = 0 +" Use neocomplete. let g:neocomplete#enable_at_startup = 1 let g:neocomplete#enable_camel_case = 1 let g:neocomplete#enable_smart_case = 1 diff --git a/vim/settings/solarized.vim b/vim/settings/solarized.vim deleted file mode 100644 index 7bc14d2..0000000 --- a/vim/settings/solarized.vim +++ /dev/null @@ -1,77 +0,0 @@ -if !exists("g:yadr_disable_solarized_enhancements") - hi! link txtBold Identifier - hi! link zshVariableDef Identifier - hi! link zshFunction Function - hi! link rubyControl Statement - hi! link rspecGroupMethods rubyControl - hi! link rspecMocks Identifier - hi! link rspecKeywords Identifier - hi! link rubyLocalVariableOrMethod Normal - hi! link rubyStringDelimiter Constant - hi! link rubyString Constant - hi! link rubyAccess Todo - hi! link rubySymbol Identifier - hi! link rubyPseudoVariable Type - hi! link rubyRailsARAssociationMethod Title - hi! link rubyRailsARValidationMethod Title - hi! link rubyRailsMethod Title - hi! link rubyDoBlock Normal - hi! link MatchParen DiffText - - hi! link CTagsModule Type - hi! link CTagsClass Type - hi! link CTagsMethod Identifier - hi! link CTagsSingleton Identifier - - hi! link javascriptFuncName Type - hi! link jsFuncCall jsFuncName - hi! link javascriptFunction Statement - hi! link javascriptThis Statement - hi! link javascriptParens Normal - hi! link jOperators javascriptStringD - hi! link jId Title - hi! link jClass Title - - " Javascript language support - hi! link javascriptJGlobalMethod Statement - - " Make the braces and other noisy things slightly less noisy - hi! jsParens guifg=#005F78 cterm=NONE term=NONE ctermfg=NONE ctermbg=NONE - hi! link jsFuncParens jsParens - hi! link jsFuncBraces jsParens - hi! link jsBraces jsParens - hi! link jsParens jsParens - hi! link jsNoise jsParens - - hi! link NERDTreeFile Constant - hi! link NERDTreeDir Identifier - - hi! link sassMixinName Function - hi! link sassDefinition Function - hi! link sassProperty Type - hi! link htmlTagName Type - - hi! PreProc gui=bold - - " Solarized separators are a little garish. - " This moves separators, comments, and normal - " text into the same color family as the background. - " Using the http://drpeterjones.com/colorcalc/, - " they are now just differently saturated and - " valued riffs on the background color, making - " everything play together just a little more nicely. - hi! VertSplit guifg=#003745 cterm=NONE term=NONE ctermfg=NONE ctermbg=NONE - hi! LineNR guifg=#004C60 gui=bold guibg=#002B36 ctermfg=146 - hi! link NonText VertSplit - hi! Normal guifg=#77A5B1 - hi! Constant guifg=#00BCE0 - hi! Comment guifg=#52737B - hi! link htmlLink Include - hi! CursorLine cterm=NONE gui=NONE - hi! Visual ctermbg=233 - hi! Type gui=bold - hi! EasyMotionTarget ctermfg=100 guifg=#4CE660 gui=bold - - " Make sure this file loads itself on top of any other color settings - au VimEnter * so ~/.vim/settings/solarized.vim -endif diff --git a/vim/settings/yadr-appearance.vim b/vim/settings/yadr-appearance.vim index 02a0d5a..ccf0ab5 100644 --- a/vim/settings/yadr-appearance.vim +++ b/vim/settings/yadr-appearance.vim @@ -1,31 +1,31 @@ -"" Make it beautiful - colors and fonts +" Make it beautiful - colors and fonts -"if has("gui_running") - ""tell the term has 256 colors - "set t_Co=256 +if has("gui_running") + "tell the term has 256 colors + set t_Co=256 - "" Show tab number (useful for Cmd-1, Cmd-2.. mapping) - "" For some reason this doesn't work as a regular set command, - "" (the numbers don't show up) so I made it a VimEnter event - "autocmd VimEnter * set guitablabel=%N:\ %t\ %M + " Show tab number (useful for Cmd-1, Cmd-2.. mapping) + " For some reason this doesn't work as a regular set command, + " (the numbers don't show up) so I made it a VimEnter event + autocmd VimEnter * set guitablabel=%N:\ %t\ %M - "set lines=60 - "set columns=190 + set lines=60 + set columns=190 - "if has("gui_gtk2") - "set guifont=Inconsolata\ XL\ 12,Inconsolata\ 15,Monaco\ 12 - "else - "set guifont=Inconsolata\ XL:h17,Inconsolata:h20,Monaco:h17 - "end -"else - "let g:CSApprox_loaded = 1 + if has("gui_gtk2") + set guifont=Inconsolata\ XL\ 12,Inconsolata\ 15,Monaco\ 12 + else + set guifont=Inconsolata\ XL:h17,Inconsolata:h20,Monaco:h17 + end +else + let g:CSApprox_loaded = 1 - "" For people using a terminal that is not Solarized - "if exists("g:yadr_using_unsolarized_terminal") - "let g:solarized_termcolors=256 - "let g:solarized_termtrans=1 - "end -"endif + " For people using a terminal that is not Solarized + if exists("g:yadr_using_unsolarized_terminal") + let g:solarized_termcolors=256 + let g:solarized_termtrans=1 + end +endif -"colorscheme solarized -"set background=dark +colorscheme solarized +set background=dark diff --git a/vim/settings/yadr-keymap.vim b/vim/settings/yadr-keymap.vim index b2a1042..4ea092e 100644 --- a/vim/settings/yadr-keymap.vim +++ b/vim/settings/yadr-keymap.vim @@ -190,3 +190,35 @@ nnoremap l :redraw! imap cb 『』 nnoremap n :cn nnoremap p :cp + +" Fast Saving +map w :w +imap w :w +vmap w :w + +" :W sudo saves the file +" (useful for handling the permission-denied error) +command W w !sudo tee % > /dev/null + +" Highlight current line - allows you to track cursor position more easily +set cursorline + +" map CTRL-L to piece-wise copying of the line above the current one +imap @@@hhkywjl?@@@P/@@@3s + +" Allow to copy/paste between VIM instances +"copy the current visual selection to ~/.vbuf +vmap y :w! ~/.vbuf + +"copy the current line to the buffer file if no visual selection +vmap y :.w! ~/.vbuf + +"paste the contents of the buffer file +nmap p :r ~/.vbuf + +" Switch between the last two files +nnoremap + +" easy way to edit reload .vimrc +nmap V :source $MYVIMRC +nmap v :vsp $MYVIMRC diff --git a/vim/vundles/appearance.vundle b/vim/vundles/appearance.vundle index e1cbd5f..8ef796e 100644 --- a/vim/vundles/appearance.vundle +++ b/vim/vundles/appearance.vundle @@ -7,4 +7,4 @@ Bundle "chriskempson/base16-vim" " Required for Gblame in terminal vim Bundle "godlygeek/csapprox.git" -Bundle 'gorodinskiy/vim-coloresque' +Bundle "altercation/vim-colors-solarized" diff --git a/vimrc b/vimrc index 380639d..e6767eb 100644 --- a/vimrc +++ b/vimrc @@ -20,6 +20,7 @@ set showmode "Show current mode down the bottom set gcr=a:blinkon0 "Disable cursor blink set visualbell "No sounds set autoread "Reload files changed outside vim +set so=999 " Make sure that coursor is always vertically centered on j/k moves " This makes vim act like all other editors, buffers can " exist in the background without being in a window.