notes icon indicating copy to clipboard operation
notes copied to clipboard

"auto"-completion of text

Open newhinton opened this issue 3 years ago • 5 comments

I would like to propose a new feature for the markdown editor (that i am willing to implement)

When a user types any type of bracket, usually the user wants to also complete the opposite bracket. So if the user types an opening bracket, notes could insert the closing bracket after the cursor. Many IDE's have similar features.

Caveats: old-school smileys would require the user to remove the wrong closing bracket, but with a simple rule system we could limit such false positives.

Is that something we want for the notes-app? Are there other issues with that? Could we auto-apply suggestions for other elements too?

newhinton avatar Mar 31 '22 14:03 newhinton

This could also be expanded to provide suggestions. eg:

! []() The exclamationmark was typed by the user, and we suggest the codeblock. if the user confirms with an enter, we insert the text, and on any other input we discard it. Suggestions should be a different color, and not count to the history of actions

newhinton avatar Mar 31 '22 15:03 newhinton

For posteriority i found this:

https://stackoverflow.com/questions/22549505/make-css-tooltip-follow-cursor

This may help me implement something appropriate.

newhinton avatar Jul 13 '22 13:07 newhinton

I'm still unsure about this feature. There are always situations, where automatic insertions or suggestions are false positives and these can be very annoying. Therefore, personally, I tend to don't want to have such a feature. But I'm interesting in other opinions, too.

korelstar avatar Aug 05 '22 19:08 korelstar

We dont nessessarily need to "type" anything. But we could provide suggestions (that are 'ghost'-added to the editor) which then can be inserted with enter, just like IDE's do with code.

I dont think false positives are that much of a deal, but i can see where this feature may be against this app beeing 'Distraction-free' with such suggestions.

newhinton avatar Aug 05 '22 20:08 newhinton

I guess one would need to define the use cases before deciding whether to implement or not such a feature. Much "boilerplate" might be such uses cases - namely images and links. What else use cases do you have in mind? emojis should be handeled in the long term separately, so all we can save are 2-3 characters maybe, right?

stefan-niedermann avatar Aug 05 '22 20:08 stefan-niedermann