1
0
mirror of https://github.com/jdhao/nvim-config.git synced 2025-06-08 14:14:33 +02:00

replace vim-sneak with hop.nvim

This commit is contained in:
jdhao 2021-10-18 22:53:22 +08:00
parent 66be7b9379
commit 71040c76c6
3 changed files with 5 additions and 18 deletions

View File

@ -48,21 +48,6 @@ command! -nargs=0 StartVlime call jobstart(printf("sbcl --load %s/vlime/lisp/sta
"}}
"{{ Search related
"""""""""""""""""""""""""""""vim-sneak settings"""""""""""""""""""""""
" Use sneak label mode
let g:sneak#label = 1
nmap f <Plug>Sneak_s
xmap f <Plug>Sneak_s
onoremap <silent> f :call sneak#wrap(v:operator, 2, 0, 1, 1)<CR>
nmap F <Plug>Sneak_S
xmap F <Plug>Sneak_S
onoremap <silent> F :call sneak#wrap(v:operator, 2, 1, 1, 1)<CR>
" Immediately after entering sneak mode, you can press f and F to go to next
" or previous match
let g:sneak#s_next = 1
""""""""""""""""""""""""""""" settings for nvim-hlslens"""""""""""""""
noremap <silent> n <Cmd>execute('normal! ' . v:count1 . 'nzzzv')<CR>
\<Cmd>lua require('hlslens').start()<CR>

3
lua/config/nvim_hop.lua Normal file
View File

@ -0,0 +1,3 @@
require('hop').setup()
vim.api.nvim_set_keymap('n', 'f', "<cmd>lua require'hop'.hint_char2()<cr>", {noremap = true})

View File

@ -61,9 +61,8 @@ require("packer").startup({
use({ "vlime/vlime", rtp = "vim/", ft = { "lisp" } })
end
-- Super fast movement with vim-sneak
use({"justinmk/vim-sneak", event = "VimEnter"})
use { 'phaazon/hop.nvim', event = "VimEnter", config = [[require('hop').setup()]] }
-- Super fast buffer jump
use { 'phaazon/hop.nvim', event = "VimEnter", config = [[require('config.nvim_hop')]] }
-- Clear highlight search automatically for you
use({"romainl/vim-cool", event = "VimEnter"})