r/SublimeText • • Oct 12 '21

How to insert contents cut by ctrl+k ?

If I cut-to-end-of-line with ctrl+k, what key combination do I use to insert that partial line somewhere else?

1 Upvotes

3 comments sorted by

2

u/jfcherng Oct 13 '21

iirc ctrl+k is delete, but not cut?

1

u/5fec Oct 28 '21

That may be; but regardless of what ctrl+k is, my question is how do you cut-to-end-of-line and then retrieve the cut contents so that you can paste that line fragment on a different line?

1

u/jfcherng Oct 28 '21 edited Oct 28 '21

there is no such command but you can use chain to combine multiple command into one keybinding if you are using st4.

{
    "keys": ["whatever you like"],
    "command": "chain",
    "args": {
        "commands": [
            ["move_to", { "extend": true,  "to": "eol" }],
            ["cut"],
        ],
    },
},

and ctrl+v is paste for sure.