Skip to content

Instantly share code, notes, and snippets.

@vishaltelangre
Last active January 1, 2016 05:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vishaltelangre/c0f33ad63964e3d2907e to your computer and use it in GitHub Desktop.
Save vishaltelangre/c0f33ad63964e3d2907e to your computer and use it in GitHub Desktop.
Fundamental Emacs Keybindings #emacs
* Movement
------------
C-v Move next screen
M-v Move backwords one screen
C-f Move forward a character
C-b Move backward a character
M-f Move forward a word
M-b Move backward a word
C-n Move to next line
C-p Move to previous lne
C-a Move to beginning of line
C-e Move to end of line
M-a Move back to beginning of sentence
M-e Move forward to end of sentence
M-< Move to start of document
M-> Move to end of document
C-u 10 C-f Move forward 10 characters 
* Alteration
-------------
M-u Upcase
M-l Lowercase
* Text
-------
<DEL> Delete the character just before the cursor
C-d Delete the next character after the cursor
M-<DEL> Kill the word immediately before the cursor
M-d Kill the next word after the cursor
C-k Kill from the cursor position to end of line
M-k Kill to the end of the current sentence
C-<SPC> C-w Kill segment (aka cut text)
C-y Yank (aka Paste)
C-/ Undo ( or C-_ or C-x u)
* Files
---------
C-x C-f Open a file
C-x C-s Save the file
* Buffers
----------
Emacs stores each file's text inside an object called a "buffer".
Finding a file makes a new buffer inside Emacs.
C-x C-b List buffers
C-x b Switch to different buffer
C-x s Save modified buffers interactively
* Search
---------
C-s Search for text (C-s again to repeat)
C-r Reverse search
* Multiple Windows
-------------------
C-x 1 Kill all but current window
C-x 2 Create a window at the bottom
C-x 3 Create a window at the right
C-x 4 C-f Open a file in right-side window
C-x o Switch between windows
* Misc
--------
M-x Run command
C-x C-c Quit Emacs
C-h k C-f Display help documentation of C-f
* Rails
---------
C-c p f Projectile Search Project
C-c p p Switch Projects
* NeoTree
-----------
<F8> toggle NeoTree
n the next row
P previous row
TAB fold-unfold tree
g refresh the tree
A maximum / minimum of NeoTree window
H switch the display hidden files
Cc Cn create a file, if the / at the end of the folders that you create
Cc Cd delete a file or directory
Cc Cr rename a file or directory
Cc Cc change the root directory
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment