How can I copy the entire line without selection? The 2019 Stack Overflow Developer Survey Results Are InHow do I duplicate a line or selection within Visual Studio Code?Turn Off Whole Line Copy in Visual Studio CodeVisual Studio Code: Keyboard shortcut for “Line Comment and Move down” combinationKeyboard shortcut to do the opposite of ENTER in VSCode (unindent and remove line feed)?How to scroll without moving my cursor in Visual Studio Code from the KeyboardVSCode - Line Select DownHow to move selected code segment to the left in VS Code?Cut line shortcut in Visual Studio Code (Ctrl+L in VS) (not delete line!)Select all active indent keyboard shortcut in VS CodeVSCode copy and paste 1 line without newline character being prepended

What is the closest word meaning "respect for time / mindful"

Is there a symbol for a right arrow with a square in the middle?

Why is the maximum length of OpenWrt’s root password 8 characters?

Geography at the pixel level

Are children permitted to help build the Beis Hamikdash?

What did it mean to "align" a radio?

Falsification in Math vs Science

How to save as into a customized destination on macOS?

How to answer pointed "are you quitting" questioning when I don't want them to suspect

Multiply Two Integer Polynomials

Can a flute soloist sit?

What does Linus Torvalds mean when he says that Git "never ever" tracks a file?

For what reasons would an animal species NOT cross a *horizontal* land bridge?

Delete all lines which don't have n characters before delimiter

Is bread bad for ducks?

What is the motivation for a law requiring 2 parties to consent for recording a conversation

What to do when moving next to a bird sanctuary with a loosely-domesticated cat?

Why was M87 targetted for the Event Horizon Telescope instead of Sagittarius A*?

What is the most effective way of iterating a std::vector and why?

Have you ever entered Singapore using a different passport or name?

What are the motivations for publishing new editions of an existing textbook, beyond new discoveries in a field?

Output the Arecibo Message

How technical should a Scrum Master be to effectively remove impediments?

If a Druid sees an animal’s corpse, can they wild shape into that animal?



How can I copy the entire line without selection?



The 2019 Stack Overflow Developer Survey Results Are InHow do I duplicate a line or selection within Visual Studio Code?Turn Off Whole Line Copy in Visual Studio CodeVisual Studio Code: Keyboard shortcut for “Line Comment and Move down” combinationKeyboard shortcut to do the opposite of ENTER in VSCode (unindent and remove line feed)?How to scroll without moving my cursor in Visual Studio Code from the KeyboardVSCode - Line Select DownHow to move selected code segment to the left in VS Code?Cut line shortcut in Visual Studio Code (Ctrl+L in VS) (not delete line!)Select all active indent keyboard shortcut in VS CodeVSCode copy and paste 1 line without newline character being prepended



.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








1















I wonder if there's a keyboard shortcut to copy the entire line where the cursor is without having to select it.



NOTE: I know how to duplicate it up and down, and how to move it too, but the problem is that sometimes I want to copy the same line of code to another different method, even to another different file.










share|improve this question




























    1















    I wonder if there's a keyboard shortcut to copy the entire line where the cursor is without having to select it.



    NOTE: I know how to duplicate it up and down, and how to move it too, but the problem is that sometimes I want to copy the same line of code to another different method, even to another different file.










    share|improve this question
























      1












      1








      1








      I wonder if there's a keyboard shortcut to copy the entire line where the cursor is without having to select it.



      NOTE: I know how to duplicate it up and down, and how to move it too, but the problem is that sometimes I want to copy the same line of code to another different method, even to another different file.










      share|improve this question














      I wonder if there's a keyboard shortcut to copy the entire line where the cursor is without having to select it.



      NOTE: I know how to duplicate it up and down, and how to move it too, but the problem is that sometimes I want to copy the same line of code to another different method, even to another different file.







      visual-studio-code






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 8 at 9:23









      tastydbtastydb

      927




      927






















          1 Answer
          1






          active

          oldest

          votes


















          3














          You are looking for the editor.action.clipboardCopyAction command (docs). It copies either the current selection or, when nothing is selected, the whole line to the clipboard.

          By default it is bound to Ctrl + C (Cmd + C on macOS).






          share|improve this answer























            Your Answer






            StackExchange.ifUsing("editor", function ()
            StackExchange.using("externalEditor", function ()
            StackExchange.using("snippets", function ()
            StackExchange.snippets.init();
            );
            );
            , "code-snippets");

            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "1"
            ;
            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%2fstackoverflow.com%2fquestions%2f55060156%2fhow-can-i-copy-the-entire-line-without-selection%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









            3














            You are looking for the editor.action.clipboardCopyAction command (docs). It copies either the current selection or, when nothing is selected, the whole line to the clipboard.

            By default it is bound to Ctrl + C (Cmd + C on macOS).






            share|improve this answer



























              3














              You are looking for the editor.action.clipboardCopyAction command (docs). It copies either the current selection or, when nothing is selected, the whole line to the clipboard.

              By default it is bound to Ctrl + C (Cmd + C on macOS).






              share|improve this answer

























                3












                3








                3







                You are looking for the editor.action.clipboardCopyAction command (docs). It copies either the current selection or, when nothing is selected, the whole line to the clipboard.

                By default it is bound to Ctrl + C (Cmd + C on macOS).






                share|improve this answer













                You are looking for the editor.action.clipboardCopyAction command (docs). It copies either the current selection or, when nothing is selected, the whole line to the clipboard.

                By default it is bound to Ctrl + C (Cmd + C on macOS).







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Mar 8 at 9:36









                HaaLeoHaaLeo

                1,9861724




                1,9861724





























                    draft saved

                    draft discarded
















































                    Thanks for contributing an answer to Stack Overflow!


                    • 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%2fstackoverflow.com%2fquestions%2f55060156%2fhow-can-i-copy-the-entire-line-without-selection%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

                    AWS Lex not identifying response if by a variable The 2019 Stack Overflow Developer Survey Results Are In Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) The Ask Question Wizard is Live! Data science time! April 2019 and salary with experienceEnforcing custom enumeration in AWS LEX for slot valuesHow to give response based on user response in Amazon Lex?Intercepting AWS Lambda Response to a AWS Lex QueryLex chat bot error: Reached second execution of fulfillment lambda on the same utteranceamazon lex showing invalid responseLambda response send back to Lex slot?Response card in Amazon lexAmazon Lex - Lambda response return HTML to botHow can I solve 424 (Failed Dependency) (python) obtained from Amazon lex?

                    Алба-Юлія

                    Захаров Федір Захарович