improvement

This commit is contained in:
Jie Feng 2017-08-01 22:49:41 +08:00
parent 6bf2b14405
commit 48e8303612
7 changed files with 81 additions and 111 deletions

View File

@ -1,5 +1,20 @@
" Make nerdtree look nice " General properties
let NERDTreeMinimalUI = 1 let NERDTreeDirArrows=1
let NERDTreeDirArrows = 1 let NERDTreeMinimalUI=1
let g:NERDTreeWinSize = 30 let NERDTreeIgnore=['\.o$', '\.pyc$', '\.php\~$']
map <F5> :NERDTreeToggle<CR> 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 <leader>T :NERDTreeFind<cr>
" Toogle on/off
nmap <leader>o :NERDTreeToggle<cr>

View File

@ -1,7 +1,6 @@
" neocomplete " Disable AutoComplPop.
" Next generation completion framework.
let g:acp_enableAtStartup = 0 let g:acp_enableAtStartup = 0
" Use neocomplete.
let g:neocomplete#enable_at_startup = 1 let g:neocomplete#enable_at_startup = 1
let g:neocomplete#enable_camel_case = 1 let g:neocomplete#enable_camel_case = 1
let g:neocomplete#enable_smart_case = 1 let g:neocomplete#enable_smart_case = 1

View File

@ -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

View File

@ -1,31 +1,31 @@
"" Make it beautiful - colors and fonts " Make it beautiful - colors and fonts
"if has("gui_running") if has("gui_running")
""tell the term has 256 colors "tell the term has 256 colors
"set t_Co=256 set t_Co=256
"" Show tab number (useful for Cmd-1, Cmd-2.. mapping) " Show tab number (useful for Cmd-1, Cmd-2.. mapping)
"" For some reason this doesn't work as a regular set command, " 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 " (the numbers don't show up) so I made it a VimEnter event
"autocmd VimEnter * set guitablabel=%N:\ %t\ %M autocmd VimEnter * set guitablabel=%N:\ %t\ %M
"set lines=60 set lines=60
"set columns=190 set columns=190
"if has("gui_gtk2") if has("gui_gtk2")
"set guifont=Inconsolata\ XL\ 12,Inconsolata\ 15,Monaco\ 12 set guifont=Inconsolata\ XL\ 12,Inconsolata\ 15,Monaco\ 12
"else else
"set guifont=Inconsolata\ XL:h17,Inconsolata:h20,Monaco:h17 set guifont=Inconsolata\ XL:h17,Inconsolata:h20,Monaco:h17
"end end
"else else
"let g:CSApprox_loaded = 1 let g:CSApprox_loaded = 1
"" For people using a terminal that is not Solarized " For people using a terminal that is not Solarized
"if exists("g:yadr_using_unsolarized_terminal") if exists("g:yadr_using_unsolarized_terminal")
"let g:solarized_termcolors=256 let g:solarized_termcolors=256
"let g:solarized_termtrans=1 let g:solarized_termtrans=1
"end end
"endif endif
"colorscheme solarized colorscheme solarized
"set background=dark set background=dark

View File

@ -190,3 +190,35 @@ nnoremap <leader>l :redraw!<cr>
imap <leader>cb 『』 imap <leader>cb 『』
nnoremap <leader>n :cn<cr> nnoremap <leader>n :cn<cr>
nnoremap <leader>p :cp<cr> nnoremap <leader>p :cp<cr>
" Fast Saving
map <Leader>w :w<CR>
imap <Leader>w <ESC>:w<CR>
vmap <Leader>w <ESC><ESC>:w<CR>
" :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 <C-L> @@@<esc>hhkywjl?@@@<CR>P/@@@<cr>3s
" Allow to copy/paste between VIM instances
"copy the current visual selection to ~/.vbuf
vmap <leader>y :w! ~/.vbuf<cr>
"copy the current line to the buffer file if no visual selection
vmap <leader>y :.w! ~/.vbuf<cr>
"paste the contents of the buffer file
nmap <leader>p :r ~/.vbuf<cr>
" Switch between the last two files
nnoremap <leader><leader> <C-^>
" easy way to edit reload .vimrc
nmap <leader>V :source $MYVIMRC<cr>
nmap <leader>v :vsp $MYVIMRC<cr>

View File

@ -7,4 +7,4 @@ Bundle "chriskempson/base16-vim"
" Required for Gblame in terminal vim " Required for Gblame in terminal vim
Bundle "godlygeek/csapprox.git" Bundle "godlygeek/csapprox.git"
Bundle 'gorodinskiy/vim-coloresque' Bundle "altercation/vim-colors-solarized"

1
vimrc
View File

@ -20,6 +20,7 @@ set showmode "Show current mode down the bottom
set gcr=a:blinkon0 "Disable cursor blink set gcr=a:blinkon0 "Disable cursor blink
set visualbell "No sounds set visualbell "No sounds
set autoread "Reload files changed outside vim 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 " This makes vim act like all other editors, buffers can
" exist in the background without being in a window. " exist in the background without being in a window.