From e861773246795e21688bd3b2bd60cdd2d2096f27 Mon Sep 17 00:00:00 2001 From: Cody Hiar Date: Thu, 28 Jan 2016 10:53:28 -0700 Subject: Adding some of the updates that were applied to neovim --- vimrc | 47 ++++++++++++++++++++--------------------------- 1 file changed, 20 insertions(+), 27 deletions(-) diff --git a/vimrc b/vimrc index 5c58c54..4e1e2d3 100644 --- a/vimrc +++ b/vimrc @@ -17,7 +17,6 @@ Plug 'terryma/vim-multiple-cursors' Plug 'scrooloose/syntastic' Plug 'joonty/vdebug' Plug 'ctrlpvim/ctrlp.vim' -Plug 'Lokaltog/vim-easymotion' Plug 'Shougo/unite.vim' Plug 'honza/vim-snippets' Plug 'ervandew/supertab' @@ -111,8 +110,6 @@ nnoremap = ]c au FileType xml setlocal equalprg=xmllint\ --format\ --recover\ -\ 2>/dev/null "Formating a json file com! Formatjson %!python -m json.tool -" Search for word under cursor -nmap * yiw/0 "Command for figuring out highlight group map ,hi :echo "hi<" . synIDattr(synID(line("."),col("."),1),"name") . '> trans<' . synIDattr(synID(line("."),col("."),0),"name") . "> lo<" . synIDattr(synIDtrans(synID(line("."),col("."),1)),"name") . ">" . " FG:" . synIDattr(synIDtrans(synID(line("."),col("."),1)),"fg#") "Twig Syntax @@ -124,8 +121,6 @@ au BufNewFile,BufRead *.sls set filetype=yaml " Set drupal files as php au BufNewFile,BufRead *.inc set filetype=php au BufNewFile,BufRead *.module set filetype=php -" Get out of visual mode faset -imap jj " Faster saving noremap w :update " Faster quiting @@ -143,6 +138,16 @@ autocmd FileType css set tabstop=2|set shiftwidth=2 :command! QUOTES :%s/”\|“/"/g " Yank withouth newlinw nmap yY ^y$ +" Move cursor to matched string +set incsearch +" Turn off highlight search +set hlsearch! +" allows incsearch highlighting for range commands +cnoremap $t :t'' +cnoremap $T :T'' +cnoremap $m :m'' +cnoremap $M :M'' +cnoremap $d :d`` "----------------------------------------------------------------------------------------------------------------------- @@ -238,27 +243,6 @@ autocmd VimEnter,Colorscheme * :hi IndentGuidesOdd ctermbg=0 autocmd VimEnter,Colorscheme * :hi IndentGuidesEven ctermbg=0 -"----------------------------------------------------------------------------------------------------------------------- -" Easymotion Plugin -"----------------------------------------------------------------------------------------------------------------------- -hi link EasyMotionTarget ErrorMsg -hi link EasyMotionTarget2First ErrorMsg -hi link EasyMotionTarget2Second ErrorMsg -hi link EasyMotionShade Comment -hi EasyMotionTarget ctermbg=none ctermfg=1 cterm=bold -"let g:EasyMotion_do_shade = 0 -nnoremap \ -map (easymotion-prefix) -map r (easymotion-repeat) -nmap s (easymotion-repeat) -let g:EasyMotion_startofline = 0 " keep cursor colum when JK motion -map / (easymotion-sn) -omap / (easymotion-tn) -map n (easymotion-next) -map N (easymotion-prev) -"----------------------------------------------------------------------------------------------------------------------- - - "----------------------------------------------------------------------------------------------------------------------- " Vdebug Plugin "----------------------------------------------------------------------------------------------------------------------- @@ -368,9 +352,18 @@ let g:unite_source_tag_max_fname_length = 80 "----------------------------------------------------------------------------------------------------------------------- " Fugtive "----------------------------------------------------------------------------------------------------------------------- -nnoremap gs :Gstatus nnoremap gc :Gcommit +nnoremap gd :Gdiff nnoremap gl :Glog +function! ToggleGStatus() + if buflisted(bufname('.git/index')) + bd .git/index + else + Gstatus + endif +endfunction +command ToggleGStatus :call ToggleGStatus() +nnoremap gs :ToggleGStatus "----------------------------------------------------------------------------------------------------------------------- -- cgit v1.2.3