\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{matcauthon} \pdfinfo{ /Title (spacemacs.pdf) /Creator (Cheatography) /Author (matcauthon) /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}{774BA3} \definecolor{LightBackground}{HTML}{F6F3F9} \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}{matcauthon} via \textcolor{DarkBackground}{\uline{cheatography.com/25092/cs/13719/}}} \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}matcauthon \\ \uline{cheatography.com/matcauthon} \\ \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Cheat Sheet}} \\ \vspace{-2pt}Not Yet Published.\\ Updated 23rd July, 2018.\\ 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{4.03137 cm} x{0.94563 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{File}} \tn % Row 0 \SetRowColor{LightBackground} Open file & SPC p f \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} Open directory of current file & SPC f j \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} Rename current file & SPC f R \tn % Row Count 3 (+ 1) % Row 3 \SetRowColor{white} Save File & SPC f s \tn % Row Count 4 (+ 1) % Row 4 \SetRowColor{LightBackground} Delete file & SPC f d \tn % Row Count 5 (+ 1) % Row 5 \SetRowColor{white} Neo tree & SPC f t \tn % Row Count 6 (+ 1) % Row 6 \SetRowColor{LightBackground} Helm find file & SPC f f \tn % Row Count 7 (+ 1) % Row 7 \SetRowColor{white} Open file in default app & SPC f o \tn % Row Count 8 (+ 1) % Row 8 \SetRowColor{LightBackground} Recently opened files & SPC f r \tn % Row Count 9 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{3.73275 cm} x{1.24425 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Projects}} \tn % Row 0 \SetRowColor{LightBackground} Open recent project & SPC p p \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} Current project files & SPC p f \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} Project neo tree & SPC p t \tn % Row Count 3 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{2.78712 cm} x{2.18988 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Org Mode}} \tn % Row 0 \SetRowColor{LightBackground} Add item below & C-Ret \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} Add Todo item below & C-Shift-Ret \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} Archive Subtree into archive file & C-c C-x s \tn % Row Count 4 (+ 2) % Row 3 \SetRowColor{white} Table Create & | Column 1 | Column 2 | (Tab) \tn % Row Count 6 (+ 2) % Row 4 \SetRowColor{LightBackground} Table Move To Cell & Tab \tn % Row Count 7 (+ 1) % Row 5 \SetRowColor{white} Insert Link & C-c C-l \tn % Row Count 8 (+ 1) % Row 6 \SetRowColor{LightBackground} Insert Code Block & \textless{}s (Tab) \tn % Row Count 9 (+ 1) % Row 7 \SetRowColor{white} Insert Other Environment & \textless{}{[}s,q,v,l,c,e,h{]} (Tab) \tn % Row Count 11 (+ 2) % Row 8 \SetRowColor{LightBackground} Switch Todo State & Shift-Left/Right \tn % Row Count 12 (+ 1) % Row 9 \SetRowColor{white} Add tag to item & SPC m : \tn % Row Count 13 (+ 1) % Row 10 \SetRowColor{LightBackground} Switch priority & Shift-Up/Down \tn % Row Count 14 (+ 1) % Row 11 \SetRowColor{white} Schedule item & SPC m s \tn % Row Count 15 (+ 1) % Row 12 \SetRowColor{LightBackground} Set deadline & SPC m d \tn % Row Count 16 (+ 1) % Row 13 \SetRowColor{white} Todo List Cycle Done & C-c C-x C-b \tn % Row Count 17 (+ 1) % Row 14 \SetRowColor{LightBackground} Todo List Show Open/Done & {[}/{]} oder {[}\%{]} \tn % Row Count 19 (+ 2) % Row 15 \SetRowColor{white} Update Todo List Statistics & C-c \# \tn % Row Count 21 (+ 2) % Row 16 \SetRowColor{LightBackground} Insert new Todo List Item & Meta-Shift-Ret \tn % Row Count 23 (+ 2) % Row 17 \SetRowColor{white} Add todo item & t/T \tn % Row Count 24 (+ 1) % Row 18 \SetRowColor{LightBackground} Switch headlines & \textless{}/\textgreater{} \tn % Row Count 25 (+ 1) % Row 19 \SetRowColor{white} Show Todos & SPC a o t \tn % Row Count 26 (+ 1) % Row 20 \SetRowColor{LightBackground} Show agenda & SPC m a \tn % Row Count 27 (+ 1) % Row 21 \SetRowColor{white} Agenda show next/before & f/b \tn % Row Count 29 (+ 2) % Row 22 \SetRowColor{LightBackground} Agenda show day/week/today/date & d/w/./J (or C-v) \tn % Row Count 31 (+ 2) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{x{2.78712 cm} x{2.18988 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Org Mode (cont)}} \tn % Row 23 \SetRowColor{LightBackground} Agenda toggle entry text / clock report & E/R \tn % Row Count 2 (+ 2) % Row 24 \SetRowColor{white} Agenda change Todo state & t \tn % Row Count 4 (+ 2) % Row 25 \SetRowColor{LightBackground} Agenda archive Item & a \tn % Row Count 5 (+ 1) % Row 26 \SetRowColor{white} Agenda Close & q \tn % Row Count 6 (+ 1) % Row 27 \SetRowColor{LightBackground} Agenda Transient state & Meta-SPC \tn % Row Count 7 (+ 1) % Row 28 \SetRowColor{white} Start pomodoro & SPC m p \tn % Row Count 8 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{2.73735 cm} x{2.23965 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Search}} \tn % Row 0 \SetRowColor{LightBackground} Search & SPC / \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} Search word under cursor & C-s C-w \tn % Row Count 3 (+ 2) % Row 2 \SetRowColor{LightBackground} Search last query & C-s C-s \tn % Row Count 4 (+ 1) % Row 3 \SetRowColor{white} Search in buffer (helm swoop) & SPC s s \tn % Row Count 6 (+ 2) % Row 4 \SetRowColor{LightBackground} Search files in folder & SPC s f \tn % Row Count 7 (+ 1) % Row 5 \SetRowColor{white} Search files in open buffers & SPC s b \tn % Row Count 9 (+ 2) % Row 6 \SetRowColor{LightBackground} Search for word under cursor & SPC * \tn % Row Count 11 (+ 2) % Row 7 \SetRowColor{white} Search again & n (N) \tn % Row Count 12 (+ 1) % Row 8 \SetRowColor{LightBackground} Find matching brace & \% \tn % Row Count 13 (+ 1) % Row 9 \SetRowColor{white} Mark position with a & m a \tn % Row Count 14 (+ 1) % Row 10 \SetRowColor{LightBackground} Goto mark a & `a or 'a \tn % Row Count 15 (+ 1) % Row 11 \SetRowColor{white} Search / Replace & ALT + \% (y, n, !) \tn % Row Count 16 (+ 1) % Row 12 \SetRowColor{LightBackground} Search / Replace (regex) & CTRL + ALT + \% (y, n, !) \tn % Row Count 18 (+ 2) % Row 13 \SetRowColor{white} Search by semantic symbol & SPC s j \tn % Row Count 20 (+ 2) % Row 14 \SetRowColor{LightBackground} Clear search highlights & SPC s c \tn % Row Count 22 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{3.88206 cm} x{1.09494 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Editing}} \tn % Row 0 \SetRowColor{LightBackground} Down, Up, Left, Right & j k h l \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} Go left a word & b \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} Go right a word & w \tn % Row Count 3 (+ 1) % Row 3 \SetRowColor{white} End of word & e \tn % Row Count 4 (+ 1) % Row 4 \SetRowColor{LightBackground} Select & SPC v \tn % Row Count 5 (+ 1) % Row 5 \SetRowColor{white} lower case & M-l \tn % Row Count 6 (+ 1) % Row 6 \SetRowColor{LightBackground} upper case & M-u \tn % Row Count 7 (+ 1) % Row 7 \SetRowColor{white} switch insert mode & i \tn % Row Count 8 (+ 1) % Row 8 \SetRowColor{LightBackground} switch command mode & ESC \tn % Row Count 9 (+ 1) % Row 9 \SetRowColor{white} Undo & C-/ \tn % Row Count 10 (+ 1) % Row 10 \SetRowColor{LightBackground} Redo & C-? \tn % Row Count 11 (+ 1) % Row 11 \SetRowColor{white} Delete char under cursor & x \tn % Row Count 12 (+ 1) % Row 12 \SetRowColor{LightBackground} Delete line & d d \tn % Row Count 13 (+ 1) % Row 13 \SetRowColor{white} Copy line & y y \tn % Row Count 14 (+ 1) % Row 14 \SetRowColor{LightBackground} Paste after/before cursor & p (P) \tn % Row Count 15 (+ 1) % Row 15 \SetRowColor{white} add line & o (O) \tn % Row Count 16 (+ 1) % Row 16 \SetRowColor{LightBackground} replace & r (R) \tn % Row Count 17 (+ 1) % Row 17 \SetRowColor{white} Select line & V j \tn % Row Count 18 (+ 1) % Row 18 \SetRowColor{LightBackground} Open Kill Ring & SPC r y \tn % Row Count 19 (+ 1) % Row 19 \SetRowColor{white} Beginning/End of line & 0/\$ \tn % Row Count 20 (+ 1) % Row 20 \SetRowColor{LightBackground} Show undo tree & SPC a u \tn % Row Count 21 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{3.33459 cm} x{1.64241 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Coding}} \tn % Row 0 \SetRowColor{LightBackground} toggle fold & SPC z a \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} comment paragraph/line & SPC c {[}p l{]} \tn % Row Count 2 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{3.43413 cm} x{1.54287 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Window}} \tn % Row 0 \SetRowColor{LightBackground} Close Emacs & SPC q q \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} Switch Buffer & SPC b b \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} Last Buffer & SPC Tab \tn % Row Count 3 (+ 1) % Row 3 \SetRowColor{white} Focus Window & SPC 1..9 \tn % Row Count 4 (+ 1) % Row 4 \SetRowColor{LightBackground} Focus Next Window & SPC w c \tn % Row Count 5 (+ 1) % Row 5 \SetRowColor{white} Split window below & SPC w s \tn % Row Count 6 (+ 1) % Row 6 \SetRowColor{LightBackground} Split window right & SPC w v \tn % Row Count 7 (+ 1) % Row 7 \SetRowColor{white} Close Window & SPC w d \tn % Row Count 8 (+ 1) % Row 8 \SetRowColor{LightBackground} Maximize Window & SPC w m \tn % Row Count 9 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{3.73275 cm} x{1.24425 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Settings}} \tn % Row 0 \SetRowColor{LightBackground} Open Config & SPC f e d \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} Increase/Decrease font size & SPC z x \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} Spellcheck & SPC t S \tn % Row Count 3 (+ 1) % Row 3 \SetRowColor{white} correct word & SPC S c \tn % Row Count 4 (+ 1) % Row 4 \SetRowColor{LightBackground} next word & SPC s n \tn % Row Count 5 (+ 1) % Row 5 \SetRowColor{white} help & SPC ? \tn % Row Count 6 (+ 1) % Row 6 \SetRowColor{LightBackground} toggle syntax check & SPC t s \tn % Row Count 7 (+ 1) % Row 7 \SetRowColor{white} toggle line wrap & SPC t l \tn % Row Count 8 (+ 1) % Row 8 \SetRowColor{LightBackground} toggle auto completion & SPC t a \tn % Row Count 9 (+ 1) % Row 9 \SetRowColor{white} list all functions & SPC s l \tn % Row Count 10 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{3.08574 cm} x{1.89126 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Python}} \tn % Row 0 \SetRowColor{LightBackground} Lookup function & SPC m h h \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} Run script & SPC m c c \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} Reformat & SPC m = \tn % Row Count 3 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{2.83689 cm} x{2.14011 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Markdown}} \tn % Row 0 \SetRowColor{LightBackground} export & SPC m c e \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} preview & SPC m c p \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} insert heading & SPC m h \textless{}level\textgreater{} \tn % Row Count 3 (+ 1) % Row 3 \SetRowColor{white} insert link & SPC m l \tn % Row Count 4 (+ 1) % Row 4 \SetRowColor{LightBackground} insert footnote & SPC m f \tn % Row Count 5 (+ 1) % Row 5 \SetRowColor{white} bold selection & SPC m b \tn % Row Count 6 (+ 1) % Row 6 \SetRowColor{LightBackground} italic selection & SPC m i \tn % Row Count 7 (+ 1) % Row 7 \SetRowColor{white} blockquote selection & SPC m q \tn % Row Count 8 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} % That's all folks \end{multicols*} \end{document}