locked
Shortcuts for Lines in VS RRS feed

  • Question

  • I'm trying to become a much more efficient programmer with shortcuts.  I know a few but does anyone have a set of shortcuts they use specifically to manage lines in VS.  For example, removing an entire line, highlighting an entire line, Deleting an entire line.  Jumping from beginning of the first text in a line to the end quickly and so on?  I can't find these so figured I'd post in here to get some quick answers.

    Also, just moving lines around, etc.  I know one, which is Ctrl and then arrow left or right which seems to jump from word to word but that is only half useful.  I want to toggle from beginning to end of a line as well and much more.

    C# Web Developer
    Monday, December 8, 2008 5:11 PM

Answers

  • See this link:

    http://www.mobydisk.com/softdev/techinfo/dotnetkeyboard.html

    Specifically the items under "Edit". 

    Ctrl-L: cut whole line
    Ctrl-Shift-L: delete whole line. 
    Ctrl-End: jump to the end of the text (works with other text editors as well)
    Shift-End: select from caret to the end of the line (works with other text editors). 
    David Morton - http://blog.davemorton.net/
    • Proposed as answer by Xystus777 Monday, December 8, 2008 5:29 PM
    • Unproposed as answer by Harry Zhu Friday, December 12, 2008 3:23 AM
    • Proposed as answer by Harry Zhu Friday, December 12, 2008 3:23 AM
    • Marked as answer by Harry Zhu Monday, December 15, 2008 8:39 AM
    Monday, December 8, 2008 5:22 PM
  • http://www.microsoft.com/MSPress/books/13221.aspx
    MSMVP VC++
    • Proposed as answer by Harry Zhu Friday, December 12, 2008 3:23 AM
    • Marked as answer by Harry Zhu Monday, December 15, 2008 8:39 AM
    Monday, December 8, 2008 9:30 PM
  • Hello NoEgo,
        Although there may be a default shortcut key for this, I found that it is extremely useful to set the Edit.(Un)CommentSelection to "Ctrl+/" and "Alt+/". To go to the end of the current line, press End on your keyboard; press Home to go to the beginning; hold control while pressing those keys to go the the very beginning and end of the whole file, not just the line.


    Hope this Helps!
    Thanks!
    chukrum47
    How are a plum and a rabbit similar? They're both purple, except for the rabbit.
    • Proposed as answer by Harry Zhu Friday, December 12, 2008 3:23 AM
    • Marked as answer by Harry Zhu Monday, December 15, 2008 8:39 AM
    Monday, December 8, 2008 11:25 PM

All replies

  • See this link:

    http://www.mobydisk.com/softdev/techinfo/dotnetkeyboard.html

    Specifically the items under "Edit". 

    Ctrl-L: cut whole line
    Ctrl-Shift-L: delete whole line. 
    Ctrl-End: jump to the end of the text (works with other text editors as well)
    Shift-End: select from caret to the end of the line (works with other text editors). 
    David Morton - http://blog.davemorton.net/
    • Proposed as answer by Xystus777 Monday, December 8, 2008 5:29 PM
    • Unproposed as answer by Harry Zhu Friday, December 12, 2008 3:23 AM
    • Proposed as answer by Harry Zhu Friday, December 12, 2008 3:23 AM
    • Marked as answer by Harry Zhu Monday, December 15, 2008 8:39 AM
    Monday, December 8, 2008 5:22 PM
  • http://www.microsoft.com/MSPress/books/13221.aspx
    MSMVP VC++
    • Proposed as answer by Harry Zhu Friday, December 12, 2008 3:23 AM
    • Marked as answer by Harry Zhu Monday, December 15, 2008 8:39 AM
    Monday, December 8, 2008 9:30 PM
  • Hello NoEgo,
        Although there may be a default shortcut key for this, I found that it is extremely useful to set the Edit.(Un)CommentSelection to "Ctrl+/" and "Alt+/". To go to the end of the current line, press End on your keyboard; press Home to go to the beginning; hold control while pressing those keys to go the the very beginning and end of the whole file, not just the line.


    Hope this Helps!
    Thanks!
    chukrum47
    How are a plum and a rabbit similar? They're both purple, except for the rabbit.
    • Proposed as answer by Harry Zhu Friday, December 12, 2008 3:23 AM
    • Marked as answer by Harry Zhu Monday, December 15, 2008 8:39 AM
    Monday, December 8, 2008 11:25 PM