Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mhinz/vim-halo
:innocent: Visual highlight for your cursor.
https://github.com/mhinz/vim-halo
async blink cursor halo highlight neovim vim vim-plugin
Last synced: about 1 hour ago
JSON representation
:innocent: Visual highlight for your cursor.
- Host: GitHub
- URL: https://github.com/mhinz/vim-halo
- Owner: mhinz
- License: mit
- Created: 2016-10-29T18:07:20.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2021-04-04T14:38:55.000Z (over 3 years ago)
- Last Synced: 2024-08-07T18:46:51.661Z (3 months ago)
- Topics: async, blink, cursor, halo, highlight, neovim, vim, vim-plugin
- Language: Vim script
- Homepage:
- Size: 571 KB
- Stars: 49
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# vim-halo
Highlight the cursor by putting blinking shapes around it.
By default, the shape is a halo and the cursor blinks three times. This can be
used to quickly find the cursor after switching buffers etc. Moving the cursor
will stop the blinking immediately.![vim-halo in action](https://raw.githubusercontent.com/mhinz/vim-halo/master/demo.gif)
## Usage
There is only one function `halo#run()`, which takes one optional argument, a
dictionary.The dictionary takes up to 3 keys:
- **hlgroup**: Highlight group as *string*. Default is `Halo` which links to
`IncSearch`.
- **shape**: Shape as a *string*. Can by any of `halo1`, `halo2`, `cross1`,
`cross2`, `cross2halo1`, `rectangle2`, or `line`. Default is `halo1`.
- **intervals**: A *list of numbers*. Calling `halo#run()` immediately shows a
visual highlight. The numbers denote the alternating times visual highlights
are shown and hidden. Thus an odd number of elements is sensible. Given an
even number, the last element is ignored. Default is `[100,100,100,100,100]`.```
:call halo#run()
:call halo#run({'shape': 'cross2halo1'})
:call halo#run({'intervals': [100, 300, 600, 300, 100]})
:call halo#run({'intervals': [200,200,200], 'hlgroup': 'IncSearch'})
```## Examples
Every time you change buffers:
```vim
autocmd BufEnter * call halo#run()
```When navigating the quickfix or location list:
```vim
nnoremap [q :cprevious \| call halo#run()
nnoremap ]q :cnext \| call halo#run()
nnoremap [Q :cfirst \| call halo#run()
nnoremap ]Q :clast \| call halo#run()nnoremap [l :lprevious \| call halo#run()
nnoremap ]l :lnext \| call halo#run()
nnoremap [L :lfirst \| call halo#run()
nnoremap ]L :llast \| call halo#run()
```Use colors from another highlight group:
```vim
highlight link Halo Search
```Or define your own colors:
```vim
highlight Halo guifg=white guibg=#F92672 ctermfg=white ctermbg=197
```## Disclaimer
Only the `line` shape works works with wrapped lines!