Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/qtc-de/highlight-line
highlight specific lines within vi decoupled from visual mode
https://github.com/qtc-de/highlight-line
highlight-lines highlighting vim vim-plugin
Last synced: about 1 month ago
JSON representation
highlight specific lines within vi decoupled from visual mode
- Host: GitHub
- URL: https://github.com/qtc-de/highlight-line
- Owner: qtc-de
- License: gpl-3.0
- Created: 2023-07-30T20:02:15.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-07-30T20:19:46.000Z (over 1 year ago)
- Last Synced: 2024-10-15T03:50:11.446Z (3 months ago)
- Topics: highlight-lines, highlighting, vim, vim-plugin
- Language: Vim Script
- Homepage:
- Size: 20.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
### highlight-line
----
*highlight-line* is a super small vim plugin that allows you to
highlight lines in vi. In contrast to visual mode selection, the
highlight stays active even when the cursor moves. This makes
it easier to keep track of important lines that you want to keep
focus on.![image](https://github.com/qtc-de/highlight-line/assets/49147108/43135ba0-deb5-483c-ad13-f7ef4ddb7f69)
### Installation
----
*highlight-line* is structured according to vim's plugin specifications
and can be consumed by vim's native package manager as well as by several
other tools like *Vundle* or *Pathogen*.If you use vim's native package manager, just clone the repository in
either the `start` or `opt` folder of your vim configuration folder:```console
[user@host ~]$ cd ~/.vim/pack/plugins/start/
[user@host ~/.vim/pack/plugins/start/]$ git clone https://github.com/qtc-de/highlight-line
```If you have chosen the `start` folder, *highlight-line* will be available on
each startup of vim. If you decided to use the `opt` folder, you have to call
`:packadd highlight-line` from within vi to enable it.If you use an external package manager please read the corresponding manual
on how to add additional plugins.### Usage
----
*highlight-line* defines key mappings with identical functionality for normal
and visual mode. While the visual mode mappings operate on the data that has been
selected, the normal mode mappings always operate on the current line.The following mappings are currently defined (notice that each key combination needs
to be prefixed by your `` key):**Normal Mode Mappings**
| Key |Description |
|:---------:|-------------------------------------------------------------|
| hh | Highlight the current line in dark grey |
| hr | Highlight the current line in dark red |
| hy | Highlight the current line in dark yellow |
| hg | Highlight the current line in dark green |
| hb | Highlight the current line in dark blue |
| H | Remove highlighting from the current line |
| hc | Remove highlighting everywhere |**Visual Mode Mappings**
| Key |Description |
|:---------:|-------------------------------------------------------------|
| hh | Highlight the selected line(s) in dark grey |
| hr | Highlight the selected line(s) in dark red |
| hy | Highlight the selected line(s) in dark yellow |
| hg | Highlight the selected line(s) in dark green |
| hb | Highlight the selected line(s) in dark blue |
| H | Remove highlighting from the selected line(s) |
| hc | Remove highlighting from the selected line(s) |### Acknowledgments
----
The implementation is basically the same as suggested by [Colin Bartlett](https://vimtricks.com/p/author/cbartlett/)
in his vimtricks article [Highlight specific lines](https://vimtricks.com/p/highlight-specific-lines/).