Option to disable entire line copying with cmd-c if nothing is selected


(zach dwiel) #1

Currently, cmd-c will copy the entire line if nothing is currently selected. I use talon to interact with my computer by voice and I have many commands which automate the pressing of cmd-c in order to determine if anything is selected, and act differently if so. Would it be possible to add a new action that could be bound to cmd-c which does not copy the entire line if nothing is selected?


(Takuya Matsuyama) #2

Hi zach,

Thank you for the question.
To change the editor behaviors, you have to create your own command and bind it to a keystroke.
cmd-c is bound to core:copy command with body selector.
You can create a command like custom:copy with .CodeMirror textarea.
I’m planning to write about such customizations in detail on the documentations.
So please wait.


(Takuya Matsuyama) #3

Here is a documentation about how to tweak commands:

You have to learn CodeMirror’s API to change the copy operation.


(zach dwiel) #4

Cool thanks