Keyboard Shortcut - Select text to the beginning/end of document


So on a Mac, in most applications / text editors, you can select everything from the current caret position to the bottom/top of the document with the shortcut "command + shift + down/up". Can anybody tell me how to do this in IntelliJ, or what the name of the keymap is so I can set it myself?

I've tried using the "Move Caret to Page Bottom with Selection" keymap but this isn't it, it only moves the caret to the bottom of the visible portion of the page, so if the page is longer than what you can see in the window at that moment, it won't reach the bottom.

Thank you!

Comment actions Permalink

Command-Shift-Home/End? (On Linux, Control-Shift-Home/End works.)

Comment actions Permalink

Oh duh, yes thank you. My mac keyboard is sans-home/end buttons, so I forgot about that option, but I was able to temporarily steal a keyboard that had the keys and use that to reverse-lookup the keymap name and reassign it to what I wanted. For anybody else in this boat, the keymap name is Move Caret to Text End/Start with Selection. Thanks again!

Comment actions Permalink

I keep forgetting this one and having to look it up (which is what led me here) but now that I've looked it up/figured it out yet again, I'll share for the benefit of all. On a Mac keyboard without Home and End keys, in IntelliJ, you can use Fn-[Left Arrow] and Fn-[Right Arrow] to move to the beginning and end of a line, respectively; you can use Fn-Cmd-[Left Arrow] for the top of the document, and Fn-Cmd-[Right Arrow] for the bottom of the document. Naturally, adding Shift to any of those will select from current caret position to the target location. Hope that helps!!

Comment actions Permalink

Thank you Rick Walters, that's the perfect solution for me!


Please sign in to leave a comment.