Keyboard shortcut to move between highlighted fields in Visual Studio Code snippets?












0















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:




  1. Reading VS Code documentation for Snippets (even that for Emmet and Emmet 2.0, in case this behavior was somehow governed by that).

  2. Searching Stack Overflow

  3. Searching Superuser (no similar questions found in either forum).










share|improve this question























  • 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
















0















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:




  1. Reading VS Code documentation for Snippets (even that for Emmet and Emmet 2.0, in case this behavior was somehow governed by that).

  2. Searching Stack Overflow

  3. Searching Superuser (no similar questions found in either forum).










share|improve this question























  • 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














0












0








0








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:




  1. Reading VS Code documentation for Snippets (even that for Emmet and Emmet 2.0, in case this behavior was somehow governed by that).

  2. Searching Stack Overflow

  3. Searching Superuser (no similar questions found in either forum).










share|improve this question














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:




  1. Reading VS Code documentation for Snippets (even that for Emmet and Emmet 2.0, in case this behavior was somehow governed by that).

  2. Searching Stack Overflow

  3. Searching Superuser (no similar questions found in either forum).







vscode






share|improve this question













share|improve this question











share|improve this question




share|improve this question










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



















  • 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










1 Answer
1






active

oldest

votes


















-1














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.






share|improve this answer























    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
    });


    }
    });














    draft saved

    draft discarded


















    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









    -1














    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.






    share|improve this answer




























      -1














      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.






      share|improve this answer


























        -1












        -1








        -1







        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.






        share|improve this answer













        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.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Jan 4 at 17:38









        vipatronvipatron

        12




        12






























            draft saved

            draft discarded




















































            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.




            draft saved


            draft discarded














            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





















































            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







            Popular posts from this blog

            Paul Cézanne

            UIScrollView CustomStickyHeader Resize height generates problems when scroll is too fast

            Angular material date-picker (MatDatepicker) auto completes the date on focus out