Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No jumping and reselect last selection #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

masell
Copy link

@masell masell commented Mar 21, 2019

Makes * search of visual selection not jump.
Re-selects your visual selection with gv so you can change it more easy.
Sets hls so you see the matches.

@ngtinsmith
Copy link

ngtinsmith commented Aug 9, 2020

Can confirm, this prevents the selection from jumping.

Another small adjustment would be to return to NORMAL mode from VISUAL mode so manually jumping (n / N) will not select the content in-between the jump range.

xnoremap * :<C-u>call <SID>VSetSearch('/')<CR>:set hls<CR>gv<Esc>

Edit: Scratch that, just omit gv to not enter VISUAL mode, no need to pipe <Esc> (my preference)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants