Megosztás a következőn keresztül:


Go To a Line Number

Keyboard:  CTRL + G
Menu:  Edit -> Go To
Command:  Edit.GoTo
Versions:  2008,2010
Published:  3/8/2010
Code:  vstipEdit0026

 

You can go to any line number in your code by simply pressing CTRL + G.  You will get this dialog:

image

 

Just type in your desired line number and click OK.  The Cursor will move to the line number you typed.

Comments

  • Anonymous
    March 08, 2010
    I'm pretty sure that Ctrl+G works in VS2003 and VS2005.

  • Anonymous
    March 08, 2010
    Did you start using VS just today? :D

  • Anonymous
    March 08, 2010
    Nice :) I am only going back to version 2008 for this series.  I keep having to remind folks of that, not sure why... Z

  • Anonymous
    March 07, 2011
    its not working for vs2008 i don't know why. do i need to set it up?

  • Anonymous
    March 08, 2011
    Jepoy, No special setup is required.  It should work.  You might check to see if CTRL + G is mapped to the correct command. Z

  • Anonymous
    July 07, 2011
    I used to it  for years. but it doesn't work anymore. One  has  to go to menu  Edit->Go To

  • Anonymous
    July 07, 2011
    Elena, It still works fine in 2005, 2008, and 2010.   I just tested 2010 again to make sure and CTRL + G brings up the Go To dialog.  If it is not working I would definitely make sure CTRL + G is mapped to the Edit.GoTo command in Tools | Options | Environment | Keyboard. Z

  • Anonymous
    December 18, 2013
    Step 1 : click on TOOLS ->OPTIONS in your visual Studio Step 2: Click on Environment -> KEYBOARD step 3 : See "Show Commands Containing" Text : IF it not containing  "Edit.GoTo" just type     "  edit.goto  "   ( dont use any quotes , text Only) Step 4 : Go now to "Press Short cut Keys:" Section  and now press the control Key (ctrl +g) from your key board Step 5: And then Press Assign Button and followed by OK button. Step 6 : Now its working.

  • Anonymous
    December 30, 2013
    The comment has been removed

  • Anonymous
    December 30, 2013
    Rajdeep did you see Sajeeth's steps above? It's possible that CTRL+G isn't mapped to the correct command. Also, read my article here for more detail: blogs.msdn.com/.../keyboard-shortcuts-creating-new-shortcuts-vstiptool0063.aspx Z