HTMLxC.vim : Edit hex color codes in HTML files easily using rgb decimal; Perl req'd.
script karma |
Rating 1/1,
Downloaded by 867 |
Comments, bugs, improvements
|
Vim wiki
|
created by |
Sören Andersen |
|
script type |
utility |
|
description |
I've found that the default installed programs on my platform include several that specify colors as decimal r,g,b but none offer to show the color as the hexadecimal triplet used in HTML. It got to be very annoying to have to use a color browser or other graphics tool, then manually convert a color I liked to hex, before being able to even try out a color in a Web page I was building.
This small plugin utility just identifies the hex color spec under the cursor and pop-up dialogs (on GUI Vim) or prompts on the Vim commandline (on console Vim) for a decimal r g b -style spec (space-separated) and then inserts it as hex in replacement of the existing hex string. |
|
install details |
Requires that Vim have been compiled with support for Perl (embedded perl interpreter). Someone is likely to come along and say this can be written in Vim w/o Perl. That's fine. I like programming in Perl. I like my Vim to have Perl.
Just place the HTMLxC.vim file in a plugin/ dir in one of your $VIMRUNTIME locations. It then can be loaded with an \"au\" command from an initialization script or explicitly w/ \":runtime!\" or \":source\". It does a key mapping ... <leader>* (literally asterix) to call the plugin function. |
|
script versions (upload new version)
Click on the package to download.
ip used for rating: 18.188.103.74
|