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

Feature request - highlight current match differently to other matches #119

Open
pmcRTR opened this issue Aug 30, 2016 · 4 comments
Open

Comments

@pmcRTR
Copy link

pmcRTR commented Aug 30, 2016

There is a discussion here: https://stackoverflow.com/questions/7198579/highlight-current-search-result-in-vim

And there is this plugin (mentioned in the discussion): https://github.com/timakro/vim-searchant

However, installing that plugin breaks incsearch (mapping for n, N etc. stop working)

Is there any way to highlight the current match (the match that is currently under the cursor) differently to all the other matches in the buffer and have the current match move when the cursor moves with n, N - can this functionality be added directly to incsearch?

@pmcRTR pmcRTR changed the title Highlight current match differently to other matches Feature request - highlight current match differently to other matches Aug 30, 2016
@pmcRTR
Copy link
Author

pmcRTR commented Oct 13, 2016

Would be nice to do /[text][press enter] and then be able to use n / N and have the highlight follow but I just realised that I could get similar functionality to this from incsearch by searching and then using the tab key to jump to matches - that way the highlight for the current match follows the cursor. That's OK for my needs :)

@pmcRTR pmcRTR closed this as completed Oct 13, 2016
@MarcelRobitaille
Copy link

I would love this feature. Can we get this revisited?

@pmcRTR
Copy link
Author

pmcRTR commented Jun 21, 2017

I would still like this feature especially as I realised just now that the workaround I mentioned when I closed this one doesn't seem to work anymore :(

Any chance my original feature request could be implemented?

@pmcRTR pmcRTR reopened this Jun 21, 2017
@benwoodward
Copy link

@pmcRTR I know this is ~3yrs too late(!) but I just ran into this issue and this was the workaround I used:

" Disable Searchant highlight when incsearch.vim highlights also disable
autocmd CursorMoved * call SearchantStop()
function SearchantStop()
  :execute "normal \<Plug>SearchantStop"
endfunction

Not sure if that solves the problem you were describing though.

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

No branches or pull requests

3 participants