-
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
Add duplicate-line-or-region under SPC x l d #6441
Conversation
|
Thank you for your contribution. Several comments:
Yes, it's longer than |
Ok ok, I give in ^^ It is one of my very top-used functions, that's why I wanted to propose it. When bound to something quick I find it very powerful. I wasn't sure if
Emacs' own documentation do not advise it for interactive use (why is it even there then ?!) and recommends Having no idea who uses what, I do not know at all if anybody uses I felt like |
Depends on your keyboard. I am always using laptops, so for me
Haha, funny indeed. But I have it bound to
We should divide
Yeah, it's good intention. What about |
I find that
As they are defined as local, these all have higher priority so there would be no conflicts with either of these. I let you choose which one you prefer, in the mean time I will remove that configuration variable. Cheers |
haha, it's Emacs after all 😜
Didn't know about it. Thanks for bringing it up.
Personally I prefer
👍 |
ce2316e
to
8e41a20
Compare
Updated: changed |
better-defaults layer is for replacing default Emacs key-bindings by enhanced ones. Is it the case here ? I don't use Emacs style but at first sight it seems to not be the case. |
AFAIK, there is no line duplication in Emacs out of box. P. S. Totally forgot about the purpose of this layer..
|
Ok, I did not really understand then, thanks for the explanation. Should I move it somewhere else then ? like where the other line treatment functions are ? |
8e41a20
to
2e8d83a
Compare
Update: now in spacemacs-base along with other Also removed |
2e8d83a
to
cf9982f
Compare
now, I think @deb0ch original suggestion |
cf9982f
to
4a72b6d
Compare
I've been experimenting this with
|
from https://www.emacswiki.org/emacs/CopyingWholeLines Duplicate current line, or region if active. With argument N, make N copies. With negative N, comment out original line and use the absolute value. keybinding: `SPC x l d` (text - line - duplicate)
4a72b6d
to
c011cef
Compare
Line duplication is a nice feature. But I think it should go somewhere else, not into |
Already moved to spacemacs-base and only under |
Oh indeed! That's nice! |
You will not believe it, but I merged 💃 thanks for the PR, it took so long to bring it here 😸 |
Yay ! 🎉 🎊 😺 |
from https://www.emacswiki.org/emacs/CopyingWholeLines
Duplicate current line, or currently selected region if active.
With argument N, make N copies.
With negative N, comment out original line and use the absolute value.
Default keybinding is C-d to allow fast access in emacs editing style, configurable with a layer variable.
Also accessible under
SPC x l d
for "text - line - duplicate".Ongoing reflection:
SPC x l d
seems like the most logical but it is quite long, if you have an idea of something shorter your advice is very welcomed.C-d
seems like a fine shortcut to me: fast access and mnemonic, but as it might (?) break someone's workflow I put it in a configuration variable.Still not sure if that configuration variable is really needed or if we should hard-code it. Input needed.