Cmd + Shift + ← should move cursor to the end of the previous line when positioned before an indented token
- Dominant language
- TypeScript
- Stars
- 193k
- Forks
- 42.4k
- PR merge metrics
- PR metrics pending
Description
When the cursor is placed before an indented token on a new line, pressing `Cmd + Shift + ←` should jump to the end of the previous line, allowing a single Backspace to delete all indentation and pull the token up.
```ts
const memberships = await this.entityManager.find(
CompanyMembershipEntity,
...
```
Starting point:
```ts
find(
|CompanyMembershipEntity,
```
**Actual behavior:**
Problem 1 – `Press Cmd + Shift + ←` once:
```ts
find(
| CompanyMembershipEntity,
```
Cursor moves to the beginning of the line, before all spaces.
Now I have to press Backspace 2 times (or however many spaces / tabs there are) to delete the indentation.
Problem 2 – Press `Cmd + Shift + ←` twice:
```ts
const memberships = await this.entityManager|.find(
CompanyMembershipEntity,
```
Cursor jumps further left to the previous line, often before .find, skipping completely over the opening parenthesis.
https://github.com/user-attachments/assets/15887ea1-6b0a-4012-84bb-b9b603d79d4c
Expected behavior:
Press `Cmd + Shift + ←` once:
```ts
find(|
CompanyMembershipEntity,
```
Cursor moves directly after the opening parenthesis ( on the previous line.
Then press `Backspace` once:
```ts
find(|CompanyMembershipEntity,
where,
{ populate }
);
```
All indentation is deleted with ONE keystroke – the entire block of spaces is removed at once, and CompanyMembershipEntity is now on the same line as `find(`.
WS:
https://github.com/user-attachments/assets/553274af-408a-476b-ba50-7765a24abdad
Contributor guide
Assessment
This issue has not been assessed yet.