Skip to content

Change while preserving lines#421

Draft
jgdhs27 wants to merge 2 commits into71:masterfrom
jgdhs27:pr421
Draft

Change while preserving lines#421
jgdhs27 wants to merge 2 commits into71:masterfrom
jgdhs27:pr421

Conversation

@jgdhs27
Copy link
Contributor

@jgdhs27 jgdhs27 commented Jan 18, 2026

Introduce new commands to delete while preserving lines, similar to how it is done in Helix.
Before this change, running xc in helix would delete the current line and place the cursor at the new line.
After this change, xc will now clear a line but keep an empty line, where the cursor will start at.

Test Plan:
See new tests inside edit-insert

Refactor: extract delete and deletion-related commands (such as change) from the insert function into a new function named `deleteSelections`

Testing:
```
yarn test
```

TODO separate tests for deletion too
Introduce new commands to delete while preserving lines, similar to how it is done in Helix.
Before this change, running `xc` in helix would delete the current line and place the cursor at the new line.
After this change, `xc` will now clear a line but keep an empty line, where the cursor will start at.

Test Plan:
See new tests inside edit-insert
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants