• Skip to secondary menu
  • Skip to main content
  • Skip to primary sidebar

Python and R Tips

Learn Data Science with Python and R

  • Home
  • Python
  • Pandas
    • Pandas 101
  • tidyverse
    • tidyverse 101
  • R
  • Linux
  • Conferences
  • Python Books
  • About
    • Privacy Policy
You are here: Home / Emacs / Ten Tips to Move Around Your Text Files Using Emacs

Ten Tips to Move Around Your Text Files Using Emacs

November 21, 2011 by cmdlinetips



Emacs WindowIf you are a newbie to the powerful Emacs editor, it is good to learn how to move around the text. One can always use the mouse and arrow keys to move around the text in Emacs. But, you will pretty soon realize this is annoying and painful. Emacs has a number of cool tricks to take you where you want to go in your text and move around. Here are eight basic tips/commands to move around your text easily in Emacs.

Moving around Emacs One Character at a time in Emacs

  • Ctl-f Move forward a character
  • Ctl-b Move backward a character

Moving Around One Word at a time in Emacs

  • M-f Move forward a word
  • M-b Move backward a word

Moving Around One Line at a time in Emacs

  • Ctl-n Move to next line
  • Ctl-p Move to previous line

Moving Around One Sentence at a time in Emacs

  • M-a Move back to beginning of sentence
  • M-e Move forward to end of sentence

Getting to the Beginning and the End of a Line in Emacs

  • Ctl-a Move to beginning of line
  • Ctl-e Move to end of line

One can also easily remember the meanings of Ctl-p, Ctl-n, Ctl-b, and Ctl-f, by understanding the meanings of command; “p” for previous, “n” for next, “b” for backward and “f” for forward. The following schematic will also help remember what the commands mean.

		    
                      Ctl-p: Previous line
			       |
   Ctl-b: Backward  -- Current position  -- Ctl-f Forward
		               |
     		       Ctl-n Next line

Share this:

  • Click to share on Facebook (Opens in new window) Facebook
  • Click to share on X (Opens in new window) X

Related posts:

Default Thumbnail25 Tips to Move Around in Vim Default Thumbnail17 Emacs Commands to Get Started Default ThumbnailEleven IPython Keyboard Shortcuts to Move Around Easily Default ThumbnailBash tip: Search through history using the up and down arrows

Filed Under: Emacs, Emacs Tips, Moving Around in Emacs Tagged With: Emacs, Emacs Tips, Moving Around in Emacs

Primary Sidebar

Subscribe to Python and R Tips and Learn Data Science

Learn Pandas in Python and Tidyverse in R

Tags

Altair Basic NumPy Book Review Data Science Data Science Books Data Science Resources Data Science Roundup Data Visualization Dimensionality Reduction Dropbox Dropbox Free Space Dropbox Tips Emacs Emacs Tips ggplot2 Linux Commands Linux Tips Mac Os X Tips Maximum Likelihood Estimation in R MLE in R NumPy Pandas Pandas 101 Pandas Dataframe Pandas Data Frame pandas groupby() Pandas select columns Pandas select_dtypes Python Python 3 Python Boxplot Python Tips R rstats R Tips Seaborn Seaborn Boxplot Seaborn Catplot Shell Scripting Sparse Matrix in Python tidy evaluation tidyverse tidyverse 101 Vim Vim Tips

RSS RSS

  • How to convert row names to a column in Pandas
  • How to resize an image with PyTorch
  • Fashion-MNIST data from PyTorch
  • Pandas case_when() with multiple examples
  • An Introduction to Statistical Learning: with Applications in Python Is Here
  • 10 Tips to customize ggplot2 title text
  • 8 Plot types with Matplotlib in Python
  • PCA on S&P 500 Stock Return Data
  • Linear Regression with Matrix Decomposition Methods
  • Numpy’s random choice() function

Copyright © 2025 · Lifestyle Pro on Genesis Framework · WordPress · Log in

Go to mobile version