hluk / CopyQ

Clipboard manager with advanced features
GNU General Public License v3.0
8.24k stars 430 forks source link

edit() function to support builtin editor bypass, notes too #2672

Closed elig0n closed 2 months ago

elig0n commented 2 months ago

it would be useful to be able to force using the non-external editor with edit() for example with an argument.

Also please consider implementing edit_note() to open an editor with the item note

hluk commented 2 months ago

Good idea. Draft for the new API:

editItem(row[, mimeType[, data]])

    Edits specific format for the item.

    Opens external editor if set, otherwise opens internal editor.

    If row is -1 (or other negative number) edits clipboard instead and creates new item.

For example to edit 3rd item's notes: editItem(2, mimeItemNotes)

I'm also changing the current behavior so that the external editor (if set) opens for edit notes instead of the internal one.

hluk commented 2 months ago

I'm also changing the current behavior so that the external editor (if set) opens for edit notes instead of the internal one.

Actually, disregard this. It would be inconsistent with the default edit shortcut (F2).

But it would be possible to assign custom command to edit notes in the external editor.