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.
In the editor, press Ctrl+G . In the Go to Line/Column dialog, specify a line or column number, or both, separating them with : and click OK.
To navigate backwards, press Ctrl+Alt+Left . To navigate forward, press Ctrl+Alt+Right . To navigate to the last edited location, press Ctrl+Shift+Backspace . To find the current caret location in the editor, press Ctrl+M .
From the main menu, select Edit | Find | Find in Files Ctrl+Shift+F . In the search field, type your search string. Alternatively, in the editor, highlight the string you want to find and press Ctrl+Shift+F . IntelliJ IDEA places the highlighted string into the search field.
You can jump to a specific line in a file right from the Go to file popup (Cmd+Shift+O on macOS or Ctrl+Shift+N on Windows and Linux) – just add : after the file name.
The shortcut to go to a specific line and/or column number is: CTRLG
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:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With