android studio / intellij idea goto line number

后端 未结 5 1292
广开言路
广开言路 2021-02-03 21:59

In Eclipse, if I type cmd+L, it opens a dialog for me to enter a line number and it takes me there in the code. How do I do the same thing in Android Studio? Instead of having t

相关标签:
5条回答
  • 2021-02-03 22:19

    The shortcut to go to a particular line number on Android Studio is

    On Mac : Cmd + L

    On Linux : Ctrl + L

    On Windows : Ctrl + G

    After this key in the line number in the dialog box that pops up.There is an option to insert the column number as well, but it is not necessary.

    0 讨论(0)
  • 2021-02-03 22:20

    The shortcut to go to a specific line and/or column number is: CTRLG

    Android Studio Go to Line dialog box

    Examples:

    1. Go to line 6
      CtrlG6Enter

    2. Go to line 6 and column 8
      CtrlG6:8Enter

    3. Go to column 4 on the current line
      CtrlG:4Enter


    Shortcut References:

    • AltHK = H̲elp -> Default K̲eymap Reference
    • IntelliJIDEA_ReferenceCard.pdf
    • Android Studio Shortcuts You Need the Most
    0 讨论(0)
  • 2021-02-03 22:30

    For Windows users shortcut is: Ctrl + G

    0 讨论(0)
  • 2021-02-03 22:36

    Use Command + L for Mac OS X.

    IntellijIDEA default keymap reference Here is the IntellijIDEA default keymap reference. This is applicable to Android Studio too.

    You can also find the document from Android Studio -> Help -> Default Keymap Reference

    0 讨论(0)
  • 2021-02-03 22:36
    • If you are in the specific file,

    You can use Ctrl + G. And insert the line You wanted. If you want to go to a specific column of the lineNo you can insert lineNo:columnNo.

    • If you are in some file and you want to navigate into some line of a some other file,

    You can simply use default navigation shortcut Ctrl + Shift + N, and insert fileName : lineNo.

    NOTE: You don't need to insert the whole name of the file, some text that enables intellij to uniquely identify your file would be good enough. Your input text might turn into red color. But it works. :)

    0 讨论(0)
提交回复
热议问题