aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2025-01-19 19:39:42 +0100
committerbptato <nincsnevem662@gmail.com>2025-01-19 19:46:56 +0100
commite00b84ba6dbd7880d22dc9aafa05caff0c300dc4 (patch)
treed5a564b1495f9d62cca24e8db7406aaefd1d7aae /doc
parent692cc321e71c3d8ba39563c0882a668c17c180f0 (diff)
downloadchawan-e00b84ba6dbd7880d22dc9aafa05caff0c300dc4.tar.gz
container, config.toml: add | command
Particularly useful when debugging minified JS. vi always wraps; the centering behavior is from vim.
Diffstat (limited to 'doc')
-rw-r--r--doc/api.md9
-rw-r--r--doc/config.md7
2 files changed, 16 insertions, 0 deletions
diff --git a/doc/api.md b/doc/api.md
index 29c7773e..991ef1d7 100644
--- a/doc/api.md
+++ b/doc/api.md
@@ -590,6 +590,15 @@ Returns a promise, so consumers must `await` it to get the text.</td>
</tr>
<tr>
+<td>`setCursorX(x)`, `setCursorY(y)`, `setCursorXY(x, y)`,
+`setCursorXCenter(x)`, `setCursorYCenter(y)`, `setCursorXYCenter(x, y)`</td>
+<td>Set the cursor position to `x` and `y` respectively, scrolling the
+view if necessary.<br>
+Variants that end with "Center" will also center the screen around the
+position if it is outside the screen.</td>
+</tr>
+
+<tr>
<td>`url`</td>
<td>Getter for the buffer's URL. Note: this returns a `URL` object, not a
string.</td>
diff --git a/doc/config.md b/doc/config.md
index 6e3b3fe5..7354224d 100644
--- a/doc/config.md
+++ b/doc/config.md
@@ -1470,6 +1470,13 @@ page.</td>
</tr>
<tr>
+<td><kbd>|</kbd>, None</td>
+<td>`cmd.buffer.gotoColumnOrBegin`, `cmd.buffer.gotoColumnOrEnd`</td>
+<td>If n is specified, jump to column n of the current line.
+Otherwise, jump to the first/last column.</td>
+</tr>
+
+<tr>
<td><kbd>m</kbd></td>
<td>`cmd.buffer.mark`</td>
<td>Wait for a character `x` and then set a mark with the ID `x`.</td>