Commit graph

46 commits

Author SHA1 Message Date
Jason Stewart 0ab91fef88 special handling for mawk/gawk/goawk 2025-10-31 21:23:10 -04:00
Jason Stewart bb61373c80 Less obnoxious warning style when necessary Vim features are missing. 2024-12-23 23:12:34 -05:00
Jason Stewart a978dcfa6e - only require 'termguicolors' outside of gvim 2022-01-10 21:13:13 -05:00
Jason Stewart 2f8dedb437 see colors as you type them 2022-01-04 09:37:01 -05:00
Jason Stewart c16ec24419 visual mode / multiline / sort bugfixes
- use log file instead of buffer for debug messages
- fixed line-indice sort bug (had to specify 'f' for numeric)
- reduced b: level state
- remove textprops on callback '--begin--' instead of write

- track begin/end of lines
- fixed case-sensitivity begin/end bug
2022-01-04 06:07:10 -05:00
Jason Stewart 200f7d2ec3 preserve foreign text props
use a specific `prop_clear()` (id 777) to only clear `clrzr` text props,
while leaving others intact

more `changedtick` tracking
2022-01-03 19:25:35 -05:00
Jason Stewart 750a8732f4 - use modified marks for selective updates 2022-01-03 17:29:50 -05:00
Jason Stewart 3b2e80865a buffer iteration logic
- updated RebuildTextProps() to operate on an explicit buffer number
- updated RebuildTextProps() to skip unloaded and/or hidden buffers
- updated enable/refresh/clear all buffer operations to loop over
`getbufinfo()` instead of using `bufdo` command
2022-01-02 14:38:48 -05:00
Jason Stewart 372a915469 using textprop instead of matches
- updated color parsers to all return RGBA lists
- split alpha-disabled match pruning out into s:UnHlAlpha()
- g:clrzr_maxlines guarding
- single awk job, instead of per-window
- updated awk script to reflect buffer# back to vim
- have plugin check for textprop, termguicolors, ##TextChanged.  echoerr
if missing.
- removed most ...Window() functions & window-specific properties
2022-01-02 13:03:39 -05:00
Jason Stewart e39046cc3d comment fix, echomsg removal 2022-01-02 05:23:26 -05:00
Jason Stewart 40b5f6083c - updated ProcessMatch() to use positional syntax highlights
instead of regex ones (performance)
- updated awk script to return syntax positions & end-of-input
- awk job options: attempt non-blocking, kill on exit
- added `b_reparse` parameter to s:EnableWindow()
- more autocmd adjustments (insert & normal mode handlings)
2022-01-02 05:16:54 -05:00
Jason Stewart db901e80f7 - simplified window<>channel mapping
- track dirty line range during insert mode, update on exit
2022-01-01 13:04:50 -05:00
Jason Stewart b87f553394 case sensitivity adjustments 2022-01-01 11:04:48 -05:00
Jason Stewart bf478bc075 gitignore 2022-01-01 10:32:31 -05:00
Jason Stewart a96a8bb062 - run awk as a job per-window to filter color codes
(formerly started an awk for EVERY change!)
2022-01-01 10:27:50 -05:00
Jason Stewart d83a62ee68 AWK Pattern Matching Enhancement 2022-01-01 00:30:17 -05:00
Jason Stewart 902370e431 - TODO removal
- helptags notes
2021-12-31 10:43:08 -05:00
Jason Stewart 66e4c4f446 - renamed script (nearly everything has been extensively re-worked)
- renamed commands to Clrzr... (shorter, & avoids likely name collisions)
- refactored commands to differentiate between session-wide & window-only operations
- stripped out leader bindings
- per-window alpha toggle
- hoisted get background color outside of syntax parse loop
- process up to g:clrzr_maxlines instead of skipping file entirely
- removed hlexists() check to fix bug during :colorscheme change
	(highlights remain, even after all corresponding matches are removed)
- major surgery on autocmds
2021-12-31 09:57:16 -05:00
Jason Stewart 3ce0ef8ab0 HSL+HSLA support, improved alpha regex
- hsl, hsla support
- some regex harmonization between searcher & extractor
- handle percentages w/ decimals
- handle decimals without a leading digit
- generic alpha-extraction function
2021-12-30 04:25:27 -05:00
Jason Stewart e73911fc8f param guarding for s:RgbaColor & s:IntAlphaMix 2021-12-29 22:12:58 -05:00
Jason Stewart 1b7e1b52f2 alpha escaping fixes for rgba 2021-12-29 21:59:27 -05:00
Jason Stewart 9462746c4d - fixed break instead of return in color matchers
- support percentages for alpha component in rgba() syntax
2021-12-29 21:40:49 -05:00
Jason Stewart f7e9691e1c killed xterm paletted color matching
- changed extension of README
- added notes on README.md on how to get `termguicolors`
  under true-color terminals
- removed Makefile
- removed xterm palette matching
  (close is not good enough, best not to try )
- disable plugin if `termguicolors` is not == 1
- added hsl items to colortest.txt for future addition
- added :ColorAlphaPosToggle command
2021-12-29 18:50:51 -05:00
Jason Stewart 69f10b66bb Version 1.5
- updated script headers
- created helpfile
2021-12-29 18:18:05 -05:00
Jason Stewart 1e9fbb799a wrong comment headers 2021-12-29 17:25:06 -05:00
Jason Stewart 7e8c6e2a90 optimizations & simplifications
Color Re-Parsing Avoidances:
- pass colors around as int lists instead of strings
- rolled s:SetMatcher() logic into main loop
- replaced s:FGforBG() w/ s:FGforBGList()
- replaced s:Rgba2Rgb w/ s:IntAlphaMix()

Misc Adjustments:
- use magic mode '\v' for simpler regexes
- added '0x' as a prefix for RGB/RGBA interpretation
- added s:WriteDebugBuf() for debugging
- disabled for 'help' buffers (usu. large, no colors)

Primary Improvement:
- adjusted s:PreviewColorInline() to walk the buffer in
  a single pass, find color TOKENs, & pass them on to the
  appropriate "ColorFinder".
  (i.e. single pass instead of pass-per-ColorFinder)
- adjusted "ColorFinders" to extract color data from a
  single color TOKEN
2021-12-29 07:54:12 -05:00
依云 bafd4e9846 take termguicolors into account 2020-06-21 18:55:45 +08:00
RemiliaForever 2381d87303 Change argb highlight (#33) 2018-06-16 20:08:05 +08:00
依云 9d6dc32e6e bump version 2016-02-21 22:49:12 +08:00
依云 7999427668 support for #aarrggbb format, close #28 2016-02-21 22:42:10 +08:00
依云 acbffdc39a update README and screenshot-2.png
and minor changes for the code
2016-02-21 22:30:38 +08:00
Uwe Jugel f37a376f87 extended mode lines, fixed color term support, added non-alpha hlpatterns 2016-02-14 03:04:38 +01:00
Uwe Jugel 1cf90353e1 removed colorfinder: term
migrated it's logic to common finder
cleaned up and grouped color converters
added more notations to test file
2016-02-14 00:47:32 +01:00
Uwe Jugel cc3c1d7be7 adding pattern match for 4-hex and 8-hex rgba 2016-02-13 14:32:34 +01:00
BimbaLaszlo bdad9d1b7a disable if more then g:colorizer_maxlines 2015-05-13 15:22:24 +02:00
依云 fe7adf9cbf fix toggling not work; fixes #18 2014-07-01 17:46:46 +08:00
依云 3bd0d5e8c1 matchdelete may fail
fixes github issue #15
2014-06-20 13:33:02 +08:00
依云 e0bdb79615 use BufEnter instead of BufRead
so switching buffers in the same window results in updated highlighting
2014-06-20 12:39:59 +08:00
依云 f0c044a129 fix #17: wrong color string parsing 2014-05-06 13:23:20 +08:00
UncleBill e9d2c3c6a7 use str2nr to parse hex color code
here is a test script:
https://gist.github.com/UncleBill/9482014#file-gistfile2-vim
2014-03-12 22:10:23 +08:00
依云 749934c53a bump version 2014-01-25 20:30:25 +08:00
Shane Smith 4c122061a0 Fix auto-startup regression
Moving the `if g:colorizer_startup` block from plugin/ to
autoload/ broke the plugin being automatically started, therefore moved
it back to plugin/.
2014-01-24 13:54:27 -05:00
依云 cad9f690a2 add version infomation 2014-01-17 15:24:53 +08:00
依云 2c358e84d2 use TextChangedI if it works 2014-01-15 19:34:08 +08:00
依云 d32c4b72aa use TextChanged event when possible 2014-01-12 18:58:59 +08:00
依云 9e38fc2614 move function definitions to autoload 2014-01-12 18:16:47 +08:00