[code][textadept] 'highlights' module available

From: Peter Rolf <indiego.att.gmx.net>
Date: Wed, 27 Jun 2018 17:16:35 +0200

Hi,

this module adds highlighting similar to the build in 'highlight_word()'
function. It supports the usage of up to ten color indicators and is
also highly configurable.

Module Home:

https://spideroak.com/browse/share/indiego/public/textadept/

There are two module versions (the "_ets" version is for Elastic Tabstops).

Two pictures of the default color palettes ('light' and 'dark') are also
stored there to give you a first impression. The pictures are not part
of the module archive. To go without saying, all indicator colors can be
changed to your own preferences.

INSTALLATION:

Extract the "highlights" directory to your _USERHOME/.textadept/modules
directory and add

      highlights = require("highlights").init([n])

to your "init.lua". To take effect, a restart or reset() is required.
The default number of indicators is ten, values between one and ten are
valid.

KEYS (key chains!):

keys["caH"] + ["0".."9"] -> add highlighting of indicator <n>
keys["esc"] + ["0".."9"] -> remove highlighting of indicator <n>
            + ["x"] -> remove all highlighting in the buffer

The default color palette is intended for 'light' themes. If you prefer
'dark' themes you can change the default palette by adding this line to
your 'init.lua' file

     highlights.set_colors(highlights.palettes.dark)

More information (remember the 'highly configurable' from the start?)
can be found in the documentation part of 'init.lua'. Just RTFM :D

One more undocumented info. The file 'color_test.lua' is my palette test
environment. A bit messy now (I haven't finished the palette for my
'twenty-four-light' theme), but I'm sure you'll get the idea. Just load
(require) the file and hit "ckp1" to "ckp6" (or "akp1" and "akp2")
[kp<n> is key pad <n>] while viewing the file.

If you find any bugs or have ideas for improvement[*], let me know. Or
if you want to share a nice color palette, fine by me. I might add it to
a later version of this module.

[*] apart from increasing the total number of indicators (I suggest to
use the external 'Gimp' module in that case)

Cheers, Peter

-- 
You are subscribed to code.att.foicica.com.
To change subscription settings, send an e-mail to code+help.att.foicica.com.
To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
Received on Wed 27 Jun 2018 - 11:16:35 EDT

This archive was generated by hypermail 2.2.0 : Thu 28 Jun 2018 - 06:39:51 EDT