Keyboard shortcut to move between highlighted fields in Visual Studio Code snippets?
I was trying to use the snippet completion for the Javascript "Array.prototype.forEach", which brings up a snippet with two highlighted fields (one for the array, and the second for the array element in the callback.) I can get through the first three steps depicted below, but I am at a loss for how to "tab over" to the last field.
Step 1: evoke the snippet by typing
"forE"
Step 2: select the snippet from the dropdown menu, press Enter. VSCode fills it in, highlights two fields, selects the first field and places the cursor at the end of the first field.
Step 3: type the name of the array on which you want to execute the forEach function.The generic label "array" is replaced
Step 4: [Need help here] how do I select the next field? Using the mouse deselects all fields. Is there a keyboard shortcut I have missed in the documentation?
Steps taken thus far:
- Reading VS Code documentation for Snippets (even that for Emmet and Emmet 2.0, in case this behavior was somehow governed by that).
- Searching Stack Overflow
- Searching Superuser (no similar questions found in either forum).
vscode
add a comment |
I was trying to use the snippet completion for the Javascript "Array.prototype.forEach", which brings up a snippet with two highlighted fields (one for the array, and the second for the array element in the callback.) I can get through the first three steps depicted below, but I am at a loss for how to "tab over" to the last field.
Step 1: evoke the snippet by typing
"forE"
Step 2: select the snippet from the dropdown menu, press Enter. VSCode fills it in, highlights two fields, selects the first field and places the cursor at the end of the first field.
Step 3: type the name of the array on which you want to execute the forEach function.The generic label "array" is replaced
Step 4: [Need help here] how do I select the next field? Using the mouse deselects all fields. Is there a keyboard shortcut I have missed in the documentation?
Steps taken thus far:
- Reading VS Code documentation for Snippets (even that for Emmet and Emmet 2.0, in case this behavior was somehow governed by that).
- Searching Stack Overflow
- Searching Superuser (no similar questions found in either forum).
vscode
Waht do you mean by next field? Do you mean a shortcut to select the element keyword?
– amicoderozer
Jan 4 at 16:26
Yes, that's exactly what I mean.
– vipatron
Jan 4 at 16:28
Tab seems to do the job on my version of Visual Studio Code
– amicoderozer
Jan 4 at 16:29
1
tab works only if I haven't changed the "array" keyword yet. If I type out the array's name ("carts", in this case), and then press tab, VSCode deselects everything. I think I figured out a workaround, though. I press Enter, then Tab, and that seems to work. I imagine Enter is setting the array keyword to a value, then Tab is doing what is expected. Thanks for your help!
– vipatron
Jan 4 at 16:34
Yes I pressed enter and then tab. Your welcome!
– amicoderozer
Jan 4 at 16:37
add a comment |
I was trying to use the snippet completion for the Javascript "Array.prototype.forEach", which brings up a snippet with two highlighted fields (one for the array, and the second for the array element in the callback.) I can get through the first three steps depicted below, but I am at a loss for how to "tab over" to the last field.
Step 1: evoke the snippet by typing
"forE"
Step 2: select the snippet from the dropdown menu, press Enter. VSCode fills it in, highlights two fields, selects the first field and places the cursor at the end of the first field.
Step 3: type the name of the array on which you want to execute the forEach function.The generic label "array" is replaced
Step 4: [Need help here] how do I select the next field? Using the mouse deselects all fields. Is there a keyboard shortcut I have missed in the documentation?
Steps taken thus far:
- Reading VS Code documentation for Snippets (even that for Emmet and Emmet 2.0, in case this behavior was somehow governed by that).
- Searching Stack Overflow
- Searching Superuser (no similar questions found in either forum).
vscode
I was trying to use the snippet completion for the Javascript "Array.prototype.forEach", which brings up a snippet with two highlighted fields (one for the array, and the second for the array element in the callback.) I can get through the first three steps depicted below, but I am at a loss for how to "tab over" to the last field.
Step 1: evoke the snippet by typing
"forE"
Step 2: select the snippet from the dropdown menu, press Enter. VSCode fills it in, highlights two fields, selects the first field and places the cursor at the end of the first field.
Step 3: type the name of the array on which you want to execute the forEach function.The generic label "array" is replaced
Step 4: [Need help here] how do I select the next field? Using the mouse deselects all fields. Is there a keyboard shortcut I have missed in the documentation?
Steps taken thus far:
- Reading VS Code documentation for Snippets (even that for Emmet and Emmet 2.0, in case this behavior was somehow governed by that).
- Searching Stack Overflow
- Searching Superuser (no similar questions found in either forum).
vscode
vscode
asked Jan 4 at 16:13
vipatronvipatron
12
12
Waht do you mean by next field? Do you mean a shortcut to select the element keyword?
– amicoderozer
Jan 4 at 16:26
Yes, that's exactly what I mean.
– vipatron
Jan 4 at 16:28
Tab seems to do the job on my version of Visual Studio Code
– amicoderozer
Jan 4 at 16:29
1
tab works only if I haven't changed the "array" keyword yet. If I type out the array's name ("carts", in this case), and then press tab, VSCode deselects everything. I think I figured out a workaround, though. I press Enter, then Tab, and that seems to work. I imagine Enter is setting the array keyword to a value, then Tab is doing what is expected. Thanks for your help!
– vipatron
Jan 4 at 16:34
Yes I pressed enter and then tab. Your welcome!
– amicoderozer
Jan 4 at 16:37
add a comment |
Waht do you mean by next field? Do you mean a shortcut to select the element keyword?
– amicoderozer
Jan 4 at 16:26
Yes, that's exactly what I mean.
– vipatron
Jan 4 at 16:28
Tab seems to do the job on my version of Visual Studio Code
– amicoderozer
Jan 4 at 16:29
1
tab works only if I haven't changed the "array" keyword yet. If I type out the array's name ("carts", in this case), and then press tab, VSCode deselects everything. I think I figured out a workaround, though. I press Enter, then Tab, and that seems to work. I imagine Enter is setting the array keyword to a value, then Tab is doing what is expected. Thanks for your help!
– vipatron
Jan 4 at 16:34
Yes I pressed enter and then tab. Your welcome!
– amicoderozer
Jan 4 at 16:37
Waht do you mean by next field? Do you mean a shortcut to select the element keyword?
– amicoderozer
Jan 4 at 16:26
Waht do you mean by next field? Do you mean a shortcut to select the element keyword?
– amicoderozer
Jan 4 at 16:26
Yes, that's exactly what I mean.
– vipatron
Jan 4 at 16:28
Yes, that's exactly what I mean.
– vipatron
Jan 4 at 16:28
Tab seems to do the job on my version of Visual Studio Code
– amicoderozer
Jan 4 at 16:29
Tab seems to do the job on my version of Visual Studio Code
– amicoderozer
Jan 4 at 16:29
1
1
tab works only if I haven't changed the "array" keyword yet. If I type out the array's name ("carts", in this case), and then press tab, VSCode deselects everything. I think I figured out a workaround, though. I press Enter, then Tab, and that seems to work. I imagine Enter is setting the array keyword to a value, then Tab is doing what is expected. Thanks for your help!
– vipatron
Jan 4 at 16:34
tab works only if I haven't changed the "array" keyword yet. If I type out the array's name ("carts", in this case), and then press tab, VSCode deselects everything. I think I figured out a workaround, though. I press Enter, then Tab, and that seems to work. I imagine Enter is setting the array keyword to a value, then Tab is doing what is expected. Thanks for your help!
– vipatron
Jan 4 at 16:34
Yes I pressed enter and then tab. Your welcome!
– amicoderozer
Jan 4 at 16:37
Yes I pressed enter and then tab. Your welcome!
– amicoderozer
Jan 4 at 16:37
add a comment |
1 Answer
1
active
oldest
votes
So, for the curious: The answer is:
Step 4: Press Enter. This exits the "label replacement for keyword" mode.
Step 5: Press Tab. This will select the next keyword field.
Special Thanks to @amicoderozer.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1390594%2fkeyboard-shortcut-to-move-between-highlighted-fields-in-visual-studio-code-snipp%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
So, for the curious: The answer is:
Step 4: Press Enter. This exits the "label replacement for keyword" mode.
Step 5: Press Tab. This will select the next keyword field.
Special Thanks to @amicoderozer.
add a comment |
So, for the curious: The answer is:
Step 4: Press Enter. This exits the "label replacement for keyword" mode.
Step 5: Press Tab. This will select the next keyword field.
Special Thanks to @amicoderozer.
add a comment |
So, for the curious: The answer is:
Step 4: Press Enter. This exits the "label replacement for keyword" mode.
Step 5: Press Tab. This will select the next keyword field.
Special Thanks to @amicoderozer.
So, for the curious: The answer is:
Step 4: Press Enter. This exits the "label replacement for keyword" mode.
Step 5: Press Tab. This will select the next keyword field.
Special Thanks to @amicoderozer.
answered Jan 4 at 17:38
vipatronvipatron
12
12
add a comment |
add a comment |
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1390594%2fkeyboard-shortcut-to-move-between-highlighted-fields-in-visual-studio-code-snipp%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Waht do you mean by next field? Do you mean a shortcut to select the element keyword?
– amicoderozer
Jan 4 at 16:26
Yes, that's exactly what I mean.
– vipatron
Jan 4 at 16:28
Tab seems to do the job on my version of Visual Studio Code
– amicoderozer
Jan 4 at 16:29
1
tab works only if I haven't changed the "array" keyword yet. If I type out the array's name ("carts", in this case), and then press tab, VSCode deselects everything. I think I figured out a workaround, though. I press Enter, then Tab, and that seems to work. I imagine Enter is setting the array keyword to a value, then Tab is doing what is expected. Thanks for your help!
– vipatron
Jan 4 at 16:34
Yes I pressed enter and then tab. Your welcome!
– amicoderozer
Jan 4 at 16:37