Open AndreiDuma opened 1 year ago
Thanks for the feedback!
To be honest, I am not quite sure which base VS Code feature the README was referring to here, as Ctrl+Left doesn't seem to do anything on my side... 🤔
I also use the Vim extension as well, so perhaps that's confounding things...
In any case, could you be a bit more specific here? What exactly does the Vim default motion do that you'd like to see restored? Magic Racket currently changes the word separators so that e.g. "foo-bar" becomes a single word, while Vim defaults would treat that as two words: "foo"-"bar". Is this hyphen case the one you mean, or something else?
Thanks for your quick answer!
[...] as Ctrl+Left doesn't seem to do anything on my side [...]
Maybe it is Alt+Left
on your platform? On the Mac I use Option+Left
for the same effect.
Indeed it's the word separator! Since in Scheme/Racket it's common to use identifiers-such-as-this-one
, it'd be very useful to be able to jump inside the subwords. In Vim we can still use W
/B
to skip whole words. Do you think it's worth being able to configure this?
Maybe it is
Alt+Left
on your platform? On the Mac I useOption+Left
for the same effect.
Ah right, I am on macOS as well, and Option+Left does indeed work, thanks. (I swear I tried it earlier! 😅)
Indeed it's the word separator! Since in Scheme/Racket it's common to use
identifiers-such-as-this-one
, it'd be very useful to be able to jump inside the subwords. In Vim we can still useW
/B
to skip whole words. Do you think it's worth being able to configure this?
Thanks for confirming I understand the issue. There are several bits of Magic Racket currently in your way:
Magic Racket adds these default values to settings:
"[racket]": {
"editor.rulers": [
102
],
"editor.wordSeparators": "()[]{}\",'`;#|"
}
This bit you could workaround in your own settings by re-specifying your own value for editor.wordSeparators
that re-adds -
into the list, but there's also...
Magic Racket also contains a "language configuration" with a word pattern that might be in your way (even though the docs say it does not affect word-related editor commands), and I am not aware of user-level way to override that.
The langserver
also marks the entire form (all of "foo-bar") as one symbol, and that may also hamper per-word movement.
I am not sure if all of these bits can be tweaked dynamically (via a checkbox as you're suggesting), so I'll have to investigate those details a bit further. If they can be, then it seems reasonable to add a setting for this to me.
Hi! First of all, thank you for the great extension! I use it daily and it works very well for me.
I have a question/suggestion. In the README one can read the follow aspect:
Would it be possible to make this behavior configurable? I use Vim keybindings and I'm so used to the default motion for
w
andb
that I find it hard to adjust when I switch to a Racket project. Thank you!