Bug 449641

Summary: Highlight matched word(s) upon jumping to next/previous whole word under cursor
Product: [Applications] kate Reporter: Om <ombrophile>
Component: Vi Input ModeAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version First Reported In: 21.12.1   
Target Milestone: ---   
Platform: Neon   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Om 2022-02-05 09:15:08 UTC
SUMMARY
When the keyboard shortcut `*` or `#` is pressed in normal mode, the cursor jumps to the respective next or previous occurrence of the word which was under the cursor. Although this feature works nicely with Kate (or Kwrite), it does not highlight the relevant sets of words. It would be very helpful if, like in Vim, the relevant word is highlighted as well.


STEPS TO REPRODUCE
1.  Open a document in Kate with Vi input mode enabled.
2. Move the cursor over a word.
2.  Press `*` or `#` to jump to the next or previous entry of the word in the document.

OBSERVED RESULT
Althought the cursor jumps to the relevant location, the set of words being jump over are not highlighted.


EXPECTED RESULT
The word should be highlighted when `*` or `#` is pressed.

SOFTWARE/OS VERSIONS
KDE Plasma
KDE Plasma Version: 5.23.5
KDE Frameworks Version: 5.90.0
Qt Version: 5.15.3
Comment 1 Om 2022-02-05 09:43:13 UTC
Created a separate issue https://bugs.kde.org/show_bug.cgi?id=449643 which might be related to this.
Comment 2 Bug Janitor Service 2022-02-22 17:29:44 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/ktexteditor/-/merge_requests/293
Comment 3 Christoph Cullmann 2022-03-02 17:21:28 UTC
Git commit 1b08a07265b49be78a55d07904adeaabb7b05ab2 by Christoph Cullmann, on behalf of Martin Seher.
Committed on 02/03/2022 at 17:13.
Pushed by cullmann into branch 'master'.

vimode: implement hlsearch

This adds vim hlsearch functionality to vimode. All matching patterns
found inside the view visible range will be highlighted when a search is
initiated from vimode.
The feature is turned on by default like in vim.

The following commands have been added:
-) set-hlsearch, set-hls to turn it on (vim :set hls[earch])
-) set-nohlsearch, set-nohls to turn it off (vim :set nohls[earch])
-) nohlseach, noh to hide current highlights (vim :noh[lsearch])
Related: bug 449643

M  +13   -0    src/vimode/cmds.cpp
M  +2    -0    src/vimode/emulatedcommandbar/searchmode.cpp
M  +119  -1    src/vimode/searcher.cpp
M  +24   -1    src/vimode/searcher.h

https://invent.kde.org/frameworks/ktexteditor/commit/1b08a07265b49be78a55d07904adeaabb7b05ab2