Sometimes I use intellij idea, it's text editor has a default behavior for CMD+C, if you don't select anythings, it will copy current line. While CMD+X will cut the current line. Maybe it's not a bad idea.
On Aug 29, 2012, at 4:21 PM, Yuan Jiang sleetdrop@gmail.com wrote:
Sometimes I use intellij idea, it's text editor has a default behavior for CMD+C, if you don't select anythings, it will copy current line. While CMD+X will cut the current line. Maybe it's not a bad idea.
This is very the new ‘dyn.selection’ scope selector comes in handy, here are two commands bound to ⌘C and ⌘X respectively, but only when there is no selection:
They work on the line without the newline though. For including the newline, they should probably be macros instead that does a line select followed by cut/copy — that might actually be better also because we then use the “real” cut/copy of TM (which is certain to work with clipboard history), but as 2.0 can’t yet save macros, commands it was…
On Aug 29, 2012, at 10:21 AM, Yuan Jiang sleetdrop@gmail.com wrote:
Sometimes I use intellij idea, it's text editor has a default behavior for CMD+C, if you don't select anythings, it will copy current line. While CMD+X will cut the current line. Maybe it's not a bad idea.
Probably doable with a command that takes either the selection or the current line and sends it to `pbcopy`. I haven't tried it.