Open dakrone opened 2 years ago
Most of these are already supported by this plugin, for instance:
Select word
(from a cursor, it will expand to the current word)Expand selection to quotes or brackets
Select line
For selecting sentences, you may find https://github.com/timhor/obsidian-sentence-navigator useful.
They are supported, but not unified under a single keyboard shortcut, for example, I can bind ^W
to Select word
and hit it to go from foo b|ar baz
to foo |bar| baz
, but then hitting it a second time does nothing (instead of expanding again to |foo bar baz|
like I expect). I'd have to bind three different keystrokes rather than continually hit the same key, as other code editors' implementations work.
Is there a way to get it to progressively widen as I hit a shortcut repeatedly?
Not at the moment, but I can look into how achievable that could be – follow along here: https://github.com/timhor/obsidian-editor-shortcuts/projects/1#card-83261606.
As a first step, I'd like to get quotes and brackets incrementally expanding, as discussed in #21. That should hopefully pave the way for other types of expansions.
I commonly use expanding selection in both Emacs and Intellij, for example, something like this (with the cursor and selection denoted by
|
):It would be great if this worked for text also, for example, just expanding to the current word would be super helpful. Something like:
I picked the unit that made the most sense to me (word -> sentence -> quotes -> outside quotes -> enclosing sentence -> entire text), but even just having "expand to word" would be very useful.
Thanks for this plugin!