Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/flatcap/vim-keyword
⚙ Vim Plugin - Temporary keyword highlighting
https://github.com/flatcap/vim-keyword
highlight keywords plugin script vim
Last synced: 24 days ago
JSON representation
⚙ Vim Plugin - Temporary keyword highlighting
- Host: GitHub
- URL: https://github.com/flatcap/vim-keyword
- Owner: flatcap
- License: other
- Created: 2015-03-24T01:44:24.000Z (almost 10 years ago)
- Default Branch: main
- Last Pushed: 2022-06-12T19:25:16.000Z (over 2 years ago)
- Last Synced: 2024-11-18T07:06:21.727Z (3 months ago)
- Topics: highlight, keywords, plugin, script, vim
- Language: Vim script
- Homepage:
- Size: 22.5 KB
- Stars: 3
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# keyword.vim
Temporary keyword highlighting
With this plugin you can temporarily highlight any words you like.
The words are defined by the 'iskeyword' variable.The highlights are buffer-local, i.e. different for each file.
After highlighting, the search pattern is set to the work, so you can skip
between matches with 'n' or 'N'.## Mapping
To enable the plugin, simply create a mapping in your '.vimrc'
e.g.```viml
map KeywordToggle
```## Configuration
Two global variables control the syntax highlight group and the colour.
```viml
let g:keyword_group = 'keyword_group'
let g:keyword_highlight = 'ctermbg=blue'
```## List
The list of keywords is kept in the variable "b:keyword_list".
You can display the list by typing either:```viml
:call keyword#KeywordList()echo b:keyword_list
```## Functions
The plugin exports five autoload functions (their names are self-explanatory).
You can call them directly from a script.```viml
call keyword#KeywordClear()
call keyword#KeywordAdd ('my_keyword')
call keyword#KeywordRemove ('my_keyword')
call keyword#KeywordToggle ('my_keyword')
call keyword#KeywordList()
```## License
Copyright © Richard Russon (flatcap).
Distributed under the GPLv3## See also
- [flatcap.org](https://flatcap.org)
- [GitHub](https://github.com/flatcap/vim-keyword)