Skip to content

vim: Increment date segments independently in Helix mode - #58098

Closed
jgarte wants to merge 1 commit into
zed-industries:mainfrom
jgarte:47356_helix_increment_decrement_months_days
Closed

vim: Increment date segments independently in Helix mode#58098
jgarte wants to merge 1 commit into
zed-industries:mainfrom
jgarte:47356_helix_increment_decrement_months_days

Conversation

@jgarte

@jgarte jgarte commented May 29, 2026

Copy link
Copy Markdown
Contributor

Closes #47356

Vim mode behavior is unchanged.

Release Notes:

  • Fixed Helix mode incrementing/decrementing the year instead of the month or day segment under the cursor in dates like 2024-01-15 (#47356).

In Helix mode, ctrl-a/ctrl-x on a date like 2024-01-15 always
incremented the year regardless of cursor position, because the
backward scan treated the hyphen as a negative sign and walked back to
the first segment.

Treat a hyphen that separates two numbers (preceded by a digit) as a
boundary in Helix mode so the segment under the cursor increments
independently, matching Helix. A hyphen not preceded by a digit is
still interpreted as a negative sign. Vim mode behavior is unchanged
(it continues to match Neovim). Also stay in HelixNormal after the
operation so repeated increments keep working.

Closes zed-industries#47356
@cla-bot cla-bot Bot added the cla-signed The user has signed the Contributor License Agreement label May 29, 2026
@zed-community-bot zed-community-bot Bot added the first contribution the author's first pull request to Zed. NOTE: the label application is automated via github actions label May 29, 2026
@jgarte
jgarte marked this pull request as draft May 29, 2026 21:28
@kjyv

kjyv commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Vim mode behaviour is equally wrong and possibly a single fix is better? I don't know zed enough to make that decision but you might want to check my PR #58327

@jgarte

jgarte commented Jun 8, 2026

Copy link
Copy Markdown
Contributor Author

@kjyv Thanks for the message. I'll try to take a look soon. This week will be busy for me but give me about 2 weeks to get around to it. All best.

@SomeoneToIgnore

Copy link
Copy Markdown
Contributor

Keeping the PR queue a bit cleaner and will close this one for now, sorry: it's a draft PR with no activity for over a month and merge conflicts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement first contribution the author's first pull request to Zed. NOTE: the label application is automated via github actions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Helix mode fails to increment/decrement months/days in dates

3 participants