Skip to content

Instantly share code, notes, and snippets.

@lzhoucs
Last active September 28, 2016 18:24
Show Gist options
  • Save lzhoucs/5c55b5c19fefa11482af to your computer and use it in GitHub Desktop.
Save lzhoucs/5c55b5c19fefa11482af to your computer and use it in GitHub Desktop.
emacs useful commands

emacs

cursor-moving

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 line

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

deleting and yanking

<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

spacemacs

cursor-moving

C-b evil-scroll-page-up C-f evil-scroll-page-down

C-u evil-scroll-up C-d evil-scroll-down

C-y evil-scroll-line-up C-e evil-scroll-line-down

window management

SPC w b return focus to the (helm) minibuffer

SPC w w cycle and focus between windows

file/buffer management

SPC f y show and copy current file absolute path in the minibuffer

search

SPC s s helm-swoop, really useful!

-Gts keyword in helm-project-smart-do-search, search by ‘keyword’ in ‘.js’ extension

Helm buffer

SPC o switch through sources. E.g: SPC h SPC followed by SPC o

Getting help

SPC F1 Fussy search(SPC h d f is not fussy) among emacs…things.

SPC h k show top-level bindings with which-key

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment