Is there a shortcut key combination for moving the cursor to the beginning, resp. end, of the visible text in the current buffer, i.e. to the first, resp. last, cursor position that can be seen on the current screen, without scrolling up or down? Contrast this with the absolute beginning/end of the text in the current buffer, for which the shortcuts M-<, resp. M->, will work.

  • 1
    Please define "visible text". Are you referring to text properties? Whitespace? Other? – phils Nov 13 '17 at 10:51
  • @phils: I've added a clarification. – Evan Aad Nov 13 '17 at 11:43

Ah, you're looking to move point to the top or bottom of the window.

M-r calls move-to-window-line-top-bottom which cycles through the top/middle/bottom positions. You can also use a prefix argument, for which "zero means top of window, negative means relative to bottom of window."


  • M-0M-r
  • M--M-r

Or write a command to call move-to-window-line directly with an appropriate argument.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.