mirror of
https://github.com/Silverquark/dance.git
synced 2024-10-05 14:28:36 +03:00
commands: remap {a-x,s-a-x}to {x,a-x} (#281)
Also fix issues with `.selections.trimLines` and `.selections.expandToLines` and upgrade `typescript`.
This commit is contained in:
parent
5779d9c003
commit
a3772ef914
@ -135,7 +135,7 @@ export const pkg = (modules: Builder.ParsedModule[]) => ({
|
||||
"source-map-support": "^0.5.21",
|
||||
"ts-loader": "^9.3.1",
|
||||
"ts-node": "^10.8.1",
|
||||
"typescript": "^4.7.4",
|
||||
"typescript": "^4.8.4",
|
||||
"unexpected": "^13.0.0",
|
||||
"vsce": "^2.7.0",
|
||||
"webpack": "^5.72.1",
|
||||
|
23
package.json
generated
23
package.json
generated
@ -47,7 +47,7 @@
|
||||
"source-map-support": "^0.5.21",
|
||||
"ts-loader": "^9.3.1",
|
||||
"ts-node": "^10.8.1",
|
||||
"typescript": "^4.7.4",
|
||||
"typescript": "^4.8.4",
|
||||
"unexpected": "^13.0.0",
|
||||
"vsce": "^2.7.0",
|
||||
"webpack": "^5.72.1",
|
||||
@ -3467,18 +3467,6 @@
|
||||
"title": "Jump left",
|
||||
"command": "dance.select.left.jump"
|
||||
},
|
||||
{
|
||||
"key": "X",
|
||||
"when": "editorTextFocus && dance.mode == 'normal'",
|
||||
"title": "Select line below",
|
||||
"command": "dance.select.line.below"
|
||||
},
|
||||
{
|
||||
"key": "Shift+X",
|
||||
"when": "editorTextFocus && dance.mode == 'normal'",
|
||||
"title": "Extend to line below",
|
||||
"command": "dance.select.line.below.extend"
|
||||
},
|
||||
{
|
||||
"key": "Alt+L",
|
||||
"when": "editorTextFocus && dance.mode == 'normal'",
|
||||
@ -3698,7 +3686,7 @@
|
||||
"command": "dance.selections.copy.above"
|
||||
},
|
||||
{
|
||||
"key": "Alt+X",
|
||||
"key": "X",
|
||||
"when": "editorTextFocus && dance.mode == 'normal'",
|
||||
"title": "Expand to lines",
|
||||
"command": "dance.selections.expandToLines"
|
||||
@ -3827,7 +3815,7 @@
|
||||
"command": "dance.selections.toggleIndices"
|
||||
},
|
||||
{
|
||||
"key": "Shift+Alt+X",
|
||||
"key": "Alt+X",
|
||||
"when": "editorTextFocus && dance.mode == 'normal'",
|
||||
"title": "Trim lines",
|
||||
"command": "dance.selections.trimLines"
|
||||
@ -3888,6 +3876,11 @@
|
||||
"key": "Shift+D",
|
||||
"when": "editorTextFocus && dance.mode == 'normal'"
|
||||
},
|
||||
{
|
||||
"command": "dance.ignore",
|
||||
"key": "Shift+X",
|
||||
"when": "editorTextFocus && dance.mode == 'normal'"
|
||||
},
|
||||
{
|
||||
"command": "dance.ignore",
|
||||
"key": "Shift+Y",
|
||||
|
@ -104,7 +104,7 @@ export async function build(builder: Builder) {
|
||||
}
|
||||
}
|
||||
|
||||
if (command.commands !== existingCommandDoc.get("command", false) as string) {
|
||||
if (command.commands !== existingCommandDoc.get("commands", false) as string) {
|
||||
if (command.commands === undefined) {
|
||||
existingCommandDoc.delete("commands");
|
||||
} else {
|
||||
|
@ -1655,24 +1655,16 @@ select.line.below:
|
||||
title:
|
||||
en: Select line below
|
||||
|
||||
keys:
|
||||
qwerty: |-
|
||||
`x` (kakoune: normal)
|
||||
|
||||
doc:
|
||||
en: |+
|
||||
en: |
|
||||
Select line below.
|
||||
|
||||
select.line.below.extend:
|
||||
title:
|
||||
en: Extend to line below
|
||||
|
||||
keys:
|
||||
qwerty: |-
|
||||
`s-x` (kakoune: normal)
|
||||
|
||||
doc:
|
||||
en: |+
|
||||
en: |
|
||||
Extend to line below.
|
||||
|
||||
select.lineEnd:
|
||||
@ -2014,7 +2006,7 @@ selections.expandToLines:
|
||||
|
||||
keys:
|
||||
qwerty: |-
|
||||
`a-x` (kakoune: normal)
|
||||
`x` (kakoune: normal)
|
||||
|
||||
doc:
|
||||
en: |+
|
||||
@ -2460,7 +2452,7 @@ selections.trimLines:
|
||||
|
||||
keys:
|
||||
qwerty: |-
|
||||
`s-a-x` (kakoune: normal)
|
||||
`a-x` (kakoune: normal)
|
||||
|
||||
doc:
|
||||
en: |+
|
||||
|
@ -1260,6 +1260,26 @@ export function isNonDirectional(selection: vscode.Selection, context = Context.
|
||||
&& isSingleCharacter(selection, context.document);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether the current selection is _strictly reversed_, i.e. it is both
|
||||
* **directional** (non-empty, and more than one characters in `character`
|
||||
* selection mode) and reversed.
|
||||
*
|
||||
* {@link vscode.Selection.isReversed} returns `true` even for empty selections,
|
||||
* which is not suitable in many cases.
|
||||
*/
|
||||
export function isStrictlyReversed(selection: vscode.Selection, context = Context.current) {
|
||||
if (selection.isEmpty || !selection.isReversed) {
|
||||
// Empty or forward: not reversed.
|
||||
return false;
|
||||
}
|
||||
|
||||
// In `caret` selection mode, we can stop checking here. In `character`
|
||||
// selection mode, 1-character selections are considered "empty", and
|
||||
// therefore not reversed.
|
||||
return !isNonDirectional(selection, context);
|
||||
}
|
||||
|
||||
/**
|
||||
* The position from which a seek operation should start. This is equivalent
|
||||
* to `selection.active` except when the selection is non-directional, in
|
||||
|
72
src/commands/README.md
generated
72
src/commands/README.md
generated
@ -139,32 +139,32 @@ selections are empty</td><td></td></tr>
|
||||
<tr><td><a href="#select.lastVisibleLine"><code>select.lastVisibleLine</code></a></td><td>Select to last visible line</td><td></td></tr>
|
||||
<tr><td><a href="#select.line.above"><code>select.line.above</code></a></td><td>Select line above</td><td></td></tr>
|
||||
<tr><td><a href="#select.line.above.extend"><code>select.line.above.extend</code></a></td><td>Extend to line above</td><td></td></tr>
|
||||
<tr><td><a href="#select.line.below"><code>select.line.below</code></a></td><td>Select line below</td><td><code>X</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)</td></tr>
|
||||
<tr><td><a href="#select.line.below.extend"><code>select.line.below.extend</code></a></td><td>Extend to line below</td><td><code>Shift+X</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)</td></tr>
|
||||
<tr><td><a href="#select.line.below"><code>select.line.below</code></a></td><td>Select line below</td><td></td></tr>
|
||||
<tr><td><a href="#select.line.below.extend"><code>select.line.below.extend</code></a></td><td>Extend to line below</td><td></td></tr>
|
||||
<tr><td><a href="#select.lineEnd"><code>select.lineEnd</code></a></td><td>Select to line end</td><td><code>Alt+L</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)<code>End</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)</td></tr>
|
||||
<tr><td><a href="#select.lineStart"><code>select.lineStart</code></a></td><td>Select to line start</td><td><code>Alt+H</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)<code>Home</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)</td></tr>
|
||||
<tr><td><a href="#select.middleVisibleLine"><code>select.middleVisibleLine</code></a></td><td>Select to middle visible line</td><td></td></tr>
|
||||
<tr><td><a href="./select.ts#L513"><code>select.documentEnd.extend</code></a></td><td>Extend to last character</td><td></td></tr>
|
||||
<tr><td><a href="./select.ts#L512"><code>select.documentEnd.jump</code></a></td><td>Jump to last character</td><td></td></tr>
|
||||
<tr><td><a href="./select.ts#L509"><code>select.documentEnd.extend</code></a></td><td>Extend to last character</td><td></td></tr>
|
||||
<tr><td><a href="./select.ts#L508"><code>select.documentEnd.jump</code></a></td><td>Jump to last character</td><td></td></tr>
|
||||
<tr><td><a href="./select.ts#L42"><code>select.down.extend</code></a></td><td>Extend down</td><td><code>Shift+J</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)<code>Shift+Down</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)</td></tr>
|
||||
<tr><td><a href="./select.ts#L41"><code>select.down.jump</code></a></td><td>Jump down</td><td><code>J</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)<code>Down</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)</td></tr>
|
||||
<tr><td><a href="./select.ts#L466"><code>select.firstLine.extend</code></a></td><td>Extend to first line</td><td></td></tr>
|
||||
<tr><td><a href="./select.ts#L465"><code>select.firstLine.jump</code></a></td><td>Jump to first line</td><td></td></tr>
|
||||
<tr><td><a href="./select.ts#L578"><code>select.firstVisibleLine.extend</code></a></td><td>Extend to first visible line</td><td></td></tr>
|
||||
<tr><td><a href="./select.ts#L577"><code>select.firstVisibleLine.jump</code></a></td><td>Jump to first visible line</td><td></td></tr>
|
||||
<tr><td><a href="./select.ts#L557"><code>select.lastLine.extend</code></a></td><td>Extend to last line</td><td></td></tr>
|
||||
<tr><td><a href="./select.ts#L556"><code>select.lastLine.jump</code></a></td><td>Jump to last line</td><td></td></tr>
|
||||
<tr><td><a href="./select.ts#L612"><code>select.lastVisibleLine.extend</code></a></td><td>Extend to last visible line</td><td></td></tr>
|
||||
<tr><td><a href="./select.ts#L611"><code>select.lastVisibleLine.jump</code></a></td><td>Jump to last visible line</td><td></td></tr>
|
||||
<tr><td><a href="./select.ts#L462"><code>select.firstLine.extend</code></a></td><td>Extend to first line</td><td></td></tr>
|
||||
<tr><td><a href="./select.ts#L461"><code>select.firstLine.jump</code></a></td><td>Jump to first line</td><td></td></tr>
|
||||
<tr><td><a href="./select.ts#L574"><code>select.firstVisibleLine.extend</code></a></td><td>Extend to first visible line</td><td></td></tr>
|
||||
<tr><td><a href="./select.ts#L573"><code>select.firstVisibleLine.jump</code></a></td><td>Jump to first visible line</td><td></td></tr>
|
||||
<tr><td><a href="./select.ts#L553"><code>select.lastLine.extend</code></a></td><td>Extend to last line</td><td></td></tr>
|
||||
<tr><td><a href="./select.ts#L552"><code>select.lastLine.jump</code></a></td><td>Jump to last line</td><td></td></tr>
|
||||
<tr><td><a href="./select.ts#L608"><code>select.lastVisibleLine.extend</code></a></td><td>Extend to last visible line</td><td></td></tr>
|
||||
<tr><td><a href="./select.ts#L607"><code>select.lastVisibleLine.jump</code></a></td><td>Jump to last visible line</td><td></td></tr>
|
||||
<tr><td><a href="./select.ts#L230"><code>select.left.extend</code></a></td><td>Extend left</td><td><code>Shift+H</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)<code>Shift+Left</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)</td></tr>
|
||||
<tr><td><a href="./select.ts#L229"><code>select.left.jump</code></a></td><td>Jump left</td><td><code>H</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)<code>Left</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)</td></tr>
|
||||
<tr><td><a href="./select.ts#L511"><code>select.lineEnd.extend</code></a></td><td>Extend to line end</td><td><code>Shift+Alt+L</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)<code>Shift+End</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)</td></tr>
|
||||
<tr><td><a href="./select.ts#L462"><code>select.lineStart.extend</code></a></td><td>Extend to line start</td><td><code>Shift+Alt+H</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)<code>Shift+Home</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)</td></tr>
|
||||
<tr><td><a href="./select.ts#L461"><code>select.lineStart.jump</code></a></td><td>Jump to line start</td><td></td></tr>
|
||||
<tr><td><a href="./select.ts#L464"><code>select.lineStart.skipBlank.extend</code></a></td><td>Extend to line start (skip blank)</td><td></td></tr>
|
||||
<tr><td><a href="./select.ts#L463"><code>select.lineStart.skipBlank.jump</code></a></td><td>Jump to line start (skip blank)</td><td></td></tr>
|
||||
<tr><td><a href="./select.ts#L595"><code>select.middleVisibleLine.extend</code></a></td><td>Extend to middle visible line</td><td></td></tr>
|
||||
<tr><td><a href="./select.ts#L594"><code>select.middleVisibleLine.jump</code></a></td><td>Jump to middle visible line</td><td></td></tr>
|
||||
<tr><td><a href="./select.ts#L507"><code>select.lineEnd.extend</code></a></td><td>Extend to line end</td><td><code>Shift+Alt+L</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)<code>Shift+End</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)</td></tr>
|
||||
<tr><td><a href="./select.ts#L458"><code>select.lineStart.extend</code></a></td><td>Extend to line start</td><td><code>Shift+Alt+H</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)<code>Shift+Home</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)</td></tr>
|
||||
<tr><td><a href="./select.ts#L457"><code>select.lineStart.jump</code></a></td><td>Jump to line start</td><td></td></tr>
|
||||
<tr><td><a href="./select.ts#L460"><code>select.lineStart.skipBlank.extend</code></a></td><td>Extend to line start (skip blank)</td><td></td></tr>
|
||||
<tr><td><a href="./select.ts#L459"><code>select.lineStart.skipBlank.jump</code></a></td><td>Jump to line start (skip blank)</td><td></td></tr>
|
||||
<tr><td><a href="./select.ts#L591"><code>select.middleVisibleLine.extend</code></a></td><td>Extend to middle visible line</td><td></td></tr>
|
||||
<tr><td><a href="./select.ts#L590"><code>select.middleVisibleLine.jump</code></a></td><td>Jump to middle visible line</td><td></td></tr>
|
||||
<tr><td><a href="./select.ts#L228"><code>select.right.extend</code></a></td><td>Extend right</td><td><code>Shift+L</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)<code>Shift+Right</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)</td></tr>
|
||||
<tr><td><a href="./select.ts#L227"><code>select.right.jump</code></a></td><td>Jump right</td><td><code>L</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)<code>Right</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)</td></tr>
|
||||
<tr><td><a href="./select.ts#L297"><code>select.to.extend</code></a></td><td>Extend to</td><td><code>Shift+G</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)</td></tr>
|
||||
@ -176,7 +176,7 @@ selections are empty</td><td></td></tr>
|
||||
<tr><td rowspan=37><a href="#selections"><code>selections</code></a></td><td><a href="#selections.changeDirection"><code>selections.changeDirection</code></a></td><td>Change direction of selections</td><td><code>Alt+;</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)</td></tr>
|
||||
<tr><td><a href="#selections.changeOrder"><code>selections.changeOrder</code></a></td><td>Reverse selections</td><td></td></tr>
|
||||
<tr><td><a href="#selections.copy"><code>selections.copy</code></a></td><td>Copy selections below</td><td><code>Shift+C</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)</td></tr>
|
||||
<tr><td><a href="#selections.expandToLines"><code>selections.expandToLines</code></a></td><td>Expand to lines</td><td><code>Alt+X</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)</td></tr>
|
||||
<tr><td><a href="#selections.expandToLines"><code>selections.expandToLines</code></a></td><td>Expand to lines</td><td><code>X</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)</td></tr>
|
||||
<tr><td><a href="#selections.filter"><code>selections.filter</code></a></td><td>Filter selections</td><td><code>Shift+4</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)</td></tr>
|
||||
<tr><td><a href="#selections.merge"><code>selections.merge</code></a></td><td>Merge contiguous selections</td><td><code>Shift+Alt+-</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)</td></tr>
|
||||
<tr><td><a href="#selections.open"><code>selections.open</code></a></td><td>Open selected file</td><td></td></tr>
|
||||
@ -208,7 +208,7 @@ selections are empty</td><td></td></tr>
|
||||
<tr><td><a href="#selections.split"><code>selections.split</code></a></td><td>Split selections</td><td><code>Shift+S</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)</td></tr>
|
||||
<tr><td><a href="#selections.splitLines"><code>selections.splitLines</code></a></td><td>Split selections at line boundaries</td><td></td></tr>
|
||||
<tr><td><a href="#selections.toggleIndices"><code>selections.toggleIndices</code></a></td><td>Toggle selection indices</td><td><code>Enter</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)</td></tr>
|
||||
<tr><td><a href="#selections.trimLines"><code>selections.trimLines</code></a></td><td>Trim lines</td><td><code>Shift+Alt+X</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)</td></tr>
|
||||
<tr><td><a href="#selections.trimLines"><code>selections.trimLines</code></a></td><td>Trim lines</td><td><code>Alt+X</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)</td></tr>
|
||||
<tr><td><a href="#selections.trimWhitespace"><code>selections.trimWhitespace</code></a></td><td>Trim whitespace</td><td><code>Shift+-</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)</td></tr>
|
||||
<tr><td rowspan=6><a href="#selections.rotate"><code>selections.rotate</code></a></td><td><a href="#selections.rotate.both"><code>selections.rotate.both</code></a></td><td>Rotate selections clockwise</td><td><code>Shift+Alt+9</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)</td></tr>
|
||||
<tr><td><a href="#selections.rotate.contents"><code>selections.rotate.contents</code></a></td><td>Rotate selections clockwise (contents only)</td><td></td></tr>
|
||||
@ -1215,31 +1215,25 @@ This command:
|
||||
|
||||
<a name="select.line.below" />
|
||||
|
||||
### [`select.line.below`](./select.ts#L314-L319)
|
||||
### [`select.line.below`](./select.ts#L314-L317)
|
||||
|
||||
Select line below.
|
||||
|
||||
|
||||
This command:
|
||||
- may be repeated with a given number of repetitions.
|
||||
|
||||
Default keybinding: `x` (kakoune: normal)
|
||||
|
||||
<a name="select.line.below.extend" />
|
||||
|
||||
### [`select.line.below.extend`](./select.ts#L344-L349)
|
||||
### [`select.line.below.extend`](./select.ts#L342-L345)
|
||||
|
||||
Extend to line below.
|
||||
|
||||
|
||||
This command:
|
||||
- may be repeated with a given number of repetitions.
|
||||
|
||||
Default keybinding: `s-x` (kakoune: normal)
|
||||
|
||||
<a name="select.line.above" />
|
||||
|
||||
### [`select.line.above`](./select.ts#L376-L379)
|
||||
### [`select.line.above`](./select.ts#L372-L375)
|
||||
|
||||
Select line above.
|
||||
|
||||
@ -1248,7 +1242,7 @@ This command:
|
||||
|
||||
<a name="select.line.above.extend" />
|
||||
|
||||
### [`select.line.above.extend`](./select.ts#L403-L406)
|
||||
### [`select.line.above.extend`](./select.ts#L399-L402)
|
||||
|
||||
Extend to line above.
|
||||
|
||||
@ -1257,7 +1251,7 @@ This command:
|
||||
|
||||
<a name="select.lineStart" />
|
||||
|
||||
### [`select.lineStart`](./select.ts#L452-L474)
|
||||
### [`select.lineStart`](./select.ts#L448-L470)
|
||||
|
||||
Select to line start.
|
||||
|
||||
@ -1282,7 +1276,7 @@ Default keybinding: `a-h` (kakoune: normal)
|
||||
|
||||
<a name="select.lineEnd" />
|
||||
|
||||
### [`select.lineEnd`](./select.ts#L499-L521)
|
||||
### [`select.lineEnd`](./select.ts#L495-L517)
|
||||
|
||||
Select to line end.
|
||||
|
||||
@ -1305,7 +1299,7 @@ Default keybinding: `a-l` (kakoune: normal)
|
||||
|
||||
<a name="select.lastLine" />
|
||||
|
||||
### [`select.lastLine`](./select.ts#L549-L559)
|
||||
### [`select.lastLine`](./select.ts#L545-L555)
|
||||
|
||||
Select to last line.
|
||||
|
||||
@ -1318,7 +1312,7 @@ Select to last line.
|
||||
|
||||
<a name="select.firstVisibleLine" />
|
||||
|
||||
### [`select.firstVisibleLine`](./select.ts#L570-L580)
|
||||
### [`select.firstVisibleLine`](./select.ts#L566-L576)
|
||||
|
||||
Select to first visible line.
|
||||
|
||||
@ -1331,7 +1325,7 @@ Select to first visible line.
|
||||
|
||||
<a name="select.middleVisibleLine" />
|
||||
|
||||
### [`select.middleVisibleLine`](./select.ts#L587-L597)
|
||||
### [`select.middleVisibleLine`](./select.ts#L583-L593)
|
||||
|
||||
Select to middle visible line.
|
||||
|
||||
@ -1344,7 +1338,7 @@ Select to middle visible line.
|
||||
|
||||
<a name="select.lastVisibleLine" />
|
||||
|
||||
### [`select.lastVisibleLine`](./select.ts#L604-L614)
|
||||
### [`select.lastVisibleLine`](./select.ts#L600-L610)
|
||||
|
||||
Select to last visible line.
|
||||
|
||||
@ -1527,7 +1521,7 @@ Expand selections to contain full lines (including end-of-line characters).
|
||||
|
||||
|
||||
|
||||
Default keybinding: `a-x` (kakoune: normal)
|
||||
Default keybinding: `x` (kakoune: normal)
|
||||
|
||||
<a name="selections.trimLines" />
|
||||
|
||||
@ -1539,7 +1533,7 @@ Trim selections to only contain full lines (from start to line break).
|
||||
|
||||
|
||||
|
||||
Default keybinding: `s-a-x` (kakoune: normal)
|
||||
Default keybinding: `a-x` (kakoune: normal)
|
||||
|
||||
<a name="selections.trimWhitespace" />
|
||||
|
||||
|
@ -124,32 +124,32 @@ selections are empty</td><td></td></tr>
|
||||
<tr><td><a href="#select.lastVisibleLine"><code>select.lastVisibleLine</code></a></td><td>Select to last visible line</td><td></td></tr>
|
||||
<tr><td><a href="#select.line.above"><code>select.line.above</code></a></td><td>Select line above</td><td></td></tr>
|
||||
<tr><td><a href="#select.line.above.extend"><code>select.line.above.extend</code></a></td><td>Extend to line above</td><td></td></tr>
|
||||
<tr><td><a href="#select.line.below"><code>select.line.below</code></a></td><td>Select line below</td><td><code>X</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)</td></tr>
|
||||
<tr><td><a href="#select.line.below.extend"><code>select.line.below.extend</code></a></td><td>Extend to line below</td><td><code>Shift+X</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)</td></tr>
|
||||
<tr><td><a href="#select.line.below"><code>select.line.below</code></a></td><td>Select line below</td><td></td></tr>
|
||||
<tr><td><a href="#select.line.below.extend"><code>select.line.below.extend</code></a></td><td>Extend to line below</td><td></td></tr>
|
||||
<tr><td><a href="#select.lineEnd"><code>select.lineEnd</code></a></td><td>Select to line end</td><td><code>Alt+L</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)<code>End</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)</td></tr>
|
||||
<tr><td><a href="#select.lineStart"><code>select.lineStart</code></a></td><td>Select to line start</td><td><code>Alt+H</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)<code>Home</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)</td></tr>
|
||||
<tr><td><a href="#select.middleVisibleLine"><code>select.middleVisibleLine</code></a></td><td>Select to middle visible line</td><td></td></tr>
|
||||
<tr><td><a href="../select.ts#L513"><code>select.documentEnd.extend</code></a></td><td>Extend to last character</td><td></td></tr>
|
||||
<tr><td><a href="../select.ts#L512"><code>select.documentEnd.jump</code></a></td><td>Jump to last character</td><td></td></tr>
|
||||
<tr><td><a href="../select.ts#L509"><code>select.documentEnd.extend</code></a></td><td>Extend to last character</td><td></td></tr>
|
||||
<tr><td><a href="../select.ts#L508"><code>select.documentEnd.jump</code></a></td><td>Jump to last character</td><td></td></tr>
|
||||
<tr><td><a href="../select.ts#L42"><code>select.down.extend</code></a></td><td>Extend down</td><td><code>Shift+J</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)<code>Shift+Down</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)</td></tr>
|
||||
<tr><td><a href="../select.ts#L41"><code>select.down.jump</code></a></td><td>Jump down</td><td><code>J</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)<code>Down</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)</td></tr>
|
||||
<tr><td><a href="../select.ts#L466"><code>select.firstLine.extend</code></a></td><td>Extend to first line</td><td></td></tr>
|
||||
<tr><td><a href="../select.ts#L465"><code>select.firstLine.jump</code></a></td><td>Jump to first line</td><td></td></tr>
|
||||
<tr><td><a href="../select.ts#L578"><code>select.firstVisibleLine.extend</code></a></td><td>Extend to first visible line</td><td></td></tr>
|
||||
<tr><td><a href="../select.ts#L577"><code>select.firstVisibleLine.jump</code></a></td><td>Jump to first visible line</td><td></td></tr>
|
||||
<tr><td><a href="../select.ts#L557"><code>select.lastLine.extend</code></a></td><td>Extend to last line</td><td></td></tr>
|
||||
<tr><td><a href="../select.ts#L556"><code>select.lastLine.jump</code></a></td><td>Jump to last line</td><td></td></tr>
|
||||
<tr><td><a href="../select.ts#L612"><code>select.lastVisibleLine.extend</code></a></td><td>Extend to last visible line</td><td></td></tr>
|
||||
<tr><td><a href="../select.ts#L611"><code>select.lastVisibleLine.jump</code></a></td><td>Jump to last visible line</td><td></td></tr>
|
||||
<tr><td><a href="../select.ts#L462"><code>select.firstLine.extend</code></a></td><td>Extend to first line</td><td></td></tr>
|
||||
<tr><td><a href="../select.ts#L461"><code>select.firstLine.jump</code></a></td><td>Jump to first line</td><td></td></tr>
|
||||
<tr><td><a href="../select.ts#L574"><code>select.firstVisibleLine.extend</code></a></td><td>Extend to first visible line</td><td></td></tr>
|
||||
<tr><td><a href="../select.ts#L573"><code>select.firstVisibleLine.jump</code></a></td><td>Jump to first visible line</td><td></td></tr>
|
||||
<tr><td><a href="../select.ts#L553"><code>select.lastLine.extend</code></a></td><td>Extend to last line</td><td></td></tr>
|
||||
<tr><td><a href="../select.ts#L552"><code>select.lastLine.jump</code></a></td><td>Jump to last line</td><td></td></tr>
|
||||
<tr><td><a href="../select.ts#L608"><code>select.lastVisibleLine.extend</code></a></td><td>Extend to last visible line</td><td></td></tr>
|
||||
<tr><td><a href="../select.ts#L607"><code>select.lastVisibleLine.jump</code></a></td><td>Jump to last visible line</td><td></td></tr>
|
||||
<tr><td><a href="../select.ts#L230"><code>select.left.extend</code></a></td><td>Extend left</td><td><code>Shift+H</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)<code>Shift+Left</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)</td></tr>
|
||||
<tr><td><a href="../select.ts#L229"><code>select.left.jump</code></a></td><td>Jump left</td><td><code>H</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)<code>Left</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)</td></tr>
|
||||
<tr><td><a href="../select.ts#L511"><code>select.lineEnd.extend</code></a></td><td>Extend to line end</td><td><code>Shift+Alt+L</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)<code>Shift+End</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)</td></tr>
|
||||
<tr><td><a href="../select.ts#L462"><code>select.lineStart.extend</code></a></td><td>Extend to line start</td><td><code>Shift+Alt+H</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)<code>Shift+Home</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)</td></tr>
|
||||
<tr><td><a href="../select.ts#L461"><code>select.lineStart.jump</code></a></td><td>Jump to line start</td><td></td></tr>
|
||||
<tr><td><a href="../select.ts#L464"><code>select.lineStart.skipBlank.extend</code></a></td><td>Extend to line start (skip blank)</td><td></td></tr>
|
||||
<tr><td><a href="../select.ts#L463"><code>select.lineStart.skipBlank.jump</code></a></td><td>Jump to line start (skip blank)</td><td></td></tr>
|
||||
<tr><td><a href="../select.ts#L595"><code>select.middleVisibleLine.extend</code></a></td><td>Extend to middle visible line</td><td></td></tr>
|
||||
<tr><td><a href="../select.ts#L594"><code>select.middleVisibleLine.jump</code></a></td><td>Jump to middle visible line</td><td></td></tr>
|
||||
<tr><td><a href="../select.ts#L507"><code>select.lineEnd.extend</code></a></td><td>Extend to line end</td><td><code>Shift+Alt+L</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)<code>Shift+End</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)</td></tr>
|
||||
<tr><td><a href="../select.ts#L458"><code>select.lineStart.extend</code></a></td><td>Extend to line start</td><td><code>Shift+Alt+H</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)<code>Shift+Home</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)</td></tr>
|
||||
<tr><td><a href="../select.ts#L457"><code>select.lineStart.jump</code></a></td><td>Jump to line start</td><td></td></tr>
|
||||
<tr><td><a href="../select.ts#L460"><code>select.lineStart.skipBlank.extend</code></a></td><td>Extend to line start (skip blank)</td><td></td></tr>
|
||||
<tr><td><a href="../select.ts#L459"><code>select.lineStart.skipBlank.jump</code></a></td><td>Jump to line start (skip blank)</td><td></td></tr>
|
||||
<tr><td><a href="../select.ts#L591"><code>select.middleVisibleLine.extend</code></a></td><td>Extend to middle visible line</td><td></td></tr>
|
||||
<tr><td><a href="../select.ts#L590"><code>select.middleVisibleLine.jump</code></a></td><td>Jump to middle visible line</td><td></td></tr>
|
||||
<tr><td><a href="../select.ts#L228"><code>select.right.extend</code></a></td><td>Extend right</td><td><code>Shift+L</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)<code>Shift+Right</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)</td></tr>
|
||||
<tr><td><a href="../select.ts#L227"><code>select.right.jump</code></a></td><td>Jump right</td><td><code>L</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)<code>Right</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)</td></tr>
|
||||
<tr><td><a href="../select.ts#L297"><code>select.to.extend</code></a></td><td>Extend to</td><td><code>Shift+G</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)</td></tr>
|
||||
@ -161,7 +161,7 @@ selections are empty</td><td></td></tr>
|
||||
<tr><td rowspan=37><a href="#selections"><code>selections</code></a></td><td><a href="#selections.changeDirection"><code>selections.changeDirection</code></a></td><td>Change direction of selections</td><td><code>Alt+;</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)</td></tr>
|
||||
<tr><td><a href="#selections.changeOrder"><code>selections.changeOrder</code></a></td><td>Reverse selections</td><td></td></tr>
|
||||
<tr><td><a href="#selections.copy"><code>selections.copy</code></a></td><td>Copy selections below</td><td><code>Shift+C</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)</td></tr>
|
||||
<tr><td><a href="#selections.expandToLines"><code>selections.expandToLines</code></a></td><td>Expand to lines</td><td><code>Alt+X</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)</td></tr>
|
||||
<tr><td><a href="#selections.expandToLines"><code>selections.expandToLines</code></a></td><td>Expand to lines</td><td><code>X</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)</td></tr>
|
||||
<tr><td><a href="#selections.filter"><code>selections.filter</code></a></td><td>Filter selections</td><td><code>Shift+4</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)</td></tr>
|
||||
<tr><td><a href="#selections.merge"><code>selections.merge</code></a></td><td>Merge contiguous selections</td><td><code>Shift+Alt+-</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)</td></tr>
|
||||
<tr><td><a href="#selections.open"><code>selections.open</code></a></td><td>Open selected file</td><td></td></tr>
|
||||
@ -193,7 +193,7 @@ selections are empty</td><td></td></tr>
|
||||
<tr><td><a href="#selections.split"><code>selections.split</code></a></td><td>Split selections</td><td><code>Shift+S</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)</td></tr>
|
||||
<tr><td><a href="#selections.splitLines"><code>selections.splitLines</code></a></td><td>Split selections at line boundaries</td><td></td></tr>
|
||||
<tr><td><a href="#selections.toggleIndices"><code>selections.toggleIndices</code></a></td><td>Toggle selection indices</td><td><code>Enter</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)</td></tr>
|
||||
<tr><td><a href="#selections.trimLines"><code>selections.trimLines</code></a></td><td>Trim lines</td><td><code>Shift+Alt+X</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)</td></tr>
|
||||
<tr><td><a href="#selections.trimLines"><code>selections.trimLines</code></a></td><td>Trim lines</td><td><code>Alt+X</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)</td></tr>
|
||||
<tr><td><a href="#selections.trimWhitespace"><code>selections.trimWhitespace</code></a></td><td>Trim whitespace</td><td><code>Shift+-</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)</td></tr>
|
||||
<tr><td rowspan=6><a href="#selections.rotate"><code>selections.rotate</code></a></td><td><a href="#selections.rotate.both"><code>selections.rotate.both</code></a></td><td>Rotate selections clockwise</td><td><code>Shift+Alt+9</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)</td></tr>
|
||||
<tr><td><a href="#selections.rotate.contents"><code>selections.rotate.contents</code></a></td><td>Rotate selections clockwise (contents only)</td><td></td></tr>
|
||||
@ -1200,31 +1200,25 @@ This command:
|
||||
|
||||
<a name="select.line.below" />
|
||||
|
||||
### [`select.line.below`](../select.ts#L314-L319)
|
||||
### [`select.line.below`](../select.ts#L314-L317)
|
||||
|
||||
Select line below.
|
||||
|
||||
|
||||
This command:
|
||||
- may be repeated with a given number of repetitions.
|
||||
|
||||
Default keybinding: `x` (kakoune: normal)
|
||||
|
||||
<a name="select.line.below.extend" />
|
||||
|
||||
### [`select.line.below.extend`](../select.ts#L344-L349)
|
||||
### [`select.line.below.extend`](../select.ts#L342-L345)
|
||||
|
||||
Extend to line below.
|
||||
|
||||
|
||||
This command:
|
||||
- may be repeated with a given number of repetitions.
|
||||
|
||||
Default keybinding: `s-x` (kakoune: normal)
|
||||
|
||||
<a name="select.line.above" />
|
||||
|
||||
### [`select.line.above`](../select.ts#L376-L379)
|
||||
### [`select.line.above`](../select.ts#L372-L375)
|
||||
|
||||
Select line above.
|
||||
|
||||
@ -1233,7 +1227,7 @@ This command:
|
||||
|
||||
<a name="select.line.above.extend" />
|
||||
|
||||
### [`select.line.above.extend`](../select.ts#L403-L406)
|
||||
### [`select.line.above.extend`](../select.ts#L399-L402)
|
||||
|
||||
Extend to line above.
|
||||
|
||||
@ -1242,7 +1236,7 @@ This command:
|
||||
|
||||
<a name="select.lineStart" />
|
||||
|
||||
### [`select.lineStart`](../select.ts#L452-L474)
|
||||
### [`select.lineStart`](../select.ts#L448-L470)
|
||||
|
||||
Select to line start.
|
||||
|
||||
@ -1267,7 +1261,7 @@ Default keybinding: `a-h` (kakoune: normal)
|
||||
|
||||
<a name="select.lineEnd" />
|
||||
|
||||
### [`select.lineEnd`](../select.ts#L499-L521)
|
||||
### [`select.lineEnd`](../select.ts#L495-L517)
|
||||
|
||||
Select to line end.
|
||||
|
||||
@ -1290,7 +1284,7 @@ Default keybinding: `a-l` (kakoune: normal)
|
||||
|
||||
<a name="select.lastLine" />
|
||||
|
||||
### [`select.lastLine`](../select.ts#L549-L559)
|
||||
### [`select.lastLine`](../select.ts#L545-L555)
|
||||
|
||||
Select to last line.
|
||||
|
||||
@ -1303,7 +1297,7 @@ Select to last line.
|
||||
|
||||
<a name="select.firstVisibleLine" />
|
||||
|
||||
### [`select.firstVisibleLine`](../select.ts#L570-L580)
|
||||
### [`select.firstVisibleLine`](../select.ts#L566-L576)
|
||||
|
||||
Select to first visible line.
|
||||
|
||||
@ -1316,7 +1310,7 @@ Select to first visible line.
|
||||
|
||||
<a name="select.middleVisibleLine" />
|
||||
|
||||
### [`select.middleVisibleLine`](../select.ts#L587-L597)
|
||||
### [`select.middleVisibleLine`](../select.ts#L583-L593)
|
||||
|
||||
Select to middle visible line.
|
||||
|
||||
@ -1329,7 +1323,7 @@ Select to middle visible line.
|
||||
|
||||
<a name="select.lastVisibleLine" />
|
||||
|
||||
### [`select.lastVisibleLine`](../select.ts#L604-L614)
|
||||
### [`select.lastVisibleLine`](../select.ts#L600-L610)
|
||||
|
||||
Select to last visible line.
|
||||
|
||||
@ -1512,7 +1506,7 @@ Expand selections to contain full lines (including end-of-line characters).
|
||||
|
||||
|
||||
|
||||
Default keybinding: `a-x` (kakoune: normal)
|
||||
Default keybinding: `x` (kakoune: normal)
|
||||
|
||||
<a name="selections.trimLines" />
|
||||
|
||||
@ -1524,7 +1518,7 @@ Trim selections to only contain full lines (from start to line break).
|
||||
|
||||
|
||||
|
||||
Default keybinding: `s-a-x` (kakoune: normal)
|
||||
Default keybinding: `a-x` (kakoune: normal)
|
||||
|
||||
<a name="selections.trimWhitespace" />
|
||||
|
||||
|
@ -124,32 +124,32 @@ selections are empty</td><td></td></tr>
|
||||
<tr><td><a href="#select.lastVisibleLine"><code>select.lastVisibleLine</code></a></td><td>Select to last visible line</td><td></td></tr>
|
||||
<tr><td><a href="#select.line.above"><code>select.line.above</code></a></td><td>Select line above</td><td></td></tr>
|
||||
<tr><td><a href="#select.line.above.extend"><code>select.line.above.extend</code></a></td><td>Extend to line above</td><td></td></tr>
|
||||
<tr><td><a href="#select.line.below"><code>select.line.below</code></a></td><td>Select line below</td><td><code>X</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)</td></tr>
|
||||
<tr><td><a href="#select.line.below.extend"><code>select.line.below.extend</code></a></td><td>Extend to line below</td><td><code>Shift+X</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)</td></tr>
|
||||
<tr><td><a href="#select.line.below"><code>select.line.below</code></a></td><td>Select line below</td><td></td></tr>
|
||||
<tr><td><a href="#select.line.below.extend"><code>select.line.below.extend</code></a></td><td>Extend to line below</td><td></td></tr>
|
||||
<tr><td><a href="#select.lineEnd"><code>select.lineEnd</code></a></td><td>Select to line end</td><td><code>Alt+L</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)<code>End</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)</td></tr>
|
||||
<tr><td><a href="#select.lineStart"><code>select.lineStart</code></a></td><td>Select to line start</td><td><code>Alt+H</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)<code>Home</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)</td></tr>
|
||||
<tr><td><a href="#select.middleVisibleLine"><code>select.middleVisibleLine</code></a></td><td>Select to middle visible line</td><td></td></tr>
|
||||
<tr><td><a href="../select.ts#L513"><code>select.documentEnd.extend</code></a></td><td>Extend to last character</td><td></td></tr>
|
||||
<tr><td><a href="../select.ts#L512"><code>select.documentEnd.jump</code></a></td><td>Jump to last character</td><td></td></tr>
|
||||
<tr><td><a href="../select.ts#L509"><code>select.documentEnd.extend</code></a></td><td>Extend to last character</td><td></td></tr>
|
||||
<tr><td><a href="../select.ts#L508"><code>select.documentEnd.jump</code></a></td><td>Jump to last character</td><td></td></tr>
|
||||
<tr><td><a href="../select.ts#L42"><code>select.down.extend</code></a></td><td>Extend down</td><td><code>Shift+J</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)<code>Shift+Down</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)</td></tr>
|
||||
<tr><td><a href="../select.ts#L41"><code>select.down.jump</code></a></td><td>Jump down</td><td><code>J</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)<code>Down</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)</td></tr>
|
||||
<tr><td><a href="../select.ts#L466"><code>select.firstLine.extend</code></a></td><td>Extend to first line</td><td></td></tr>
|
||||
<tr><td><a href="../select.ts#L465"><code>select.firstLine.jump</code></a></td><td>Jump to first line</td><td></td></tr>
|
||||
<tr><td><a href="../select.ts#L578"><code>select.firstVisibleLine.extend</code></a></td><td>Extend to first visible line</td><td></td></tr>
|
||||
<tr><td><a href="../select.ts#L577"><code>select.firstVisibleLine.jump</code></a></td><td>Jump to first visible line</td><td></td></tr>
|
||||
<tr><td><a href="../select.ts#L557"><code>select.lastLine.extend</code></a></td><td>Extend to last line</td><td></td></tr>
|
||||
<tr><td><a href="../select.ts#L556"><code>select.lastLine.jump</code></a></td><td>Jump to last line</td><td></td></tr>
|
||||
<tr><td><a href="../select.ts#L612"><code>select.lastVisibleLine.extend</code></a></td><td>Extend to last visible line</td><td></td></tr>
|
||||
<tr><td><a href="../select.ts#L611"><code>select.lastVisibleLine.jump</code></a></td><td>Jump to last visible line</td><td></td></tr>
|
||||
<tr><td><a href="../select.ts#L462"><code>select.firstLine.extend</code></a></td><td>Extend to first line</td><td></td></tr>
|
||||
<tr><td><a href="../select.ts#L461"><code>select.firstLine.jump</code></a></td><td>Jump to first line</td><td></td></tr>
|
||||
<tr><td><a href="../select.ts#L574"><code>select.firstVisibleLine.extend</code></a></td><td>Extend to first visible line</td><td></td></tr>
|
||||
<tr><td><a href="../select.ts#L573"><code>select.firstVisibleLine.jump</code></a></td><td>Jump to first visible line</td><td></td></tr>
|
||||
<tr><td><a href="../select.ts#L553"><code>select.lastLine.extend</code></a></td><td>Extend to last line</td><td></td></tr>
|
||||
<tr><td><a href="../select.ts#L552"><code>select.lastLine.jump</code></a></td><td>Jump to last line</td><td></td></tr>
|
||||
<tr><td><a href="../select.ts#L608"><code>select.lastVisibleLine.extend</code></a></td><td>Extend to last visible line</td><td></td></tr>
|
||||
<tr><td><a href="../select.ts#L607"><code>select.lastVisibleLine.jump</code></a></td><td>Jump to last visible line</td><td></td></tr>
|
||||
<tr><td><a href="../select.ts#L230"><code>select.left.extend</code></a></td><td>Extend left</td><td><code>Shift+H</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)<code>Shift+Left</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)</td></tr>
|
||||
<tr><td><a href="../select.ts#L229"><code>select.left.jump</code></a></td><td>Jump left</td><td><code>H</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)<code>Left</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)</td></tr>
|
||||
<tr><td><a href="../select.ts#L511"><code>select.lineEnd.extend</code></a></td><td>Extend to line end</td><td><code>Shift+Alt+L</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)<code>Shift+End</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)</td></tr>
|
||||
<tr><td><a href="../select.ts#L462"><code>select.lineStart.extend</code></a></td><td>Extend to line start</td><td><code>Shift+Alt+H</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)<code>Shift+Home</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)</td></tr>
|
||||
<tr><td><a href="../select.ts#L461"><code>select.lineStart.jump</code></a></td><td>Jump to line start</td><td></td></tr>
|
||||
<tr><td><a href="../select.ts#L464"><code>select.lineStart.skipBlank.extend</code></a></td><td>Extend to line start (skip blank)</td><td></td></tr>
|
||||
<tr><td><a href="../select.ts#L463"><code>select.lineStart.skipBlank.jump</code></a></td><td>Jump to line start (skip blank)</td><td></td></tr>
|
||||
<tr><td><a href="../select.ts#L595"><code>select.middleVisibleLine.extend</code></a></td><td>Extend to middle visible line</td><td></td></tr>
|
||||
<tr><td><a href="../select.ts#L594"><code>select.middleVisibleLine.jump</code></a></td><td>Jump to middle visible line</td><td></td></tr>
|
||||
<tr><td><a href="../select.ts#L507"><code>select.lineEnd.extend</code></a></td><td>Extend to line end</td><td><code>Shift+Alt+L</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)<code>Shift+End</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)</td></tr>
|
||||
<tr><td><a href="../select.ts#L458"><code>select.lineStart.extend</code></a></td><td>Extend to line start</td><td><code>Shift+Alt+H</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)<code>Shift+Home</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)</td></tr>
|
||||
<tr><td><a href="../select.ts#L457"><code>select.lineStart.jump</code></a></td><td>Jump to line start</td><td></td></tr>
|
||||
<tr><td><a href="../select.ts#L460"><code>select.lineStart.skipBlank.extend</code></a></td><td>Extend to line start (skip blank)</td><td></td></tr>
|
||||
<tr><td><a href="../select.ts#L459"><code>select.lineStart.skipBlank.jump</code></a></td><td>Jump to line start (skip blank)</td><td></td></tr>
|
||||
<tr><td><a href="../select.ts#L591"><code>select.middleVisibleLine.extend</code></a></td><td>Extend to middle visible line</td><td></td></tr>
|
||||
<tr><td><a href="../select.ts#L590"><code>select.middleVisibleLine.jump</code></a></td><td>Jump to middle visible line</td><td></td></tr>
|
||||
<tr><td><a href="../select.ts#L228"><code>select.right.extend</code></a></td><td>Extend right</td><td><code>Shift+L</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)<code>Shift+Right</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)</td></tr>
|
||||
<tr><td><a href="../select.ts#L227"><code>select.right.jump</code></a></td><td>Jump right</td><td><code>L</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)<code>Right</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)</td></tr>
|
||||
<tr><td><a href="../select.ts#L297"><code>select.to.extend</code></a></td><td>Extend to</td><td><code>Shift+G</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)</td></tr>
|
||||
@ -161,7 +161,7 @@ selections are empty</td><td></td></tr>
|
||||
<tr><td rowspan=37><a href="#selections"><code>selections</code></a></td><td><a href="#selections.changeDirection"><code>selections.changeDirection</code></a></td><td>Change direction of selections</td><td><code>Alt+;</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)</td></tr>
|
||||
<tr><td><a href="#selections.changeOrder"><code>selections.changeOrder</code></a></td><td>Reverse selections</td><td></td></tr>
|
||||
<tr><td><a href="#selections.copy"><code>selections.copy</code></a></td><td>Copy selections below</td><td><code>Shift+C</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)</td></tr>
|
||||
<tr><td><a href="#selections.expandToLines"><code>selections.expandToLines</code></a></td><td>Expand to lines</td><td><code>Alt+X</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)</td></tr>
|
||||
<tr><td><a href="#selections.expandToLines"><code>selections.expandToLines</code></a></td><td>Expand to lines</td><td><code>X</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)</td></tr>
|
||||
<tr><td><a href="#selections.filter"><code>selections.filter</code></a></td><td>Filter selections</td><td><code>Shift+4</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)</td></tr>
|
||||
<tr><td><a href="#selections.merge"><code>selections.merge</code></a></td><td>Merge contiguous selections</td><td><code>Shift+Alt+-</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)</td></tr>
|
||||
<tr><td><a href="#selections.open"><code>selections.open</code></a></td><td>Open selected file</td><td></td></tr>
|
||||
@ -193,7 +193,7 @@ selections are empty</td><td></td></tr>
|
||||
<tr><td><a href="#selections.split"><code>selections.split</code></a></td><td>Split selections</td><td><code>Shift+S</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)</td></tr>
|
||||
<tr><td><a href="#selections.splitLines"><code>selections.splitLines</code></a></td><td>Split selections at line boundaries</td><td></td></tr>
|
||||
<tr><td><a href="#selections.toggleIndices"><code>selections.toggleIndices</code></a></td><td>Toggle selection indices</td><td><code>Enter</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)</td></tr>
|
||||
<tr><td><a href="#selections.trimLines"><code>selections.trimLines</code></a></td><td>Trim lines</td><td><code>Shift+Alt+X</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)</td></tr>
|
||||
<tr><td><a href="#selections.trimLines"><code>selections.trimLines</code></a></td><td>Trim lines</td><td><code>Alt+X</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)</td></tr>
|
||||
<tr><td><a href="#selections.trimWhitespace"><code>selections.trimWhitespace</code></a></td><td>Trim whitespace</td><td><code>Shift+-</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)</td></tr>
|
||||
<tr><td rowspan=6><a href="#selections.rotate"><code>selections.rotate</code></a></td><td><a href="#selections.rotate.both"><code>selections.rotate.both</code></a></td><td>Rotate selections clockwise</td><td><code>Shift+Alt+9</code> (<code>editorTextFocus && dance.mode == 'normal'</code>)</td></tr>
|
||||
<tr><td><a href="#selections.rotate.contents"><code>selections.rotate.contents</code></a></td><td>Rotate selections clockwise (contents only)</td><td></td></tr>
|
||||
@ -1200,31 +1200,25 @@ This command:
|
||||
|
||||
<a name="select.line.below" />
|
||||
|
||||
### [`select.line.below`](../select.ts#L314-L319)
|
||||
### [`select.line.below`](../select.ts#L314-L317)
|
||||
|
||||
Select line below.
|
||||
|
||||
|
||||
This command:
|
||||
- may be repeated with a given number of repetitions.
|
||||
|
||||
Default keybinding: `x` (kakoune: normal)
|
||||
|
||||
<a name="select.line.below.extend" />
|
||||
|
||||
### [`select.line.below.extend`](../select.ts#L344-L349)
|
||||
### [`select.line.below.extend`](../select.ts#L342-L345)
|
||||
|
||||
Extend to line below.
|
||||
|
||||
|
||||
This command:
|
||||
- may be repeated with a given number of repetitions.
|
||||
|
||||
Default keybinding: `s-x` (kakoune: normal)
|
||||
|
||||
<a name="select.line.above" />
|
||||
|
||||
### [`select.line.above`](../select.ts#L376-L379)
|
||||
### [`select.line.above`](../select.ts#L372-L375)
|
||||
|
||||
Select line above.
|
||||
|
||||
@ -1233,7 +1227,7 @@ This command:
|
||||
|
||||
<a name="select.line.above.extend" />
|
||||
|
||||
### [`select.line.above.extend`](../select.ts#L403-L406)
|
||||
### [`select.line.above.extend`](../select.ts#L399-L402)
|
||||
|
||||
Extend to line above.
|
||||
|
||||
@ -1242,7 +1236,7 @@ This command:
|
||||
|
||||
<a name="select.lineStart" />
|
||||
|
||||
### [`select.lineStart`](../select.ts#L452-L474)
|
||||
### [`select.lineStart`](../select.ts#L448-L470)
|
||||
|
||||
Select to line start.
|
||||
|
||||
@ -1267,7 +1261,7 @@ Default keybinding: `a-h` (kakoune: normal)
|
||||
|
||||
<a name="select.lineEnd" />
|
||||
|
||||
### [`select.lineEnd`](../select.ts#L499-L521)
|
||||
### [`select.lineEnd`](../select.ts#L495-L517)
|
||||
|
||||
Select to line end.
|
||||
|
||||
@ -1290,7 +1284,7 @@ Default keybinding: `a-l` (kakoune: normal)
|
||||
|
||||
<a name="select.lastLine" />
|
||||
|
||||
### [`select.lastLine`](../select.ts#L549-L559)
|
||||
### [`select.lastLine`](../select.ts#L545-L555)
|
||||
|
||||
Select to last line.
|
||||
|
||||
@ -1303,7 +1297,7 @@ Select to last line.
|
||||
|
||||
<a name="select.firstVisibleLine" />
|
||||
|
||||
### [`select.firstVisibleLine`](../select.ts#L570-L580)
|
||||
### [`select.firstVisibleLine`](../select.ts#L566-L576)
|
||||
|
||||
Select to first visible line.
|
||||
|
||||
@ -1316,7 +1310,7 @@ Select to first visible line.
|
||||
|
||||
<a name="select.middleVisibleLine" />
|
||||
|
||||
### [`select.middleVisibleLine`](../select.ts#L587-L597)
|
||||
### [`select.middleVisibleLine`](../select.ts#L583-L593)
|
||||
|
||||
Select to middle visible line.
|
||||
|
||||
@ -1329,7 +1323,7 @@ Select to middle visible line.
|
||||
|
||||
<a name="select.lastVisibleLine" />
|
||||
|
||||
### [`select.lastVisibleLine`](../select.ts#L604-L614)
|
||||
### [`select.lastVisibleLine`](../select.ts#L600-L610)
|
||||
|
||||
Select to last visible line.
|
||||
|
||||
@ -1512,7 +1506,7 @@ Expand selections to contain full lines (including end-of-line characters).
|
||||
|
||||
|
||||
|
||||
Default keybinding: `a-x` (kakoune: normal)
|
||||
Default keybinding: `x` (kakoune: normal)
|
||||
|
||||
<a name="selections.trimLines" />
|
||||
|
||||
@ -1524,7 +1518,7 @@ Trim selections to only contain full lines (from start to line break).
|
||||
|
||||
|
||||
|
||||
Default keybinding: `s-a-x` (kakoune: normal)
|
||||
Default keybinding: `a-x` (kakoune: normal)
|
||||
|
||||
<a name="selections.trimWhitespace" />
|
||||
|
||||
|
@ -313,8 +313,6 @@ export function to(
|
||||
|
||||
/**
|
||||
* Select line below.
|
||||
*
|
||||
* @keys `x` (kakoune: normal)
|
||||
*/
|
||||
export function line_below(_: Context, count: number) {
|
||||
if (count === 0 || count === 1) {
|
||||
@ -343,8 +341,6 @@ export function line_below(_: Context, count: number) {
|
||||
|
||||
/**
|
||||
* Extend to line below.
|
||||
*
|
||||
* @keys `s-x` (kakoune: normal)
|
||||
*/
|
||||
export function line_below_extend(_: Context, count: number) {
|
||||
if (count === 0 || count === 1) {
|
||||
|
@ -476,10 +476,10 @@ export function splitLines(
|
||||
*
|
||||
* Expand selections to contain full lines (including end-of-line characters).
|
||||
*
|
||||
* @keys `a-x` (kakoune: normal)
|
||||
* @keys `x` (kakoune: normal)
|
||||
*/
|
||||
export function expandToLines(_: Context) {
|
||||
return Selections.updateByIndex((_, selection, document) => {
|
||||
return Selections.updateByIndex((_i, selection, document) => {
|
||||
const start = selection.start,
|
||||
end = selection.end;
|
||||
|
||||
@ -487,7 +487,7 @@ export function expandToLines(_: Context) {
|
||||
const newStart = start.with(undefined, 0);
|
||||
let newEnd: vscode.Position;
|
||||
|
||||
if (end.character === 0) {
|
||||
if (end.character === 0 && end.line !== start.line) {
|
||||
// End is next line start, which means the selection already includes the
|
||||
// line break of last line.
|
||||
newEnd = end;
|
||||
@ -501,7 +501,7 @@ export function expandToLines(_: Context) {
|
||||
}
|
||||
|
||||
// After expanding, the selection should be in the same direction as before.
|
||||
return Selections.fromStartEnd(newStart, newEnd, selection.isReversed);
|
||||
return Selections.fromStartEnd(newStart, newEnd, Selections.isStrictlyReversed(selection, _));
|
||||
});
|
||||
}
|
||||
|
||||
@ -510,7 +510,7 @@ export function expandToLines(_: Context) {
|
||||
*
|
||||
* Trim selections to only contain full lines (from start to line break).
|
||||
*
|
||||
* @keys `s-a-x` (kakoune: normal)
|
||||
* @keys `a-x` (kakoune: normal)
|
||||
*/
|
||||
export function trimLines(_: Context) {
|
||||
return Selections.updateByIndex((_, selection) => {
|
||||
|
@ -2975,10 +2975,10 @@ typed-rest-client@^1.8.4:
|
||||
tunnel "0.0.6"
|
||||
underscore "^1.12.1"
|
||||
|
||||
typescript@^4.7.4:
|
||||
version "4.7.4"
|
||||
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.7.4.tgz#1a88596d1cf47d59507a1bcdfb5b9dfe4d488235"
|
||||
integrity sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==
|
||||
typescript@^4.8.4:
|
||||
version "4.8.4"
|
||||
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.8.4.tgz#c464abca159669597be5f96b8943500b238e60e6"
|
||||
integrity sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ==
|
||||
|
||||
uc.micro@^1.0.1, uc.micro@^1.0.5:
|
||||
version "1.0.6"
|
||||
|
Loading…
Reference in New Issue
Block a user