GitHub - lilydjwg/colorizer: A Vim plugin to colorize all text in the form #rrgg...

 4 years ago
source link: https://github.com/lilydjwg/colorizer
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.



A Vim plugin to colorize all text in the form #rgb, #rgba, #rrggbb, #rrgbbaa, rgb(...), rgba(...). See the comment at the beginning of the plugin for more options.



screenshot The left screen shows colortest.txt in Vim in xfce4-terminal. The right screen shows colortest.txt in gVim.


Pathogen, Vundle, etc.

cd ~/.vim/bundle
git clone https://github.com/lilydjwg/colorizer


Use make install and make uninstall to quickly install/uninstall the script, or simply copy plugin/colorizer.vim and autoload/colorizer.vim to your .vim dir.


This version is based on https://github.com/lilydjwg/colorizer, also found as colorizer.vim on vim.org

Known issues

This plugin is still inefficient for large files. I strongly sugguest you enable it only when you need it, or set the g:colorizer_maxlines variable, e.g. to 1000. There seems to be no way to get current displaying lines and do work with them in Vim.

About Joyk

Aggregate valuable and interesting links.
Joyk means Joy of geeK