Skip to content

Instantly share code, notes, and snippets.

@bcfurtado
Last active September 19, 2019 13:46
Show Gist options
  • Save bcfurtado/898d74a4610213ac7c0c4dd9b06926ea to your computer and use it in GitHub Desktop.
Save bcfurtado/898d74a4610213ac7c0c4dd9b06926ea to your computer and use it in GitHub Desktop.
Useful commands to keep in mind.
commanddescription
M-x revert-buferReloads the buffer from file and discard all the changes
C-x C-qToggle read only mode
M-x kill-some-buffersDoes what it say it does
C-x r mCreate a bookmark
C-x r bJump to a bookmark
C-x r lBookmark list
M-!Run shell command
M-|Run shell command on region
C-u M-!Run shell command and puts the output into the current buffer
C-x hMark all buffer and move cursor at the beginning of the buffer
C-M-\Indent region
C-x TabIndent region rigidly
C-h kDescribe key
M-mMove cursor to first no empty caracter of a line
M-aMove to previus block
M-eMove to next block
C-x ESC ESCRe-execute a recent minibuffer command from the command history
M-x list-command-historyRe-execute a recent minibuffer command from the command history
C-x C-k rApply last keyboard macro to all lines in the region.
C-u C-x r NWith a retangle selected, Add a column of numbers.
Z (in dired mode)Extract files (requires emacs 25.1)
c (in dired mode)Compress files (requires emacs 25.1)
Ctrl + shift + )Move current parenteses to right
M-x sgml-pretty-printFormat / Beutify HTML code
C-x n nFocus in on some portion of the buffer, making the rest temporarily inaccessible.
M-x fill-regionFill each of the paragraphs in the region.
C-M-iOpen auto complete
C-h lOpen recent inserted commands / inserted keys
C-h aShow what shortcuts does
C-M-v and C-M-VScroll down and up respectively the buffer on the right without having to switch to that window.
C-c LEFT an C-c RightAllow us to undo and redo changes in the windows configuration.
C-c ! nflycheck-next-error - Go to next error on the buffer
C-c ! pflycheck-previous-error - Go to previous error on the buffer
M-0 C-c ! C-wflycheck-copy-errors-as-kill - Copy current error id

Getting started with elisp:

M-x menu-bar-read-lisprefEmacs Lisp Reference

Emacs useful links:

Key Binding Conventionshttps://www.gnu.org/software/emacs/manual/html_node/elisp/Key-Binding-Conventions.html

Emacs useful articles:

The Emacs Guru Guide to Key Bindingshttp://www.wilfred.me.uk/blog/2018/01/06/the-emacs-guru-guide-to-key-bindings/
@bcfurtado
Copy link
Author

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