Tabby terminal keyword highlight plugin, support text, regexp, javascript
To install, use Tabby builtin plugin manager.
This plugin support 4 way to set highlight color
Drag the ON switch will make the keyword draggable. Keyword on top get high priority.
The profile selection order is session > group > type > global.
Enable JS switch at keyword setting
js code must be in a function like this
// sync function only
function highlight(input) {
// your logic
// you can use lodash by using variable _
_.forEach(input, (char) => {
console.log(char);
});
return; // return nothing means do not highlight anything
}
for return type, see api
the function must return positions or string you want to highlight
positions is a array of number or [number, number]
it hold the character position will be highlight, start from 0
i.e:
[2, 4, 6, 8] means character at position 2, 4, 6, 8 will be highlight
[[3, 7], [10, 15]] means character at position from 3 to 7 and from 10 to 15 will be highlight
More example please see plugin builtin template
// highlight odd number
function highlight(input) {
if (!input.includes("programmable match")) {
return;
}
const pos = [];
for (i = 0; i < input.length; i++) {
const num = parseInt(input[i]);
if (!isNaN(num) && num % 2 != 0) {
pos.push(i);
}
}
return pos;
}
// highlight substring
function highlight(input) {
if (!input.includes("js return string")) {
return;
}
const r = input.match(/".*?": "(.*?)"/);
return r[1].slice(3, 8);
}
// return a regexp, regexp switch must be checked
function highlight(input) {
if (!input.includes("js return string")) {
return;
}
return `".*?": "(.*?)"`;
}
This feature is just for FUN, the replace rule only affect content displayed, does not change the real content.
The input string will be proceed from the top pattern to the end pattern.
Use carefully with RegExp/JS, complex RegExp/JS will cause performance issue and may lead the terminal output in chaos.
Be careful when importing external setting files. This plugin does not do vulnerability scanning.









189 commits
TypeScript
59.5%
HTML
39.0%
JavaScript
1.4%
Tabby terminal keyword highlight plugin, support text, regexp, javascript
To install, use Tabby builtin plugin manager.
This plugin support 4 way to set highlight color
Drag the ON switch will make the keyword draggable. Keyword on top get high priority.
The profile selection order is session > group > type > global.
Enable JS switch at keyword setting
js code must be in a function like this
// sync function only
function highlight(input) {
// your logic
// you can use lodash by using variable _
_.forEach(input, (char) => {
console.log(char);
});
return; // return nothing means do not highlight anything
}
for return type, see api
the function must return positions or string you want to highlight
positions is a array of number or [number, number]
it hold the character position will be highlight, start from 0
i.e:
[2, 4, 6, 8] means character at position 2, 4, 6, 8 will be highlight
[[3, 7], [10, 15]] means character at position from 3 to 7 and from 10 to 15 will be highlight
More example please see plugin builtin template
// highlight odd number
function highlight(input) {
if (!input.includes("programmable match")) {
return;
}
const pos = [];
for (i = 0; i < input.length; i++) {
const num = parseInt(input[i]);
if (!isNaN(num) && num % 2 != 0) {
pos.push(i);
}
}
return pos;
}
// highlight substring
function highlight(input) {
if (!input.includes("js return string")) {
return;
}
const r = input.match(/".*?": "(.*?)"/);
return r[1].slice(3, 8);
}
// return a regexp, regexp switch must be checked
function highlight(input) {
if (!input.includes("js return string")) {
return;
}
return `".*?": "(.*?)"`;
}
This feature is just for FUN, the replace rule only affect content displayed, does not change the real content.
The input string will be proceed from the top pattern to the end pattern.
Use carefully with RegExp/JS, complex RegExp/JS will cause performance issue and may lead the terminal output in chaos.
Be careful when importing external setting files. This plugin does not do vulnerability scanning.









189 commits
TypeScript
59.5%
HTML
39.0%
JavaScript
1.4%