Skip to content

vim: add text objects for typst bracket pairs #900

Description

@bbb651

Description

The editor vim mode should have text objects for all bracket pairs in typst.

An (exhustive?) list:

  • *bold*
  • _italics_
  • $ "math" $

Unfortunately assuming you're using https://github.com/replit/codemirror-vim the text motions are hardcoded into vim.js, but it seems pretty straight-forward to patch here:
https://github.com/replit/codemirror-vim/blob/1ccb51832283b77738f35f8728e601d3c2207629/src/vim.js#L2588-L2594

Use Case

I often have small math formulas nested in other code, I want to quickly replace their content with ci$

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestNew feature or request.vimHow do I get out of here?

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions