IntelliJ beginning of file keyboard shortcut

MacosIntellij IdeaKeyboard ShortcutsIntellij 13

Macos Problem Overview


Is there a keyboard shortcut to move to the beginning of a file? I checked IntelliJ's Keymap for Mac OS X and it doesn't list anything for navigating to the start of a file.

Macos Solutions


Solution 1 - Macos

command+home or fn+command+left arrow

Solution 2 - Macos

Edit the Intellij Preferences -> KeyMap -> Editor Actions entries for "Move Caret to Text Start" and "Move Caret to Text End". If you set those to Command+UpArrow and Command+DownArrow, it'll work like a normal text editor. I have no idea why that isn't the default in Intellij instead of the seemingly pointless "scroll one line" feature.

Solution 3 - Macos

On Mac, command+home and command+end move to the top and bottom of the file.

On a Mac laptop, there are no home or end keys. Many key combinations with option/function keys produce missing keys and do other neat things. For instance, using function+left and function+right will provide windows-style home and end behaviour while function+up and function+down will provide page up and page down behaviour. Superuser has more information.

Also, if you open the Keyboard preferences pane and look at the Input Sources tab, you will find that the displayed keyboard changes as you press modifier keys such shift, option and function. Your keyboard probably does way more than you thought.

Solution 4 - Macos

The accepted answer is not correct. To move to the beginning/end of a file, use ctrl+home/ctrl+end on Windows/Unix or command-home and command-end on the Mac, as @jackrabbit suggested.

ctrl+pageup (Move Caret to Page Top) moves the caret to the top of the viewable portion of the file (page, viewport). It also does not move the caret to the first column, it tries to stay in the same column that it was previously

Solution 5 - Macos

Just as an addition for clarity

For Windows,

Ctrl + Home => Top

Ctrl + End => Bottom

Ctrl + PgUp => Page Up

Ctrl + PgDn => Page Down

Solution 6 - Macos

Search the Keymap preference settings, and set your own key combination for "Move Caret to Text Start" and "Move Caret to Text End". This has the behavior the OP intends, where the caret is moved to the very top of the text in file, and the very end. :D

I am using IntelliJ 12, and LOVING IT!

Solution 7 - Macos

You're looking for:

Page Up => fn + up

Page Down => fn + down

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionSteve KuoView Question on Stackoverflow
Solution 1 - MacosKirbyView Answer on Stackoverflow
Solution 2 - MacosNathan BeachView Answer on Stackoverflow
Solution 3 - MacosjackrabbitView Answer on Stackoverflow
Solution 4 - MacosJuan MendesView Answer on Stackoverflow
Solution 5 - MacosSupun WijerathneView Answer on Stackoverflow
Solution 6 - Macosuser1956066View Answer on Stackoverflow
Solution 7 - MacosArtur Müller RomanovView Answer on Stackoverflow