Created attachment 146302 [details] sample.txt SUMMARY In Vim, a pattern can be searched for using the keyboard shortcut `/` in normal mode. Although this feature (and subsequent shortcuts like `n` and `N`) nicely works in Kate (or Kwrite), it does not highlight the relevant pattern in the document (the pattern is highlighted only upon __disabling__ Vi input mode and using Kate's builtin search feature). It would be helpful, if the search pattern is also highlighted when using the Vi-mode shortcut. STEPS TO REPRODUCE 1. Open the attached file `sample.txt` in Kate with Vi input mode enabled. 2. In normal mode, search for the pattern `hello world` using the keyboard shortcut `/`. 3. Search for the pattern again using Edit->Find. 4. Now turn off Vi input mode. 5. Once again search for the pattern using Edit->Find. OBSERVED RESULT Although the cursor jumps to the next found pattern in steps 2 and 3, the patterns in these cases are not highlighted. However, the patterns are highlighted after steps 4 and 5. EXPECTED RESULT The search pattern ought to be highlighted when Vi input mode is enabled (as well as when using the Vi shortcut `/`). SOFTWARE/OS VERSIONS KDE Plasma KDE Plasma Version: 5.23.5 KDE Frameworks Version: 5.90.0 Qt Version: 5.15.3
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/ktexteditor/-/merge_requests/293
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 449641 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