Vim Tips Wiki
Explore
Main Page
All Pages
Community
Interactive Maps
Community portal
To do
FANDOM
Fan Central
BETA
Games
Anime
Movies
TV
Video
Wikis
Explore Wikis
Community Central
Start a Wiki
Don't have an account?
Register
Sign In
Sign In
Register
Vim Tips Wiki
1,649
pages
Explore
Main Page
All Pages
Community
Interactive Maps
Community portal
To do
Editing
Highlight multiple words
(section)
Back to page
Edit
Edit source
View history
Talk (6)
We recommend that you
log in
before editing. This will allow other users to leave you a message about your edit, and will let you track edits via your
Watchlist
.
Creating an account
is quick and free.
Anti-spam check. Do
not
fill this in!
==Defining highlight groups== The script reads a [[CSV]] file with the same directory/name as the script, but with <code>.csv</code> extension. Each line should consist of five comma-separated fields, where the first field is a number from 1 to 99 inclusive (any other lines are ignored). For example, the line "<code>5,white,blue,black,green</code>" would define a highlight group named <code>hl5</code> which color terminals would display as white on blue, and gvim would display as black on green. Create file <code>~/.vim/plugin/highlights.csv</code> (Unix) or <code>$HOME/vimfiles/plugin/highlights.csv</code> (Windows) containing the sample below, then restart Vim. <pre> hlnum,ctermfg,ctermbg,guifg,guibg 1,red,,red, 2,green,,green, 3,blue,,blue, 4,black,magenta,black,IndianRed 5,black,green,black,chartreuse 6,black,cyan,black,DeepSkyBlue 7,white,DarkRed,white,firebrick 8,white,DarkGreen,white,DarkGreen 9,white,DarkBlue,white,DarkSlateBlue 11,,,black,thistle 12,,,black,burlywood 13,,,black,PowderBlue 14,,,black,peru 15,,,black,DarkSeaGreen 16,,,black,SteelBlue 17,,,black,DarkOrange 18,,,black,DarkOliveGreen 19,,,black,SlateGray 21,,,red,grey20 22,,,green,grey20 23,,,CornflowerBlue,grey20 24,,,red,grey40 25,,,green,grey40 26,,,blue,grey40 27,,,red,grey70 28,,,DarkGreen,grey70 29,,,blue,grey70 </pre>
Summary:
Please note that all contributions to the Vim Tips Wiki are considered to be released under the CC-BY-SA
Cancel
Editing help
(opens in new window)
Follow on IG
TikTok
Join Fan Lab