From 926819bc6a156bc909af67d354142fa8e727ea9a Mon Sep 17 00:00:00 2001 From: Chris Date: Sun, 3 May 2020 22:00:46 -0400 Subject: configured sneak and quickscope --- init.vim | 4 +++- plug-config/easymotion.vim | 44 ++++++++++++++++++++++++++++++++++++-------- plug-config/signify.vim | 4 ++-- plug-config/sneak.vim | 34 ++++++++++++++++++++++++++++++++++ vim-plug/plugins.vim | 7 ++++--- 5 files changed, 79 insertions(+), 14 deletions(-) diff --git a/init.vim b/init.vim index a0e65611..b693431d 100644 --- a/init.vim +++ b/init.vim @@ -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 j (easymotion-j) +" map k (easymotion-k) + +" nmap s (easymotion-s2) +" nmap t (easymotion-t2) + +" TODO add separate section for vscode + +" map f (easymotion-bd-f) +" nmap f (easymotion-overwin-f) -" JK motions: Line motions -map j (easymotion-j) -map k (easymotion-k) +" s{char}{char} to move to {char}{char} +nmap s (easymotion-overwin-f2) +" nmap S (easymotion-overwin-t) -nmap s (easymotion-s2) -nmap t (easymotion-t2) +" Move to line +map l (easymotion-bd-jk) +nmap l (easymotion-overwin-line) +" Move to word +map w (easymotion-bd-w) +nmap w (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 gj (signify-next-hunk) -nmap gk (signify-prev-hunk) +nmap j (signify-next-hunk) +nmap k (signify-prev-hunk) nmap gJ 9999gj nmap gK 9999gk 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 Sneak_f +" map F Sneak_F +" map t Sneak_t +" map T Sneak_T + +" remap so I can use , and ; with f and t +map gS Sneak_, +map gs 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 | Repeat the last Sneak. +" S | Repeat the last Sneak, in reverse direction. +" silent! call repeat#set("\Sneak_s", v:count) +" silent! call repeat#set("\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 -- cgit v1.2.3