Loupe : Enhanced in-file search for Vim
| script karma
Downloaded by 473
Comments, bugs, improvements
script versions (upload new version)
|Loupe enhances Vim's |search-commands| in four ways:
1. Makes the currently selected match easier to see ~
When searching using |/|, |?|, |star|, |#|, |n|, |N| or similar, it can be hard to see
the "current" match from among all the matches that 'hlsearch' highlights.
Loupe makes the currently selected match easier to see by:
- Applying a different |:highlight| group (by default, |hl-IncSearch|) to the
match under the cursor.
- Keeping the matching line centered within the window when jumping between
matches with |n| and |N|.
2. Applies sane pattern syntax by default ~
Loupe makes "very magic" (|/\v|) syntax apply by default when searching. This
is true even if you initiate a search via a novel means, such as from a visual
selection or with a complicated |:range| prefix.
This means that you can use a pattern syntax closer to the familiar regular
other modern languages that support regular expressions).
3. Provides a shortcut to remove search highlighting ~
Loupe maps <leader>n to quickly remove all 'hlsearch' highlighting (although
you can provide an alternative mapping of your choosing or suppress the
4. Sensible defaults for search-related features ~
Loupe provides reasonable defaults for most search-related Vim settings to
provide a good "out of the box" experience. For more details, or to see how to
override Loupe's settings, see |loupe-overrides|.
Click on the package to download.
ip used for rating: 220.127.116.11
||- Match default Vim behavior of opening folds when jumping to a match.
||- Suppress unwanted cursor movement after |<Plug>(LoupeClearHighlight)| and
when using |:nohighlight|.
- Expose |loupe#hlmatch()| (previously was a private function) for users who
wish to do low-level intergration with other plug-ins.
- Provide |<Plug>| mappings for |star|, |#|, |n|, |N|, |gstar|, |g#| (see
|<Plug>(LoupeStar)|, |<Plug>(LoupeOctothorpe)|, |<Plug>(Loupen)|,
|<Plug>(LoupeN)|, |<Plug>(LoupeGStar)|, |<Plug>(LoupeGOctothorpe)|).
||- Make compatible with older versions of Vim that do not have |v:hlsearch|.
- Add support for special delimiters with |:substitute| command.
||- Renamed the |<Plug>LoupeClearHighlight| mapping to