Unix Manuals

emacs reference

For a $50 donation to the Pancreatic Cancer Research Fund...
...you can advertise in the space above (standard size banner ad right across this site) until the next person donates the same amount. Which may be minutes, days, weeks or months. (Currently, no-one has bought the space - it's been for sale since 1st June 2012).
Click here to read more.

Cursor Movement and Location

This reference guide lists the commands available within GNU Emacs for moving the cursor, and reporting its location.

NOTICE - New forum for all UNIX learners, users and programmers - click here

 
arrow keys (if available) N/A Move cursor.
C-a beginning-of-line Move to beginning of line.
C-e end-of-line Move to end of line.
C-f forward-char Move forward one character.
C-b backward-char Move backward one character.
M-f  forward-word Move forward one word.
M-b backward-word Move backward one word.
C-n next-line Move down a line (creating the next line, if necessary).
C-p previous-line Move up a line.
M-r move-to-window-line Move to left margin, vertically centered in window.
M-< beginning-of-buffer Move to top of buffer.
M-> end-of-buffer Move to end of buffer.
M-x goto-char goto-char Read a number and go to that buffer position (start = 1).
M-x goto-line goto-line Read a number and go to that line (first line = 1).
C-x C-n set-goal-column Set current column as 'goal column'.  From then on, the C-n and C-p commands jump to that column, or the nearest possible column.
C-u C-x C-n N/A Cancel the 'goal column', and return to normal behaviour.
M-x what-page what-page Display page number and line number (within page) of cursor location.
M-x what-line what-line Display line number (within buffer) of cursor location.
M-x line-number-mode line-number-mode Display line number automatically (toggle).
M-= count-lines-region Print number of lines in current region.
C-x = what-cursor-postition Print character code, character position and column of the cursor location.

 Home


Advertise on this site. See our privacy policy.
© Copyright 2000-2010, Tom Reader, All Rights Reserved.
UNIX is a registered trademark of The Open Group in the US and other countries.
For more information on the use of the UNIX trademark, click here.
The contents of this site are not connected with or endorsed by The Open Group in any way.

If this site has helped you, please consider sending us a small donation if you can afford it - thanks!