aboutsummaryrefslogtreecommitdiff
path: root/vimrc
diff options
context:
space:
mode:
Diffstat (limited to 'vimrc')
-rw-r--r--vimrc47
1 files 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/<C-r>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#")<CR>
"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 <ESC>
" Faster saving
noremap <Leader>w :update<CR>
" 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 <CR>:t''<CR>
+cnoremap $T <CR>:T''<CR>
+cnoremap $m <CR>:m''<CR>
+cnoremap $M <CR>:M''<CR>
+cnoremap $d <CR>:d<CR>``
"-----------------------------------------------------------------------------------------------------------------------
@@ -239,27 +244,6 @@ 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 \ <NOP>
-map <Leader> <Plug>(easymotion-prefix)
-map <Leader>r <Plug>(easymotion-repeat)
-nmap s <Plug>(easymotion-repeat)
-let g:EasyMotion_startofline = 0 " keep cursor colum when JK motion
-map / <Plug>(easymotion-sn)
-omap / <Plug>(easymotion-tn)
-map n <Plug>(easymotion-next)
-map N <Plug>(easymotion-prev)
-"-----------------------------------------------------------------------------------------------------------------------
-
-
-"-----------------------------------------------------------------------------------------------------------------------
" Vdebug Plugin
"-----------------------------------------------------------------------------------------------------------------------
let g:vdebug_options = {
@@ -368,9 +352,18 @@ let g:unite_source_tag_max_fname_length = 80
"-----------------------------------------------------------------------------------------------------------------------
" Fugtive
"-----------------------------------------------------------------------------------------------------------------------
-nnoremap <leader>gs :Gstatus<CR>
nnoremap <leader>gc :Gcommit<CR>
+nnoremap <leader>gd :Gdiff<CR>
nnoremap <leader>gl :Glog<CR>
+function! ToggleGStatus()
+ if buflisted(bufname('.git/index'))
+ bd .git/index
+ else
+ Gstatus
+ endif
+endfunction
+command ToggleGStatus :call ToggleGStatus()
+nnoremap <leader>gs :ToggleGStatus<CR>
"-----------------------------------------------------------------------------------------------------------------------