VSCodeVim / VSCodeVim/Vim

Movements `(` and `)` should respect `startofline` setting

Open
#4,196 4 comments 0 reactions 1 assignee View on GitHub

@J-Fields is already working on this.

Since Jan 8, 2020.

kind/bug
Dominant language
TypeScript
Stars
15.2k
Forks
1.5k
Avg merge
3d 18h
Merged PRs (30d)
6

Description

Is your feature request related to a problem? Please describe.
Movements ( and ) should respect startofline setting (enabled by default).

Describe the solution you'd like
Given

one

  two

    >t<hree

Pressing ( twice should place the cursor at significant start of line (whitespace removed).

one

  >t<wo

    three

Currently cursor is placed at first column no matter if followed by whitespace.

one

><  two

    three

Describe alternatives you've considered
Remapping to (_ seems to work. Supporting visual mode requires additional remappings. However, I think this is what startofline is meant to configure?

"vim.normalModeKeyBindingsNonRecursive":  [
        {
            "before": ["("],
            "after": ["(", "_"]
        },
        {
            "before": [")"],
            "after": [")", "_"]
        }
]

Related to https://github.com/VSCodeVim/Vim/issues/4137.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.