Copy line when no text is selected


#1

if you have no text selected and hit the copy command, the text should be placed into the clipboard buffer. this is similar to how textmate and sublime text work.


#2

Also interesting to note that cmd+x (cut) without a selection currently deletes the next character and doesn’t add it to the clipboard.


#3

yes, I’d say that should remove the line as well, while putting into the clipboard buffer.


#4

yes please - cmd+c should copy the whole line if no text is selected. Also, +1 for cmd+x cutting the whole line and putting it in the clipboard if no text is selected.


#5

There is an Atom package that will add this behavior https://atom.io/packages/cut-line


Cmd-x when nothing is selected should cut the line
#6

The Cut-line package is very good. However, there is another functionality when you copy o cut a line with not text selected, in ST: when you paste the copied line, it is inserted under the current line, not between the characters where the cursor currently is.

How could be added this feature?


#7

doesn’t sound like it’s copying the line endings


#8

Yes, the script have to copy the line endings (\n or \r\n). But the script should also insert a line break when you paste the clipboard buffer, at the end of the current line.

Don’t know how you could do that. =$


#9

Yes, please, add this functionality.


#10

+1 from my side also.


#11

Looks to me like there is a package that solves the original issue. If there is a bug in the package, then please create an issue on it. If there is some additional feature that people want, a new topic should be started.

“+1” and “please add this” are not specific enough to be actionable. I can’t tell what you want.


#12

Please make so when you copy/cut without a selection, the entire line (with new line feed) is copied/cut.

No packages has worked for me so far, but I’m gonna give another try.

Thanks!

Update.
This worked https://github.com/tekkub/cut-line


#13

Sounds like it is fixed.


#14

@leedohm By “fixed”, do you mean that there’s a package available (cut-line) or that it’s been fixed upstream?


#15

I mean it is fixed in that there is a solution to the original issue.


#16

To copy line, when no text is selected
press Ctrl+Shift+D