Skip to content

UX - buttons: copy at & copy to clipboard #19

@Blind4Basics

Description

@Blind4Basics

Request:
currently, there are a lot of clicks to do on user's side. For 2 lines snippets, this means there are no storng advantage to go through the snippets provider rather than just type the code. Here are some ideas to make the snippets provider quicker to use.

Copy to clipboard button

(currently automatically inherited from polyglot)

A button to be shown on each snippet code block

"Paste at cursor position" button

A second button, on each code block, that would paste the snippet directly at the current cursor position in the "parent" editor.
Things to consider:

  • add in the current line? (meaning, possibly right in the middle of the current instruction)
  • replace current line?
  • insert the snippet before or after current line
  • change the behavior if a selection exists? (=> replace the content with the snippet, in that case?)

"insert before current line" would have my preference, I believe (without selection).

Note: the context menu I was talking about in #14 could be of use to provide different options there. Especially, insert before vs replace

"Paste at cursor position" on double click

Same as above, but triggering it with a double click on the snippet code block. Most likely more useful than button ('cause, quicker), but the button still would be nice, to showcase the functionality (sort of...).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions