Skip to content
/ cheat Public

An Emacs package to register & open cheatsheets

License

Notifications You must be signed in to change notification settings

pbellon/cheat

Repository files navigation

Cheat

An Emacs package to register and create cheatsheets based on org-mode.

Provided cheatsheets

CommandTitleDescriptionSource
cheat/adocAsciiDocAsciiDoc + asciidoctor Syntax Quick Referencegithub.com/asciidoctor/asciidoctorg.org
cheat/es6ES2015+A quick overview of JavaScript features in ES2015 and beyond.devhints.io/es6
cheat/emacsEmacsSmall guide to emacs functions & shortcutsthb.lt/emacs-cheatsheet
cheat/gogoGo-lang Cheatsheetdevhints.io/go
cheat/jsdocJSDocJSDoc syntax overviewdevhints.io/jsdoc
cheat/magitMagitMagit Reference Cardgithub.com/magit/magit
cheat/npmNpmNpm Cheatsheetgithub.com/npm/npm
cheat/org-syntaxOrg mode syntaxSyntax overview of Org-Mode filesgithub.com/higham
cheat/orgOrg modeOrg-Mode Reference Cardorgmode.org
cheat/pythonpythonPython Cheatsheetdevhints.io/python
cheat/xpathXpathCollection of XPath examplesdevhints.io/xpath

Installation

The package has not yet been published to MELPA yet so you’ll have to install it manually or use quelpa.

(quelpa '(cheat :fetcher github :repo "pbellon/cheat"))
(require 'cheat)
(cheat--setup)

;; Or, if you have use-package & quelpa-use-package
(use-package cheat
    :quelpa (cheat :fetcher github :repo "pbellon/cheat")
    :config
    (cheat--setup))

Configuration

Loaded categories

You can change which set of cheatsheet is loaded by default by the package by changing cheat--categories value:

(setq cheat--categories '("JavaScript" "Emacs" "CLI"))

You can see all available categories by calling cheat--list-categories interactive function.

Register cheatsheet folders

Register your cheatsheets folds in the cheat--sheets-folders list:

(add-to-list 'cheat--sheets-folders "path/to/my/cheatsheets/")

You can then update the loaded cheatsheets with the cheat--reload-sheets interactive function to see you new cheatsheets. See Cheatsheet template to see how to write new cheatsheets.

Cheatsheet template

All sheets files must be located under a folder included in cheat--sheets-folders. They must have an header like bellow:

#+TITLE: My title
#+COMMAND: mycommand
#+DESCRIPTION: Optional description
#+CATEGORY: Category

Make sure to have the Category of your new cheatsheet listed under cheat--categories & call cheat--reload-sheets to load it .

cheat or cheat/<command> Open a cheatsheet

M-x RET cheat RET <command> RETOpen a cheatsheet having given <command>. Needs ivy to work
M-x RET cheat/<command> RETAll cheatsheets have dedicated interactive functions, for instance cheat/adoc opens AsciiDoc cheatsheet.

List cheatsheets

List all cheatsheets filtered by Loaded categories.

M-x RET cheat--list-sheets RET

About

An Emacs package to register & open cheatsheets

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published