How do I jump into the `TODO` without deleting the...
# getting-started
n
How do I jump into the
TODO
without deleting the brackets and without using the mouse?
y
This isn't ideal but
Right
, `Left`*2, `Ctrl`+`Shift`+`Left` * 3, then start typing
s
up, up, down, down, left, right, left, right, B, A, Start 🧌
❤️ 6
Is this a live template that comes from a plugin? I haven’t seen autocompletions put a
{ /* TODO */ }
block for a lambda like this before.
y
If it is a live template, I think you can edit it, so you might be able to change it so the selection is only around the comment
☝️ 1
v
Otherwise, just either type
{
or
Ctrl+Shift+w
with default key bindings
n
typing
{
wraps it again in brackets
v
Oh, that's unexpected, sorry. With quotes it works that way. That leaves you with
Ctrl+Shift+w
n
doesn't work on my mac 😞
v
... with default key bidings on non-macs You probabyl have to replace something with Cmd. Just look in your keybinding for "Shrink selection"
👍 1
n
didn't work, 😞 oh well, gotta it all for now.
s
Although I haven’t come across it before, I think the way I would intuitively handle it would be •
Escape
to drop the live template selection • ➡️ to position the cursor directly before the first
/
•
Option
+ ⬆️ (“grow selection”) to select the
/* TODO */
comment •
Delete
(Those are Mac keybindings — adjust as appropriate for your OS/keymap)
v
⌥ ↓ is the default shortcut to shrink selection on macOS keybinding, so that should usually work. If it doesn't, that would then really be strange and candidate for a bug report.
s
I just tested this out, and grow/shrink selection doesn’t seem to work right with live templates. I’m not sure if I would class that as a bug or not. I made a live template that inserts
{ /* TODO */ }
as a default parameter value (which I assume is what’s happening in the OP) and when I use “shrink selection” it drops the whole selection, rather than shrinking step by step. Once it’s dropped the selection, “grow selection” does work okay, though.
Live template placeholders often do seem to behave differently from normal selections 🤔
😞 1
m
tab + enter(when hovered) if you have more than 1 todo tab should switch to next one when you click once more
v
How does that help? Does that preserve the curly braces? And more importantly, how do you hover and click wihtout using the mouse? o_O
😬 1
m
Ohh Sorry i think i have mixed with Xcode’s, well now just trying in Android Studio and the most close one I could find
DEL
+
{
the
}
is also automatically added after, so you find yourself between brackets Then you can go to below lambda with
Enter
👍 1