Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rectangle region increments by line number #28

Closed
milesfrain opened this issue Aug 6, 2021 · 2 comments
Closed

Rectangle region increments by line number #28

milesfrain opened this issue Aug 6, 2021 · 2 comments

Comments

@milesfrain
Copy link

@ideasman42 originally described this issue cofi#7, but it's still not working correctly on this fork. Instead of incrementing every number by 1, it increments each by the line number of the selection.

For example, starting with:

1 a
2 b
3 c
0 d
0 e

Then selecting the first column (normal mode cursor over 1, Ctrl-v, jjjj), and incrementing (Ctrl-a, or g= in doom emacs), results in:

2 a
4 b
6 c
4 d
5 e

I'd expect this to behave the same as vim and produce:

2 a
3 b
4 c
1 d
1 e
@ideasman42
Copy link
Collaborator

ideasman42 commented Aug 6, 2021

It looks like you're using inc-at-pt-incremental instead of evil-numbers/inc-at-pt which behaves as you expect.

Can you confirm this?

@milesfrain
Copy link
Author

Indeed. Thanks for the troubleshooting help. Looks like I needed g+, not g=.

      :n  "g="    #'evil-numbers/inc-at-pt
      :n  "g-"    #'evil-numbers/dec-at-pt
      :v  "g="    #'evil-numbers/inc-at-pt-incremental
      :v  "g-"    #'evil-numbers/dec-at-pt-incremental
      :v  "g+"    #'evil-numbers/inc-at-pt

https:/hlissner/doom-emacs/blob/6678f3833b5c237b8bf4a0a65449244bec5554e5/modules/editor/evil/config.el#L479-L483

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

No branches or pull requests

2 participants