-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Check for universal argument before paste #11340
Conversation
This commit fixes syl20bnr#4219 and fixes syl20bnr#8897
Another PR also suggests adding a universal argument to paste: How do this PR compare to that one? |
What has done in #11858 has already been included in this pull request.
|
Ok then we'll prefer this one over #11858 |
It's fine to remove the form-feed character in this instance.
Thank you for contributing to Spacemacs! |
We should use
(interactive "*P")
inspacemacs/evil-mc-paste-before
andspacemacs/evil-mc-paste-after
to get the raw prefix argument.evil-paste-before
andevil-paste-after
don't support plain prefix argument, so if we press SPC u p inspacemacs
, we want to paste one time without indenting.But there is already a meaning of C-u C-y in
emacs
, which is put point at beginning, and mark at end when yanking. So it's ambiguous when we trigger C-u C-y inspacemacs
.We may want to yank with the point at beginning or just yank without indenting.We do both of them before, which looks like a misuse. After this pull request, C-u C-y will only yank without indenting. There may be some
emacs
users confuse with it, but if they don't work onspacemacs-indent-sensitive-modes
, they should also be confused before.And as there is only one
universal-argument
inemacs
, we couldn't do something like paste four times with auto indent disabled temporarily. So maybe we should find another way to temporarily disable auto indent?By the way, as
defadvice
is obsolete, I replace the use ofspacemacs|advise-commands
withadvice-add
.