\documentclass[10pt,a4paper]{article} % Packages \usepackage{fancyhdr} % For header and footer \usepackage{multicol} % Allows multicols in tables \usepackage{tabularx} % Intelligent column widths \usepackage{tabulary} % Used in header and footer \usepackage{hhline} % Border under tables \usepackage{graphicx} % For images \usepackage{xcolor} % For hex colours %\usepackage[utf8x]{inputenc} % For unicode character support \usepackage[T1]{fontenc} % Without this we get weird character replacements \usepackage{colortbl} % For coloured tables \usepackage{setspace} % For line height \usepackage{lastpage} % Needed for total page number \usepackage{seqsplit} % Splits long words. %\usepackage{opensans} % Can't make this work so far. Shame. Would be lovely. \usepackage[normalem]{ulem} % For underlining links % Most of the following are not required for the majority % of cheat sheets but are needed for some symbol support. \usepackage{amsmath} % Symbols \usepackage{MnSymbol} % Symbols \usepackage{wasysym} % Symbols %\usepackage[english,german,french,spanish,italian]{babel} % Languages % Document Info \author{witek (witek)} \pdfinfo{ /Title (spacemacs.pdf) /Creator (Cheatography) /Author (witek (witek)) /Subject (Spacemacs Cheat Sheet) } % Lengths and widths \addtolength{\textwidth}{6cm} \addtolength{\textheight}{-1cm} \addtolength{\hoffset}{-3cm} \addtolength{\voffset}{-2cm} \setlength{\tabcolsep}{0.2cm} % Space between columns \setlength{\headsep}{-12pt} % Reduce space between header and content \setlength{\headheight}{85pt} % If less, LaTeX automatically increases it \renewcommand{\footrulewidth}{0pt} % Remove footer line \renewcommand{\headrulewidth}{0pt} % Remove header line \renewcommand{\seqinsert}{\ifmmode\allowbreak\else\-\fi} % Hyphens in seqsplit % This two commands together give roughly % the right line height in the tables \renewcommand{\arraystretch}{1.3} \onehalfspacing % Commands \newcommand{\SetRowColor}[1]{\noalign{\gdef\RowColorName{#1}}\rowcolor{\RowColorName}} % Shortcut for row colour \newcommand{\mymulticolumn}[3]{\multicolumn{#1}{>{\columncolor{\RowColorName}}#2}{#3}} % For coloured multi-cols \newcolumntype{x}[1]{>{\raggedright}p{#1}} % New column types for ragged-right paragraph columns \newcommand{\tn}{\tabularnewline} % Required as custom column type in use % Font and Colours \definecolor{HeadBackground}{HTML}{333333} \definecolor{FootBackground}{HTML}{666666} \definecolor{TextColor}{HTML}{333333} \definecolor{DarkBackground}{HTML}{6E628D} \definecolor{LightBackground}{HTML}{F5F5F7} \renewcommand{\familydefault}{\sfdefault} \color{TextColor} % Header and Footer \pagestyle{fancy} \fancyhead{} % Set header to blank \fancyfoot{} % Set footer to blank \fancyhead[L]{ \noindent \begin{multicols}{3} \begin{tabulary}{5.8cm}{C} \SetRowColor{DarkBackground} \vspace{-7pt} {\parbox{\dimexpr\textwidth-2\fboxsep\relax}{\noindent \hspace*{-6pt}\includegraphics[width=5.8cm]{/web/www.cheatography.com/public/images/cheatography_logo.pdf}} } \end{tabulary} \columnbreak \begin{tabulary}{11cm}{L} \vspace{-2pt}\large{\bf{\textcolor{DarkBackground}{\textrm{Spacemacs Cheat Sheet}}}} \\ \normalsize{by \textcolor{DarkBackground}{witek (witek)} via \textcolor{DarkBackground}{\uline{cheatography.com/27891/cs/8186/}}} \end{tabulary} \end{multicols}} \fancyfoot[L]{ \footnotesize \noindent \begin{multicols}{3} \begin{tabulary}{5.8cm}{LL} \SetRowColor{FootBackground} \mymulticolumn{2}{p{5.377cm}}{\bf\textcolor{white}{Cheatographer}} \\ \vspace{-2pt}witek (witek) \\ \uline{cheatography.com/witek} \\ \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Cheat Sheet}} \\ \vspace{-2pt}Published 12th May, 2016.\\ Updated 13th November, 2020.\\ Page {\thepage} of \pageref{LastPage}. \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Sponsor}} \\ \SetRowColor{white} \vspace{-5pt} %\includegraphics[width=48px,height=48px]{dave.jpeg} Measure your website readability!\\ www.readability-score.com \end{tabulary} \end{multicols}} \begin{document} \raggedright \raggedcolumns % Set font size to small. Switch to any value % from this page to resize cheat sheet text: % www.emerson.emory.edu/services/latex/latex_169.html \footnotesize % Small font. \begin{multicols*}{3} \begin{tabularx}{5.377cm}{x{2.18988 cm} x{2.78712 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Editing}} \tn % Row 0 \SetRowColor{LightBackground} `SPC n` {[}`f w`{]} & narrow to {[}function whole{]} \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} `g c c` & comment line \tn % Row Count 3 (+ 1) % Row 2 \SetRowColor{LightBackground} `SPC c` {[}`p l`{]} & comment {[}paragraph line{]} \tn % Row Count 5 (+ 2) % Row 3 \SetRowColor{white} `J` & join line with next one \tn % Row Count 7 (+ 2) % Row 4 \SetRowColor{LightBackground} {[}`u` `Ctrl+R`{]} & {[}undo redo{]} \tn % Row Count 8 (+ 1) % Row 5 \SetRowColor{white} `:\%s/` {\emph{old}} `/` {\emph{new}} & replace all {\emph{old}} with {\emph{new}} \tn % Row Count 10 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{0.9954 cm} x{3.9816 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Lisp Mode `SPC .`}} \tn % Row 0 \SetRowColor{LightBackground} `(` & insert before \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} `)` & insert after \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} {[}`0 \$`{]} & goto sexp {[}begin end{]} \tn % Row Count 3 (+ 1) % Row 3 \SetRowColor{white} {[}`b B`{]} & barf (narrow) {[}forward backward{]} \tn % Row Count 4 (+ 1) % Row 4 \SetRowColor{LightBackground} {[}`s S`{]} & slurp (expand) {[}forward backward{]} \tn % Row Count 6 (+ 2) % Row 5 \SetRowColor{white} `J` & sexp join \tn % Row Count 7 (+ 1) % Row 6 \SetRowColor{LightBackground} {[}`p P`{]} & paste {[}after before{]} \tn % Row Count 8 (+ 1) % Row 7 \SetRowColor{white} `p Ctrl+P` & paste previous \tn % Row Count 10 (+ 2) % Row 8 \SetRowColor{LightBackground} `r` & sexp raise (replace parent with current) \tn % Row Count 12 (+ 2) % Row 9 \SetRowColor{white} {[}`w W`{]} & {[}wrap unwrap{]} \tn % Row Count 13 (+ 1) % Row 10 \SetRowColor{LightBackground} `y` & sexp copy \tn % Row Count 14 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.94103 cm} x{3.03597 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Clojure / CIDER}} \tn % Row 0 \SetRowColor{LightBackground} `, s i` & start REPL \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} `, e b` & eval buffer \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} `, g g` & jump to definition \tn % Row Count 3 (+ 1) % Row 3 \SetRowColor{white} \seqsplit{`sesman-link-with-project`} & add a project to the current session (REPL) \tn % Row Count 5 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.94103 cm} x{3.03597 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Org Mode}} \tn % Row 0 \SetRowColor{LightBackground} `, T T` & Toggle Todo \tn % Row Count 1 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{2.14011 cm} x{2.83689 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Project}} \tn % Row 0 \SetRowColor{LightBackground} `SPC p` {[}`r f`{]} & {[}recent file{]} \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} `SPC p` {[}`! \&`{]} & {[}exec async{]} command \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} `SPC p p` & change project \tn % Row Count 3 (+ 1) % Row 3 \SetRowColor{white} `SPC p t` & NeoTree \tn % Row Count 4 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.19448 cm} x{3.78252 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Navigation}} \tn % Row 0 \SetRowColor{LightBackground} `Ctrl + o` & Jump Back \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} `SPC j i` & jump to a definition in buffer \tn % Row Count 3 (+ 1) % Row 2 \SetRowColor{LightBackground} `SPC j I` & jump to a definition any buffer \tn % Row Count 5 (+ 2) % Row 3 \SetRowColor{white} `SPC f b` & open bookmarks \tn % Row Count 6 (+ 1) % Row 4 \SetRowColor{LightBackground} `SPC s s` & search in buffer \tn % Row Count 7 (+ 1) % Row 5 \SetRowColor{white} `SPC /` & search in project \tn % Row Count 8 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.64241 cm} x{3.33459 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Selection}} \tn % Row 0 \SetRowColor{LightBackground} `SPC` {[}`v V r`{]} & region {[}expand contract reset{]} \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} `v i i` & region by indentation \tn % Row Count 3 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.79172 cm} x{3.18528 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Formating}} \tn % Row 0 \SetRowColor{LightBackground} `SPC j k` & indent next line \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} `SPC j =` & indent file \tn % Row Count 2 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{p{1.19448 cm} x{3.78252 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Text Objects}} \tn % Row 0 \SetRowColor{LightBackground} `w W` & word \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} `s` & sentence \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} `p` & paragraph \tn % Row Count 3 (+ 1) % Row 3 \SetRowColor{white} `t` & tag \tn % Row Count 4 (+ 1) % Row 4 \SetRowColor{LightBackground} `b` & block (s-exp) \tn % Row Count 5 (+ 1) % Row 5 \SetRowColor{white} `i` & same indentation \tn % Row Count 6 (+ 1) % Row 6 \SetRowColor{LightBackground} `f` & form \tn % Row Count 7 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{2.09034 cm} x{2.88666 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Movement}} \tn % Row 0 \SetRowColor{LightBackground} `''` & back to last position \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} `:` {\emph{n}} `ENTER` & goto line {\emph{n}} \tn % Row Count 2 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{2.04057 cm} x{2.93643 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Zooming}} \tn % Row 0 \SetRowColor{LightBackground} `SPC z x` {[}`+ - 0`{]} & {[}bigger smaller reset{]} font \tn % Row Count 2 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.24425 cm} x{3.73275 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Searching}} \tn % Row 0 \SetRowColor{LightBackground} `SPC t h a` & toggle automatic symbol highlight \tn % Row Count 2 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.94103 cm} x{3.03597 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Windows}} \tn % Row 0 \SetRowColor{LightBackground} `SPC w x` & close window and buffer \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} `SPC w m` & maximize \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} `SPC w C` & close other \tn % Row Count 3 (+ 1) % Row 3 \SetRowColor{white} `SPC w` {[}`- /`{]} & split {[}horizontal vertical{]} \tn % Row Count 5 (+ 2) % Row 4 \SetRowColor{LightBackground} `SPC w w` & cycle \tn % Row Count 6 (+ 1) % Row 5 \SetRowColor{white} `SPC w` {[}`h l k j`{]} & switch to {[}left right up down{]} \tn % Row Count 8 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{2.18988 cm} x{2.78712 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Buffers}} \tn % Row 0 \SetRowColor{LightBackground} `SPC TAB` & switch to alternate \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} `SPC b k` & kill \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} `SPC b` {[}`n p`{]} & {[}next previous{]} \tn % Row Count 3 (+ 1) % Row 3 \SetRowColor{white} `SPC b s` & {\emph{scratch}} \tn % Row Count 4 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.4931 cm} x{3.4839 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Files}} \tn % Row 0 \SetRowColor{LightBackground} `SPC f S` & save all \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} `SPC f E` & open with `sudo` \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} `SPC f o` & open with default app \tn % Row Count 3 (+ 1) % Row 3 \SetRowColor{white} `SPC f R` & rename \tn % Row Count 4 (+ 1) % Row 4 \SetRowColor{LightBackground} `SPC f d` & delete \tn % Row Count 5 (+ 1) % Row 5 \SetRowColor{white} `SPC f t` & NeoTree \tn % Row Count 6 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.24425 cm} x{3.73275 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Help}} \tn % Row 0 \SetRowColor{LightBackground} `SPC ?` & bindings and commands \tn % Row Count 1 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.69218 cm} x{3.28482 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Spacemacs}} \tn % Row 0 \SetRowColor{LightBackground} `SPC f e d` & open `.spacemacs` \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} `SPC SPC` & execute emacs command \tn % Row Count 2 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{p{0.79632 cm} x{4.18068 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Magit}} \tn % Row 0 \SetRowColor{LightBackground} `,,` & submit commit message \tn % Row Count 1 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} % That's all folks \end{multicols*} \end{document}