Hotkey to jump to matching curly, parenthesis, single, double quot, html tag, etc.
Hotkey to make selection between the two, pressing again expands selectin more and more
There are two built-in key bindings that get you most of this:
Code: Jump to Matching Brace
and Code: Select to Matching Brace
.
The second binding moves the cursor to the other brace when it’s called repeatedly, like the “jump” but with a selection. I think it’s reasonable to request a behavior change for that, since the presence of a selection essentially moots the value of moving the cursor position.
Sort asc/dec, lexically or numerically, or alpha numerically…
I’m not aware of a built-in binding, but it’s easy enough to write a macro to do the work. This also lets you sort however you want. Without the comments, this is just a 10-line macro:
// ----
// This is a Komodo JavaScript macro
// -----
editor = require('ko/editor');
// Access the current editor's internals.
scimoz = editor.scimoz();
// No current editor? Just return.
if (!scimoz) return;
// Current text selection.
selText = scimoz.selText;
// No selection? Just return.
if (!selText || selText.trim().length == 0) return;
// Get the lines from the selection.
// This assumes a certain line ending, for simplicity.
// It also assumes there's no trailing empty line.
// It's easy enough to find that and remove it.
lines = selText.split('\n');
// Only one line selected? Return!
if (lines.length <= 1) return;
// Use the default sort here, or write your own sorter.
lines.sort();
// Stitch it back up and put it back in.
selText = lines.join('\n');
scimoz.replaceSel(selText);
Trim leading/trailing/both…
Macros are best for this kind of operation. Some simple things like “delete to end of line” are available using a four-line macro:
// ----
// This is another Komodo JavaScript macro
// ----
editor = require('ko/editor');
scimoz = editor.scimoz();
if (!scimoz) return;
scimoz.delLineRight(); //Delete from the cursor to the EOL
Soft highlights all occourances of that, but not selected/mult-edit highlight…
I think I’d have to see this in action to understand it.