-
Notifications
You must be signed in to change notification settings - Fork 687
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Jump after the closing brackets (]]
) on autocomplete
#962
Comments
That's an interesting optimization, I can see it speeding things up when writing notes. |
I'm trying to implement this feature but found problem. Like @riccardoferretti said, it will interfere the section use case. Here is the demo, cursor jump after the closing bracket that cannot trigger the section auto completion. but the cursor move in section auto completion is work fine. Maybe can trigger the cursor jump with |
Maybe leave it optional for people not using sections? (I'm not) |
@Lauviah0622 Not sure which char you were using to confirm |
I'm sorry forgot to record my keystroke in demo! Here is the new version. And here is the file change on my current branch. Because it just added the command after selection of auto complete simply, So It will move cursor with any confirm method - both press I'll trying to use custom command to parse the regex of current line instead of the built in |
Here is the demo of completion. Not move cursor completion with And recording the suggest of the @luisherranz. I also add the setting of the feature that can turn the moving enabled/disabled. (I'm not native English speaker and need the help for the setting description) But there's a problem is, if user want use link alias, user should move cursor back to the start of the closing bracket by them self. Maybe we can add another commitCharacters |
@Lauviah0622 this looks pretty sweet. A few comments:
what do you think? |
@riccardoferretti Thank for appreciation.
In my opinion, it's the subtle change and like you said its the enhancement with no effort. If there is any reason that need a setting to disabled, which is the feature maybe will confuse somebody's muscle memory. But I think it's just a matter of getting used to it.
I'm agree with that ! Its make the operation so smooth. Here is demo: |
I absolutely love it! |
Awesome! Will this work with |
It does 🙂 I've been using it for a few days now and I absolutely love it. Thanks a lot @Lauviah0622 🎉 Closing this as complete now. |
Is your feature request related to a problem? Please describe.
I'd love Foam to jump ahead the closing brackets
]]
when I use autocomplete.Describe the solution you'd like
When using autocomplete (by either clicking or using
Tab/Enter
on a result), Foam moves the cursor to the last word, like this:I am linking to [[some page|]]
You then have to type
]]
to continue writing.It'd be great if Foam could jump ahead after the
]]
instead, like this:I am linking to [[some page]]|
Then you could open double brackets
[[
, partially complete the name of the page (some p
), useTab
to finish the autocomplete, and keep writing the next words.Describe alternatives you've considered
Write the
]]
yourself, although I can't imagine a case where you wouldn't want to jump ahead. Similar software, like LogSeq, already works this way.Screenshots or Videos
No response
The text was updated successfully, but these errors were encountered: