1. Home
  2. Computing & Technology
  3. Linux

Moving Point
Emacs Documentation

By Juergen Haas, About.com

Changing the Location of Point

To do more than insert characters, you have to know how to move point (see Point). The simplest way to do this is with arrow keys, or by clicking the left mouse button where you want to move to.

There are also control and meta characters for cursor motion. Some are equivalent to the arrow keys (these date back to the days before terminals had arrow keys, and are usable on terminals which don't have them). Others do more sophisticated things.

  • C-a
    Move to the beginning of the line (beginning-of-line).
  • C-e
    Move to the end of the line (end-of-line).
  • C-f
    Move forward one character (forward-char). The right-arrow key does the same thing.
  • C-b
    Move backward one character (backward-char). The left-arrow key has the same effect.
  • M-f
    Move forward one word (forward-word).
  • M-b
    Move backward one word (backward-word).
  • C-n
    Move down one line, vertically (next-line). This command attempts to keep the horizontal position unchanged, so if you start in the middle of one line, you end in the middle of the next. The down-arrow key does the same thing.
  • C-p
    Move up one line, vertically (previous-line). The up-arrow key has the same effect.
  • M-r
    Move point to left margin, vertically centered in the window (move-to-window-line). Text does not move on the screen.

    A numeric argument says which screen line to place point on. It counts screen lines down from the top of the window (zero for the top line). A negative argument counts lines from the bottom (-1 for the bottom line).

  • M-<
    Move to the top of the buffer (beginning-of-buffer). With numeric argument n, move to n/10 of the way from the top. See Arguments, for more information on numeric arguments.
  • M->
    Move to the end of the buffer (end-of-buffer).
  • C-v
    Scroll the display one screen forward, and move point if necessary to put it on the screen (scroll-up). This doesn't always move point, but it is commonly used to do so. If your keyboard has a <PAGEDOWN> key, it does the same thing.

    Scrolling commands are further described in Scrolling.

  • M-v
    Scroll one screen backward, and move point if necessary to put it on the screen (scroll-down). This doesn't always move point, but it is commonly used to do so. The <PAGEUP> key has the same effect.
  • M-x goto-char
    Read a number n and move point to buffer position n. Position 1 is the beginning of the buffer.
  • M-x goto-line
    Read a number n and move point to line number n. Line 1 is the beginning of the buffer.
  • C-x C-n
    Use the

    * Emacs Manual Index

Explore Linux
About.com Special Features

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

Easy ways to connect two computers for networking purposes. More >

  1. Home
  2. Computing & Technology
  3. Linux
  4. Linux Software
  5. Editors
  6. Emacs
  7. Emacs Documentation - Moving Point

©2009 About.com, a part of The New York Times Company.

All rights reserved.