diff options
author | Chris <[email protected]> | 2020-05-03 22:00:46 -0400 |
---|---|---|
committer | Chris <[email protected]> | 2020-05-03 22:00:46 -0400 |
commit | 926819bc6a156bc909af67d354142fa8e727ea9a (patch) | |
tree | 727cef6a50b08b3c1eab2c9e8d618e99c265bf3e | |
parent | 5f0eee0dd9e132f66a292957de170334a0e22f0a (diff) |
configured sneak and quickscope
-rw-r--r-- | init.vim | 4 | ||||
-rw-r--r-- | plug-config/easymotion.vim | 44 | ||||
-rw-r--r-- | plug-config/signify.vim | 4 | ||||
-rw-r--r-- | plug-config/sneak.vim | 34 | ||||
-rw-r--r-- | vim-plug/plugins.vim | 7 |
5 files changed, 79 insertions, 14 deletions
@@ -26,11 +26,13 @@ else source $HOME/.config/nvim/plug-config/commentary.vim source $HOME/.config/nvim/plug-config/rainbow.vim source $HOME/.config/nvim/plug-config/coc.vim - source $HOME/.config/nvim/plug-config/sneak.vim source $HOME/.config/nvim/plug-config/quickscope.vim + source $HOME/.config/nvim/plug-config/sneak.vim + "source $HOME/.config/nvim/plug-config/easymotion.vim source $HOME/.config/nvim/plug-config/start-screen.vim source $HOME/.config/nvim/plug-config/signify.vim source $HOME/.config/nvim/plug-config/fugitive.vim source $HOME/.config/nvim/plug-config/gv.vim luafile $HOME/.config/nvim/lua/plug-colorizer.lua endif + diff --git a/plug-config/easymotion.vim b/plug-config/easymotion.vim index 0bab210a..0a94ea7f 100644 --- a/plug-config/easymotion.vim +++ b/plug-config/easymotion.vim @@ -1,11 +1,39 @@ -let g:EasyMotion_do_mapping = 0 " Disable default mappings -" Turn on case-insensitive feature -let g:EasyMotion_smartcase = 1 +" let g:EasyMotion_do_mapping = 0 " Disable default mappings +" " Turn on case-insensitive feature +" let g:EasyMotion_smartcase = 1 + +" " JK motions: Line motions +" map <Leader>j <Plug>(easymotion-j) +" map <Leader>k <Plug>(easymotion-k) + +" nmap s <Plug>(easymotion-s2) +" nmap t <Plug>(easymotion-t2) + +" TODO add separate section for vscode + +" map <Leader>f <Plug>(easymotion-bd-f) +" nmap <Leader>f <Plug>(easymotion-overwin-f) -" JK motions: Line motions -map <Leader>j <Plug>(easymotion-j) -map <Leader>k <Plug>(easymotion-k) +" s{char}{char} to move to {char}{char} +nmap s <Plug>(easymotion-overwin-f2) +" nmap S <Plug>(easymotion-overwin-t) -nmap s <Plug>(easymotion-s2) -nmap t <Plug>(easymotion-t2) +" Move to line +map <Leader>l <Plug>(easymotion-bd-jk) +nmap <Leader>l <Plug>(easymotion-overwin-line) +" Move to word +map <Leader>w <Plug>(easymotion-bd-w) +nmap <Leader>w <Plug>(easymotion-overwin-w) + +hi link EasyMotionTarget ErrorMsg +hi link EasyMotionShade Comment + +hi link EasyMotionTarget2First MatchParen +hi link EasyMotionTarget2Second MatchParen + +hi link EasyMotionMoveHL Search +hi link EasyMotionIncSearch Search + +"Lower case finds upper & lower case but upper case only finds upper case +let g:EasyMotion_smartcase = 1 diff --git a/plug-config/signify.vim b/plug-config/signify.vim index 08211b83..610cc0b4 100644 --- a/plug-config/signify.vim +++ b/plug-config/signify.vim @@ -10,8 +10,8 @@ let g:signify_sign_show_text = 1 " Jump though hunks -nmap <leader>gj <plug>(signify-next-hunk) -nmap <leader>gk <plug>(signify-prev-hunk) +nmap <leader>j <plug>(signify-next-hunk) +nmap <leader>k <plug>(signify-prev-hunk) nmap <leader>gJ 9999<leader>gj nmap <leader>gK 9999<leader>gk diff --git a/plug-config/sneak.vim b/plug-config/sneak.vim index b3e8f561..3bf54db2 100644 --- a/plug-config/sneak.vim +++ b/plug-config/sneak.vim @@ -1 +1,35 @@ +" ; repeat forward , repeat backwards let g:sneak#label = 1 + +" case insensitive sneak +let g:sneak#use_ic_scs = 1 + +" imediately move tot the next instance of search, if you move the cursor sneak is back to default behavior +let g:sneak#s_next = 1 + +" I wanted more options idc about pressing the same key twice +" let g:sneak#target_labels = ";abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ?0" + +" Cool prompts +" let g:sneak#prompt = '🕵' +" let g:sneak#prompt = '🔎' + +" I like quickscope better for this since it keeps me in the scope of a single line +" map f <Plug>Sneak_f +" map F <Plug>Sneak_F +" map t <Plug>Sneak_t +" map T <Plug>Sneak_T + +" remap so I can use , and ; with f and t +map gS <Plug>Sneak_, +map gs <Plug>Sneak_; + +" Change the colors +highlight Sneak guifg=black guibg=#00C7DF ctermfg=black ctermbg=cyan +highlight SneakScope guifg=red guibg=yellow ctermfg=red ctermbg=yellow + +" Useful info +" s<Enter> | Repeat the last Sneak. +" S<Enter> | Repeat the last Sneak, in reverse direction. +" silent! call repeat#set("\<Plug>Sneak_s", v:count) +" silent! call repeat#set("\<Plug>Sneak_S", v:count) diff --git a/vim-plug/plugins.vim b/vim-plug/plugins.vim index 13391190..df5d76f1 100644 --- a/vim-plug/plugins.vim +++ b/vim-plug/plugins.vim @@ -28,6 +28,10 @@ call plug#begin('~/.config/nvim/autoload/plugged') Plug 'asvetliakov/vim-easymotion' else + " Text Navigation + Plug 'justinmk/vim-sneak' + Plug 'unblevable/quick-scope' + " Plug 'easymotion/vim-easymotion' " Add some color Plug 'norcalli/nvim-colorizer.lua' Plug 'junegunn/rainbow_parentheses.vim' @@ -71,9 +75,6 @@ call plug#begin('~/.config/nvim/autoload/plugged') " Plug 'SirVer/ultisnips' " Better Comments Plug 'jbgutierrez/vim-better-comments' - " Text Navigation - Plug 'justinmk/vim-sneak' - Plug 'unblevable/quick-scope' endif |