zyedidia / micro

A modern and intuitive terminal-based text editor
https://micro-editor.github.io
MIT License
25.21k stars 1.18k forks source link

how to config micro for select-to-copy and right-click-to-paste #3534

Closed qbai closed 4 days ago

qbai commented 1 week ago

as titled

niten94 commented 5 days ago

Text is copied to the primary clipboard when selected if the useprimary option is enabled, but useprimary is enabled by default so the option may not need to be changed. The primary clipboard content can be pasted using the PastePrimary action. Right click can be binded to the action when running this command in micro: bind MouseRight PastePrimary. A line can also be added in ~/.config/micro/bindings.json like this to bind the action:

{
    "MouseRight": "PastePrimary"
}

Please note that the primary clipboard is different with the regular clipboard that other actions in micro use. Both can be used in other programs and may also contain different text content.

qbai commented 4 days ago

thanks a lot