Skip to content

Commit 6b0980d

Browse files
committed
docs: fix table formatting
1 parent 8b9c20c commit 6b0980d

File tree

1 file changed

+39
-45
lines changed

1 file changed

+39
-45
lines changed

README.md

Lines changed: 39 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# nvim-various-textobjs 🟪🔷🟡 <!-- rumdl-disable-line MD063 `nvim` lowercased -->
1+
# nvim-various-textobjs 🟪🔷🟡 <!-- rumdl-disable-line MD063 `nvim` lowerc.-->
22
<a href="https://dotfyle.com/plugins/chrisgrieser/nvim-various-textobjs">
33
<img alt="badge" src="https://dotfyle.com/plugins/chrisgrieser/nvim-various-textobjs/shield"/></a>
44

@@ -31,46 +31,40 @@ Bundle of more than 30 new text objects for Neovim.
3131

3232
## List of text objects
3333

34-
<!-- rumdl-disable MD058 MD013 FIX table parser broken here -->
35-
36-
| text object | description | inner / outer | forward-seeking | default keymaps |
37-
| :----------------------- | :----------------------------------------------------------------------------------- | :---------------------------------------------------------------------------------------- | :-------------- | :----------------------: |
38-
| `indentation` | surrounding lines with same or higher indentation | [see overview from vim-indent-object](https://github.com/michaeljsmith/vim-indent-object) | \- | `ii`, `ai`, `aI`, (`iI`) |
39-
| `restOfIndentation` | lines downwards with same or higher indentation | \- | \- | `R` |
40-
| `greedyOuterIndentation` | outer indentation, expanded to blank lines; useful to get functions with annotations | outer includes a blank (like `ap`/`ip`) | \- | `ag`/`ig` |
41-
| `subword` | segment of a camelCase, snake_case, and kebab-case words | outer includes trailing/leading `_` or `-` | \- | `iS`/`aS` |
42-
| `toNextClosingBracket` | from cursor to next closing `]`, `)`, or `}`, can span multiple lines | \- | small | `C` |
43-
| `toNextQuotationMark` | from cursor to next unescaped `"`, `'`, or `` ` `
44-
`, can span multiple lines | \- | small | `
45-
Q ` | | `anyQuote ` | between any unescaped `" `, `'
46-
`, or ` ` ` `` in one line | outer includes the quotation marks | small | `iq`/
47-
`aq` |
48-
| `anyBracket` | between any `()`, `[]`, or `{}` in one line | outer includes the brackets | small | `io`/`ao` |
49-
| `restOfParagraph` | like `}`, but linewise | \- | \- | `r` |
50-
| `entireBuffer` | entire buffer as one text object | \- | \- | `gG` |
51-
| `nearEoL` | from cursor position to end of line, excluding last char (and trailing spaces); `{count}` excludes last x chars instead | \- | \- | `n` |
52-
| `lineCharacterwise` | current line, but characterwise | outer includes indentation & trailing spaces | small, if on blank | `i_`/`a_` |
53-
| `column` | column down until indent or shorter line; accepts `{count}` for multiple columns | \- | \- | `\|` |
54-
| `value` | value of key-value pair, or right side of assignment, excluding trailing comment (does not work for multiline assignments) | outer includes trailing `,` or `;` | small | `iv`/`av` |
55-
| `key` | key of key-value pair, or left side of an assignment | outer includes the `=` or `:` | small | `ik`/`ak` |
56-
| `url` | `http` links or any other protocol | \- | big | `L` |
57-
| `number` | numbers, similar to `<C-a>` | inner: only digits, outer: number including minus sign and decimal *point* | small | `in`/`an` |
58-
| `diagnostic` | nvim diagnostic | \- || `!` |
59-
| `closedFold` | closed fold | outer includes one line after the last folded line | big | `iz`/`az` |
60-
| `chainMember` | section of a chain connected with `.` (or `:`) like `foo.bar` or `foo.baz(para)` | outer includes one `.` (or `:`) | small | `im`/`am` |
61-
| `visibleInWindow` | all lines visible in the current window | \- | \- | `gw` |
62-
| `restOfWindow` | from the cursorline to the last line in the window | \- | \- | `gW` |
63-
| `lastChange` | last non-deletion-change, yank, or paste (paste-manipulation plugins may interfere) | \- | \- | `g;` |
64-
| `notebookCell` | cell delimited by [double percent comment][jupytext], such as `# %%` | outer includes the top cell border | \- | `iN`/`aN` |
65-
| `emoji` | single emoji (or Nerdfont glyph) | \- | small | `.` |
66-
| `argument` | comma-separated argument (not as accurate as the `treesitter-textobjects`, use as fallback) | outer includes the `,` | small | `i,`/`a,` |
67-
| `filepath` | UNIX-filepath; supports `~` or `$HOME`, but not spaces in the filepath. | inner is only the filename | big | `iF`/`aF` |
68-
| `color` | HEX; RGB or HSL in CSS format; ANSI color code | inner includes only the color value | small | `i#`/`a#` |
69-
| `doubleSquareBrackets` | text enclosed by `[[]]` | outer includes the 4 square brackets | small | `iD`/`aD` |
70-
71-
[jupytext]:
72-
<https://jupytext.readthedocs.io/en/latest/formats-scripts.html#the-percent-format>
73-
<!-- rumdl-disable MD058, MD013 -->
34+
<!-- rumdl-disable MD060 MD058 MD013 FIX issue due to `` ` `` -->
35+
| text object | description | inner / outer | forward-seeking | default keymaps |
36+
| :----------------------- | :------------------------------------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------------------- | :----------------- | :----------------------: |
37+
| `indentation` | surrounding lines with same or higher indentation | [see overview from vim-indent-object](https://github.com/michaeljsmith/vim-indent-object) | \- | `ii`, `ai`, `aI`, (`iI`) |
38+
| `restOfIndentation` | lines downwards with same or higher indentation | \- | \- | `R` |
39+
| `greedyOuterIndentation` | outer indentation, expanded to blank lines; useful to get functions with annotations | outer includes a blank (like `ap`/`ip`) | \- | `ag`/`ig` |
40+
| `subword` | segment of a camelCase, snake_case, and kebab-case words | outer includes trailing/leading `_` or `-` | \- | `iS`/`aS` |
41+
| `toNextClosingBracket` | from cursor to next closing `]`, `)`, or `}`, can span multiple lines | \- | small | `C` |
42+
| `anyBracket` | between any `()`, `[]`, or `{}` in one line | outer includes the brackets | small | `io`/`ao` |
43+
| `anyQuote` | between any unescaped `"`, `'`, or `` ` `` in one line | outer includes the quotation marks | small | `iq`/`aq` |
44+
| `toNextQuotationMark` | from cursor to next unescaped `"`, `'`, or `` ` ``, can span multiple lines | \- | small | `Q` |
45+
| `restOfParagraph` | like `}`, but linewise | \- | \- | `r` |
46+
| `entireBuffer` | entire buffer as one text object | \- | \- | `gG` |
47+
| `nearEoL` | from cursor position to end of line, excluding last char (and trailing spaces); `{count}` excludes last x chars instead | \- | \- | `n` |
48+
| `lineCharacterwise` | current line, but characterwise | outer includes indentation & trailing spaces | small, if on blank | `i_`/`a_` |
49+
| `column` | column down until indent or shorter line; accepts `{count}` for multiple columns | \- | \- | `\|` |
50+
| `value` | value of key-value pair, or right side of assignment, excluding trailing comment (does not work for multiline assignments) | outer includes trailing `,` or `;` | small | `iv`/`av` |
51+
| `key` | key of key-value pair, or left side of an assignment | outer includes the `=` or `:` | small | `ik`/`ak` |
52+
| `url` | `http` links or any other protocol | \- | big | `L` |
53+
| `number` | numbers, similar to `<C-a>` | inner: only digits, outer: number including minus sign and decimal *point* | small | `in`/`an` |
54+
| `diagnostic` | nvim diagnostic | \- || `!` |
55+
| `closedFold` | closed fold | outer includes one line after the last folded line | big | `iz`/`az` |
56+
| `chainMember` | section of a chain connected with `.` (or `:`) like `foo.bar` or `foo.baz(para)` | outer includes one `.` (or `:`) | small | `im`/`am` |
57+
| `visibleInWindow` | all lines visible in the current window | \- | \- | `gw` |
58+
| `restOfWindow` | from the cursorline to the last line in the window | \- | \- | `gW` |
59+
| `lastChange` | last non-deletion-change, yank, or paste (paste-manipulation plugins may interfere) | \- | \- | `g;` |
60+
| `notebookCell` | cell delimited by [double percent comment][jupytext], such as `# %%` | outer includes the top cell border | \- | `iN`/`aN` |
61+
| `emoji` | single emoji (or Nerdfont glyph) | \- | small | `.` |
62+
| `argument` | comma-separated argument (not as accurate as the `treesitter-textobjects`, use as fallback) | outer includes the `,` | small | `i,`/`a,` |
63+
| `filepath` | UNIX-filepath; supports `~` or `$HOME`, but not spaces in the filepath. | inner is only the filename | big | `iF`/`aF` |
64+
| `color` | HEX; RGB or HSL in CSS format; ANSI color code | inner includes only the color value | small | `i#`/`a#` |
65+
| `doubleSquareBrackets` | text enclosed by `[[]]` | outer includes the 4 square brackets | small | `iD`/`aD` |
66+
<!-- rumdl-enable MD060 MD058 MD013 -->
67+
[jupytext]: <https://jupytext.readthedocs.io/en/latest/formats-scripts.html#the-percent-format>
7468

7569
> [!TIP]
7670
> Some text objects may at first appear redundant, since you can also use `caW`
@@ -255,7 +249,7 @@ behavior. In case you want to have two keymaps, one for each behavior, you can
255249
use this plugin's `setup` call before calling the respective text object.
256250

257251
```lua
258-
-- Example: one keymap for `http` urls only, one for `ftp` urls only
252+
-- example: one keymap for `http` urls only, one for `ftp` urls only
259253
vim.keymap.set({ "o", "x" }, "H", function()
260254
require("various-textobjs").setup {
261255
textobjs = {
@@ -279,7 +273,8 @@ vim.keymap.set({ "o", "x" }, "F", function()
279273
end, { expr = true, desc = "ftp-url textobj" })
280274
```
281275

282-
### `ii` On unindented line should select entire buffer
276+
<!-- rumdl-disable-next-line MD063 `ii` start -->
277+
### `ii` on unindented line should select entire buffer
283278
Using a simple if-else-block, you can create a hybrid of the inner indentation
284279
text object and the entire-buffer text object, if you prefer that kind of
285280
behavior:
@@ -481,8 +476,7 @@ page](https://github.com/chrisgrieser/nvim-various-textobjs/discussions).
481476
## Credits
482477
**Thanks** <!-- rumdl-disable-line MD036 -->
483478
- To the `Valuable Dev` for [their blog post on how to get started with
484-
creating custom text
485-
objects](https://thevaluable.dev/vim-create-text-objects/).
479+
creating custom text objects](https://thevaluable.dev/vim-create-text-objects/).
486480
- [To `@vypxl` and `@ii14` for figuring out
487481
dot-repeatability.](https://github.com/chrisgrieser/nvim-spider/pull/4)
488482

0 commit comments

Comments
 (0)