diff --git a/init.vim b/init.vim index ee54efb..0acfe76 100644 --- a/init.vim +++ b/init.vim @@ -128,17 +128,17 @@ nnoremap es :source $MYVIMRC "Changing unused ctrl bindings "Turn on git blame -nnoremap GBlame +nnoremap Git blame "List all tags in the current buffer (replaced pageup, use CTRL-u instead) nnoremap BTags "List all tags in directory -nnoremap Tags +"nnoremap Tags "List all the recently opened files (replaced scroll one line up, use "k") nnoremap History "Search within the current buffer (replaced pagedown, use CTRL-d instead) -nnoremap / +"nnoremap / "Search within the whole project -nnoremap Rg +nnoremap Rg "Move line down (uses vim-unimpaired) (replaced move down, use "j") nnoremap "Move line up (uses vim-unimpaired) (replaced move up, use "k") @@ -265,7 +265,7 @@ nnoremap em :call ToggleEmmet() set conceallevel=3 let g:AutoPairsFlyMode = 1 -let g:AutoPairsShortcutBackInsert = '' " Use to insert the closing parentheses if it jumped ahead by mistake +let g:AutoPairsShortcutBackInsert = '' " Use to insert the closing parentheses if it jumped ahead by mistake let g:chadtree_settings = { \ 'theme': { @@ -313,6 +313,21 @@ let g:chadtree_settings = { " }}} +" PHP --- {{{ +" function! RunPHPUnitTest() +" cd %:p:h +" normal! T yw +" let result = system("phpunit --filter " . @" . " " . bufname("%")) +" split __PHPUnit_Result__ +" normal! ggdG +" setlocal buftype=nofile +" call append(0, split(result, '\v\n')) +" cd - +" endfunction + +" nnoremap :call RunPHPUnitTest() +" }}} + " Moving around --- {{{ "Use capital H and L to move to the start and end of lines nnoremap H ^ @@ -371,6 +386,8 @@ augroup END augroup autosaving autocmd! autocmd FocusLost * silent! wa "Save all files when moving away from the window + autocmd InsertLeave * silent! wa "Save all files when leaving insert mode + autocmd TextChanged * silent! wa "Save all files when text is changed augroup END augroup modes