Skip to content

Vim mode quality-of-life extras #61

Open
@neumannjan

Description

@neumannjan

Description

Hi,

firstly, Typst is an amazing tool! After a couple months since getting acces, I finally have a use-case to properly write a piece of text in it, so I'm getting quite excited to finally give it a proper try.

The following are just two extra features that currently come to mind that I would love to see the vim mode in the web app to support:

  1. gq commands - If I do for example gqap, it takes the currently selected paragraph and hard-wraps it to max width of 80. This is especially useful in the case of typst, as it's specifically a command tailored for writing text. Basically if you have a long line of text, it automatically adds hard line breaks to fit into the width of 80 characters, if possible. If you are doing the command on multiple lines of text (e.g. the gqap example which does it to the whole paragraph), then it first removes existing line breaks in that selection and then re-does them.
  2. Relative line numbers. This one should be (hopefully) quite simple: the line you're currently on should show the line as-is; and all the other lines should show the number of lines relative to your cursor. It is useful because it is an immediate visual indication of how many j/k presses you need to get to a given line. Then you can just press <number>j (or <number>k) and you're there immediately. Like this:
image

Use Case

This is useful for anyone using the existing vim mode available in the app :) . Makes the experience of using vim mode for writing text just a little bit better.

Metadata

Metadata

Assignees

No one assigned

    Labels

    editorRelated to the text/markup editor.feature requestNew feature or request.vimHow do I get out of here?

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions