RRethy / vim-illuminate

illuminate.vim - (Neo)Vim plugin for automatically highlighting other uses of the word under the cursor using either LSP, Tree-sitter, or regex matching.
2.19k stars 50 forks source link

Only wrap to first or last reference if wrapscan is set #121

Closed PowerUser64 closed 2 years ago

PowerUser64 commented 2 years ago

This adds two checks for the wrapscan setting as well as error messages to be more consistent with (neo)vim's built-in # and * mappings that accomplish a similar task to this plugin's <a-p> and <a-n> mappings, respectively. This is especially useful when executing macros because it allows for the macro to error and stop if it has reached the last reference.