*rainbow-trails.txt* Magical rainbows in your Vim *rainbow* *rainbow-trails* *vim-rainbow-trails* Author: Rich Cheng Homepage: https://github.com/sedm0784/vim-rainbow-trails Copyright: © 2024 Rich Cheng Licence: Rainbow Trails uses the same licence as Vim. (See |license|.) Version: 1.0.0 ============================================================================== ___ __ _ _ ___ ___ _ ~ | |_) / /\ | | | |\ | | |_) / / \ \ \ / ~ |_| \ /_/--\ |_| |_| \| |_|_) \_\_/ \_\/\/ ~ _____ ___ __ _ _ __ ~ | | | |_) / /\ | | | | ( (` ~ |_| |_| \ /_/--\ |_| |_|__ _)_) ~ nyannyannyannyan ============================================================================== CONTENTS *rainbow-trails-contents* 1. Introduction ........................|rainbow-trails-introduction| 2. Usage ...............................|rainbow-trails-usage| 2.1 Commands .......................|rainbow-trails-commands| 2.1 Highlighting ...................|rainbow-trails-highlighting| 2.3 Options ........................|rainbow-trails-options| 3. Changelog ...........................|rainbow-trails-changelog| 4. Issues ..............................|rainbow-trails-issues| 4.1 Known Issues ...................|rainbow-trails-known-issues| 4.2 Reporting Issues ...............|rainbow-trails-reporting-issues| 5. Roadmap .............................|rainbow-trails-roadmap| 6. Credits .............................|rainbow-trails-credits| ============================================================================== 1. Introduction *rainbow-trails-introduction* Vim is SPECTACULAR but it isn't very kawaii. A cursor that sprinkles rainbows whereever it goes should help. ============================================================================== 2. Usage *rainbow-trails-usage* ------------------------------------------------------------------------------ 2.1 Commands *rainbow-trails-commands* *rainbow-trails-:RainbowTrails* `:RainbowTrails` Switch on the rainbow trails *rainbow-trails-:RainbowTrails!* `:RainbowTrails!` Switch off the rainbow trails. Have you no JOY in your heart?! ------------------------------------------------------------------------------ 2.2 Highlighting *rainbow-trails-highlighting* Rainbow Trails is fully pre-configured to display beautiful TECHNICOLOUR rainbows both in GUI Vim and in terminal Vim with either 256 colours or 'termguicolors'. But if you don't care for the colours I have PAINSTAKINGLY selected for you, you can use your own. By way of example, here are the highlighting commands for a greyscale rainbow, as if yanked from Ansel Adams's vimrc. > highlight RainbowRed guibg=#808080 ctermbg=244 highlight RainbowOrange guibg=#6c6c6c ctermbg=242 highlight RainbowYellow guibg=#585858 ctermbg=240 highlight RainbowGreen guibg=#444444 ctermbg=238 highlight RainbowBlue guibg=#303030 ctermbg=236 highlight RainbowIndigo guibg=#1c1c1c ctermbg=234 highlight RainbowViolet guibg=#080808 ctermbg=232 < ------------------------------------------------------------------------------ 2.3 Options *rainbow-trails-options* *'g:rainbow_colours'* 'g:rainbow_colours' list (default: ['RainbowRed', 'RainbowOrange', 'RainbowYellow', 'RainbowGreen', 'RainbowBlue', 'RainbowIndigo', 'RainbowViolet']) As detailed in |rainbow-trails-highlighting|, Rainbow Trails uses the traditional seven ROYGBIV colours, but perhaps that is not enough colours for you. Or maybe it is too many! Never fear. Set |'g:rainbow_colours'| to declare your desired set of colours. e.g. > let g:rainbow_colours = ['RainbowRed', 'RainbowGreen', 'RainbowBlue'] < *'g:rainbow_colour_width'* 'g:rainbow_colour_width' number (default: 3) This option can be used to change the width of each band of colour within the rainbow. By default, each band is 3 characters wide. *'g:rainbow_colour_width_thresholds'* 'g:rainbow_colour_width_thresholds' list (default: [8]) To ensure a PLEASING balance, Rainbow Trails allows longer rainbows to be composed of wider bands of colour than more ephemeral, short rainbows. Each entry in |'g:rainbow_colour_width_thresholds'| adds one extra character for rainbows above that length. So for the default value of [8], rainbows longer than 8 characters will have bands that are one extra character wide. With |'g:rainbow_colour_width'| set to 3, this results in bands that are 4 characters wide. Keeping the same setting for |'g:rainbow_colour_width'| and setting |'g:rainbow_colour_width_thresholds'| to [30, 80, 80] would specify that rainbows that are between 30 and 79 characters long should have bands that are 4 characters wide, and that rainbows that are 80 characters or longer should have 6-character wide colour bands. *'g:rainbow_constant_interval'* 'g:rainbow_constant_interval' number (default: 1) The main mechanism used for setting the speed at which the rainbows DASH across your buffer is |'g:rainbow_constant_interval'|. Positive values greater than 0 make the rainbow SLOWER, by introducing a delay of that many milliseconds between each step the rainbow takes. Negative values below 0 make the rainbow FASTER, by increasing the number of characters which it moves at each step. Setting a value of -2 will for example result in a rainbow that moves 2 characters every step. But there are three further options! The first two allow you to make short rainbows SLOWER, so you can ENJOY them better. The third, allows you to make long rainbows FASTER, because time is money. *'g:rainbow_variable_timer_threshold'* 'g:rainbow_variable_timer_threshold' number (default: 30) *'g:rainbow_max_variable_interval'* 'g:rainbow_max_variable_interval' number (default: 7) Movements shorter than |'g:rainbow_variable_timer_threshold'| have an extra timer interval applied, in a sliding scale between 0 and |'g:rainbow_max_variable_interval'|. Like |'g:rainbow_constant_interval'|, the variable interval is also measured in milliseconds. *'g:rainbow_fade_rate_thresholds'* 'g:rainbow_fade_rate_thresholds' list (default: [8, 30, 80]) Each entry in |'g:rainbow_fade_rate_thresholds'| increases the number of characters the rainbow moves at each step. So with the default value of [8, 30, 80], the rainbow will move one character per step faster if it is 8-29 characters long, TWO characters faster if it is 30-79 characters long, and a massive THREE characters faster if it is 80 or more characters long. ============================================================================== 3. Changelog *rainbow-trails-changelog* Version 1.0.0 - Completely reworked timing mechanism. Configuration options. HELPFUL documentation. Assorted bugfixes. Version 0.1.0 - First released version. Works in terminal. Version 0.0.1 - Initial dev version. Makes trails. ============================================================================== 4. Issues *rainbow-trails-issues* ------------------------------------------------------------------------------ 4.1 Known Issues *rainbow-trails-known-issues* 1. Trails go INVISIBLE when they cross areas of the buffer with NOTHING in them (i.e. the space after the ends of each line). Not even magical rainbows can form in the ICY VACUUM of SPACE. 2. If you start multiple rainbows and then QUICKLY switch windows sometimes they FREEZE and become PERMANENT. If this happens, you can clear them with the command: > call clearmatches() < Note that this will clear ALL matches set with the |matchadd()| functions or |:match| commands, including ones not set by this plugin. ------------------------------------------------------------------------------ 4.2 Reporting Issues *rainbow-trails-reporting-issues* You can contact me via the GitHub repository to ask questions or report issues: https://github.com/sedm0784/vim-rainbow-trails Or if you prefer, feel free to email or toot instead: rainbow hyphen trails at normalmo dot de @normalmode@mastodon.social ============================================================================== 5. Roadmap *rainbow-trails-roadmap* I might Try Xiaolin Wu's line algorithm for ANTIALIASED rainbows. I should also see if I can use |text-properties| to fix the no-rainbows-on-empty-lines issue and perhaps they are also more PERFORMANT. I'm not gonna lie: none of the above is likely to happen soon. ============================================================================== 6. Credits *rainbow-trails-credits* Rainbow Trails was written by Rich Cheng. The banner at the top of this help file was created using the “Broadway KB” FIGlet font at the Text ASCII Art Generator: http://patorjk.com/software/taag/ ============================================================================== vim:tw=78:ts=8:ft=help:norl: