Reputation: 14844
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 to scroll each time I need a specific line number.
Upvotes: 43
Views: 30381
Reputation: 1
You can simply jump to any file at any line number using this shortcut.
Press Double Shift, then in the popped window, just write your file's name [space] and line number
for Example: (Press Double Shift) => MainActivity 314
it will jump you to 314th line in MainActivity. if the line is exceeding the last line, the last line will be located.
Upvotes: 0
Reputation: 2462
The shortcut to go to a specific line and/or column number is: CTRLG
(archive)
Examples:
Go to line 6
CtrlG6Enter
Go to line 6 and column 8
CtrlG6:8Enter
Go to column 4 on the current line
CtrlG:4Enter
Shortcut References:
Upvotes: 59
Reputation: 1498
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.
Upvotes: 26
Reputation: 12938
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
.
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. :)
Upvotes: 5
Reputation: 2014
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
Upvotes: 59