micro/internal/action
Dmitry Maluka ffbb257434
Support for highlighting all search matches (hlsearch) (#1762)
* Support for highlighting all search matches (hlsearch)

hlsearch is implemented efficiently using the buffer's line array,
somewhat similarly to the syntax highlighting.
Unlike the syntax highlighter which highlights the entire file,
hlsearch searches for matches for the displayed lines only.
Matches are searched when the given line is displayed first time
or after it was modified. Otherwise the previously found matches
are used.

* Add UnhighlightSearch action

and add it to the list of actions triggered by Esc key by default.

* Add comment explaining the purpose of search map

* Add hlsearch colors to colorschemes

Mostly just copied from the corresponding original (mostly vim) colorschemes.

* Highlight matches during/after replace as well

As a side effect it also changes the last search value, i.e. affects FindNext
and FindPrevious, but it's probably fine. In vim it works the same way.

* Improve hlsearch option description
2021-09-28 13:39:03 -07:00
..
actions.go Support for highlighting all search matches (hlsearch) (#1762) 2021-09-28 13:39:03 -07:00
actions_other.go Change project layout and use go.mod 2019-12-25 17:05:10 -05:00
actions_posix.go Fix v2 import path for go mod 2020-05-04 10:16:15 -04:00
bindings.go Fix #2030: warn for invalid pane type 2021-02-18 19:02:23 -05:00
bufpane.go Support for highlighting all search matches (hlsearch) (#1762) 2021-09-28 13:39:03 -07:00
command.go Support for highlighting all search matches (hlsearch) (#1762) 2021-09-28 13:39:03 -07:00
defaults.go Update keybinding docs 2020-09-06 17:38:23 -04:00
defaults_darwin.go Support for highlighting all search matches (hlsearch) (#1762) 2021-09-28 13:39:03 -07:00
defaults_other.go Support for highlighting all search matches (hlsearch) (#1762) 2021-09-28 13:39:03 -07:00
events.go Replace meta with alt automatically, update tcell 2020-09-05 21:59:19 -04:00
globals.go Improve comments 2021-08-21 17:58:30 -04:00
infocomplete.go Add support for copy-paste via OSC 52 2020-07-04 20:00:39 -04:00
infopane.go Make yes/no prompts case-insensitive (#2182) 2021-08-13 23:56:26 -04:00
keytree.go More style improvements 2021-08-21 18:04:08 -04:00
pane.go More style improvements 2021-08-21 18:04:08 -04:00
rawpane.go Update to tcell v2 2020-09-05 14:52:35 -04:00
tab.go Update to tcell v2 2020-09-05 14:52:35 -04:00
terminal_supported.go Check error in terminal emulator 2020-07-27 17:43:55 -04:00
terminal_unsupported.go Use actual lua functions for callbacks instead of strings 2020-02-08 15:49:41 -05:00
termpane.go Fix internal string binding representation 2020-11-05 15:52:25 -05:00