Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(Feature request) Cancelling the @ trigger when we really just want to use the @ character #4692

Closed
diyoyo opened this issue Mar 14, 2024 · 8 comments

Comments

@diyoyo
Copy link

diyoyo commented Mar 14, 2024

Describe feature

Very often, I want to type word with an @ that are not related to note-linking.
Just because I like the emphasis it gives to a word, or because I'm implicitly writing that I'm referring to an instagram account or whatsoever.

Additional Information

Currently, the only way to skip the 'linking note' automation, is to use the right-arrow key. But that's never enough, any time I edit the note, the 'linking note' automation comes back and interfere with my current flow.

At the end of the day, this is almost a bug report rather than a feature request, I'd say.

@meichthys
Copy link
Collaborator

It probably doesn't help much, but typing any charachter before the @ symbol prevents the note linking dropdown from showing up. so you could do something like .@yourt_text if that's not too much of a distraction.

@diyoyo
Copy link
Author

diyoyo commented Mar 14, 2024

It probably doesn't help much, but typing any charachter before the @ symbol prevents the note linking dropdown from showing up. so you could do something like .@yourt_text if that's not too much of a distraction.

Well, that is too much of a distraction, since I have cases where the previous character must be a space, in a long sentence ending with @something . Yes, I'm being picky here, sorry 🙈
I tried adding special code quotes: @helloworld like in markdown , and I'm not bothered by the menu while I am typing. But... the menu appears after I type the closing quote :(

@diyoyo
Copy link
Author

diyoyo commented Mar 14, 2024

I must add that the problem is not so much the menu itself.

What happens is that when you go back on it and the focus is at the end of the @ word, if you hit enter inadvertantly , you'll link the @ word to an inexisting note, which will result in a [missing note] link, make the word unreadable

  1. image
  2. image
  3. image
  4. Then hit 'Enter' to go to next line

  5. Then realize that you triggered the note menu and hit 'Escape'

image

@meichthys
Copy link
Collaborator

meichthys commented Mar 14, 2024

Also probably too much of a distraction, but you can add a @ at the end of your word to cancel the dropdown like this:

@yourword@

I'm only trying to help you within the confines of the existing feature-set since Trilium is in maintenance mode and will likely not receive feature updates.
TriliumNext will carry Trilium forward with new feature requests and the like, but a TriliumNext release is still a little ways off.

@X-Bruce-Y
Copy link

X-Bruce-Y commented Mar 15, 2024

Hi I'm thinking about 2 ways. If it does not distract you much, you can finish typing the whole paragraph after @ and finally ESC. Otherwise you may try always use AT or some rare combinations you like to indicate @ and write a script to replace AT with @ hourly or manually through launch bar.

@diyoyo
Copy link
Author

diyoyo commented Mar 21, 2024

Hi I'm thinking about 2 ways. If it does not distract you much, you can finish typing the whole paragraph after @ and finally ESC. Otherwise you may try always use AT or some rare combinations you like to indicate @ and write a script to replace AT with @ hourly or manually through launch bar.

Actually, I tried using ESC, but it's tricky, because everytime you mistakenly click and place the cursor anywhere after the @, then the auto-completion is triggered.

@meichthys
Copy link
Collaborator

Another one that works is:

!@your_word_here

@zadam
Copy link
Owner

zadam commented Mar 28, 2024

Hi, I implemented a workaround which should deactivate the "mention UI" on escape.

It's kind of a hack by inserting an "n space" character which acts as a disallowed character for the autocomplete.

Unfortunately the implementation in CKEditor is regex based and given we allowed spaces for searching in the autocomplete, we need some other way to terminate the autocomplete.

This will be released in the next patch release.

@zadam zadam closed this as completed Mar 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants