configured sneak and quickscope

This commit is contained in:
Chris 2020-05-03 22:00:46 -04:00
parent 5f0eee0dd9
commit 926819bc6a
5 changed files with 81 additions and 16 deletions

View file

@ -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

View file

@ -1,11 +1,39 @@
let g:EasyMotion_do_mapping = 0 " Disable default mappings
" Turn on case-insensitive feature
" 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)
" s{char}{char} to move to {char}{char}
nmap s <Plug>(easymotion-overwin-f2)
" nmap S <Plug>(easymotion-overwin-t)
" 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
" 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)

View file

@ -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

View file

@ -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)

View file

@ -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