-
Notifications
You must be signed in to change notification settings - Fork 271
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
evil-maybe-remove-spaces works for evil-change-line #1487
Conversation
This change make `cc` + `ESC` on indented line produce the same behavior as vim/nvim
@@ -99,6 +99,8 @@ commands opening a new line." | |||
evil-open-below | |||
evil-append | |||
evil-append-line | |||
evil-change |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand the evil-change-line
addition, but not evil-change
if I do c$<escape>
when at the start of a line, this is an evil-change
but vim doesn't remove the indentation spaces..?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
evil-change
is needed forcc <escape>
to remove indentation spaces- As a side effect, this also makes
c $ <escape>
remove indentation spaces
- As a side effect, this also makes
evil-change-line
is needed forC <escape>
to remove indentation spaces- But on my vim
C <escape>
does not remove the indentation spaces
- But on my vim
I don't know how to make both cc <escape>
and c $ <escape>
behave the same as vim. But the minor difference is acceptable for me.
My actual need is to automatically remove trailing spaces at the cursor line when I leave insert state.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah yes, I understand. I've noticed that vi, vim and neovim all behave differently. So evil doesn't really have a solid example to follow. I agree that c$<escape>
is probably acceptable. I won't merge this without tests, so either you'll have to add them, or you'll have to wait for me to add them (sometime next week I hope).
@@ -99,6 +99,8 @@ commands opening a new line." | |||
evil-open-below | |||
evil-append | |||
evil-append-line | |||
evil-change | |||
evil-change-line |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd also be inclined to add evil-change-whole-line
and any others which you notice are the same in vim.
p.s. you can ignore the failing test in 24.5 - it's borked and we're still working on it. |
This change make
cc
+ESC
on indented line produce the same behavioras vim/nvim