\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{Bipin Thite (bipinthite)} \pdfinfo{ /Title (ace-editor.pdf) /Creator (Cheatography) /Author (Bipin Thite (bipinthite)) /Subject (Ace Editor 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}{19C4B9} \definecolor{LightBackground}{HTML}{F0FBFA} \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{Ace Editor Cheat Sheet}}}} \\ \normalsize{by \textcolor{DarkBackground}{Bipin Thite (bipinthite)} via \textcolor{DarkBackground}{\uline{cheatography.com/36331/cs/11402/}}} \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}Bipin Thite (bipinthite) \\ \uline{cheatography.com/bipinthite} \\ \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Cheat Sheet}} \\ \vspace{-2pt}Published 9th April, 2017.\\ Updated 9th April, 2017.\\ 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*}{2} \begin{tabularx}{8.4cm}{x{3.116 cm} x{3.04 cm} x{1.444 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{8.4cm}}{\bf\textcolor{white}{Line Operations}} \tn % Row 0 \SetRowColor{LightBackground} \{\{fa-windows\}\} {\bf{Windows}}/\{\{fa-linux\}\} {\bf{Linux}} & \{\{fa-apple\}\} {\bf{Mac}} & {\bf{Action}} \tn % Row Count 4 (+ 4) % Row 1 \SetRowColor{white} Ctrl-D & Command-D & Remove line \tn % Row Count 6 (+ 2) % Row 2 \SetRowColor{LightBackground} Alt-Shift-Down & \seqsplit{Command-Option-Down} & Copy lines down \tn % Row Count 9 (+ 3) % Row 3 \SetRowColor{white} Alt-Shift-Up & \seqsplit{Command-Option-Up} & Copy lines up \tn % Row Count 11 (+ 2) % Row 4 \SetRowColor{LightBackground} Alt-Down & Option-Down & Move lines down \tn % Row Count 14 (+ 3) % Row 5 \SetRowColor{white} Alt-Up & Option-Up & Move lines up \tn % Row Count 16 (+ 2) % Row 6 \SetRowColor{LightBackground} Alt-Delete & Ctrl-K & Remove to line end \tn % Row Count 19 (+ 3) % Row 7 \SetRowColor{white} Alt-Backspace & \seqsplit{Command-Backspace} & Remove to \seqsplit{linestart} \tn % Row Count 22 (+ 3) % Row 8 \SetRowColor{LightBackground} Ctrl-Backspace & \seqsplit{Option-Backspace}, \{\{nl\}\}Ctrl-Option-Backspace & Remove word left \tn % Row Count 25 (+ 3) % Row 9 \SetRowColor{white} Ctrl-Delete & Option-Delete & Remove word right \tn % Row Count 28 (+ 3) % Row 10 \SetRowColor{LightBackground} -{}-{}- & Ctrl-O & Split line \tn % Row Count 30 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}---} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{3.572 cm} x{1.672 cm} x{2.356 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{8.4cm}}{\bf\textcolor{white}{Selection}} \tn % Row 0 \SetRowColor{LightBackground} \{\{fa-windows\}\} {\bf{Windows}}/\{\{fa-linux\}\} {\bf{Linux}} & \{\{fa-apple\}\}{\bf{Mac}} & {\bf{Action}} \tn % Row Count 3 (+ 3) % Row 1 \SetRowColor{white} Ctrl-A & \seqsplit{Command-A} & Select all \tn % Row Count 5 (+ 2) % Row 2 \SetRowColor{LightBackground} Shift-Left & \seqsplit{Shift-Left} & Select left \tn % Row Count 7 (+ 2) % Row 3 \SetRowColor{white} Shift-Right & \seqsplit{Shift-Right} & Select right \tn % Row Count 9 (+ 2) % Row 4 \SetRowColor{LightBackground} Ctrl-Shift-Left & \seqsplit{Option-Shift-Left} & Select word left \tn % Row Count 12 (+ 3) % Row 5 \SetRowColor{white} Ctrl-Shift-Right & \seqsplit{Option-Shift-Right} & Select word right \tn % Row Count 15 (+ 3) % Row 6 \SetRowColor{LightBackground} Shift-Home & \seqsplit{Shift-Home} & Select line start \tn % Row Count 17 (+ 2) % Row 7 \SetRowColor{white} Shift-End & \seqsplit{Shift-End} & Select line end \tn % Row Count 19 (+ 2) % Row 8 \SetRowColor{LightBackground} Alt-Shift-Right & \seqsplit{Command-Shift-Right} & Select to line end \tn % Row Count 22 (+ 3) % Row 9 \SetRowColor{white} Alt-Shift-Left & \seqsplit{Command-Shift-Left} & Select to line start \tn % Row Count 25 (+ 3) % Row 10 \SetRowColor{LightBackground} Shift-Up & \seqsplit{Shift-Up} & Select up \tn % Row Count 26 (+ 1) % Row 11 \SetRowColor{white} Shift-Down & \seqsplit{Shift-Down} & Select down \tn % Row Count 28 (+ 2) % Row 12 \SetRowColor{LightBackground} Shift-PageUp & \seqsplit{Shift-PageUp} & Select page up \tn % Row Count 30 (+ 2) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{8.4cm}{x{3.572 cm} x{1.672 cm} x{2.356 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{8.4cm}}{\bf\textcolor{white}{Selection (cont)}} \tn % Row 13 \SetRowColor{LightBackground} Shift-PageDown & \seqsplit{Shift-PageDown} & Select page down \tn % Row Count 2 (+ 2) % Row 14 \SetRowColor{white} Ctrl-Shift-Home & \seqsplit{Command-Shift-Up} & Select to start \tn % Row Count 4 (+ 2) % Row 15 \SetRowColor{LightBackground} Ctrl-Shift-End & \seqsplit{Command-Shift-Down} & Select to end \tn % Row Count 7 (+ 3) % Row 16 \SetRowColor{white} Ctrl-Shift-D & \seqsplit{Command-Shift-D} & Duplicate selection \tn % Row Count 9 (+ 2) % Row 17 \SetRowColor{LightBackground} Ctrl-Shift-P & -{}-{}- & Select to matching bracket \tn % Row Count 12 (+ 3) \hhline{>{\arrayrulecolor{DarkBackground}}---} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{2.964 cm} x{1.672 cm} x{2.964 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{8.4cm}}{\bf\textcolor{white}{Multicursor}} \tn % Row 0 \SetRowColor{LightBackground} \{\{fa-windows\}\} {\bf{Windows}}/\{\{fa-linux\}\} {\bf{Linux}} & \{\{fa-apple\}\} {\bf{Mac}} & {\bf{Action}} \tn % Row Count 4 (+ 4) % Row 1 \SetRowColor{white} Ctrl-Alt-Up & \seqsplit{Ctrl-Option-Up} & Add multi-cursor above \tn % Row Count 6 (+ 2) % Row 2 \SetRowColor{LightBackground} Ctrl-Alt-Down & \seqsplit{Ctrl-Option-Down} & Add multi-cursor below \tn % Row Count 8 (+ 2) % Row 3 \SetRowColor{white} Ctrl-Alt-Right & \seqsplit{Ctrl-Option-Right} & Add next occurrence\{\{nl\}\}to \seqsplit{multi-selection} \tn % Row Count 11 (+ 3) % Row 4 \SetRowColor{LightBackground} Ctrl-Alt-Left & \seqsplit{Ctrl-Option-Left} & Add previous occurrence\{\{nl\}\}to \seqsplit{multi-selection} \tn % Row Count 15 (+ 4) % Row 5 \SetRowColor{white} \seqsplit{Ctrl-Alt-Shift-Up} & \seqsplit{Ctrl-Option-Shift-Up} & Move multicursor from\{\{nl\}\}current line to\{\{nl\}\}the line above \tn % Row Count 20 (+ 5) % Row 6 \SetRowColor{LightBackground} \seqsplit{Ctrl-Alt-Shift-Down} & \seqsplit{Ctrl-Option-Shift-Down} & Move multicursor from\{\{nl\}\}current line to\{\{nl\}\}the line below \tn % Row Count 25 (+ 5) % Row 7 \SetRowColor{white} \seqsplit{Ctrl-Alt-Shift-Right} & \seqsplit{Ctrl-Option-Shift-Right} & Remove current occurrence\{\{nl\}\}from multi-selection\{\{nl\}\}and move to next \tn % Row Count 30 (+ 5) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{8.4cm}{x{2.964 cm} x{1.672 cm} x{2.964 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{8.4cm}}{\bf\textcolor{white}{Multicursor (cont)}} \tn % Row 8 \SetRowColor{LightBackground} \seqsplit{Ctrl-Alt-Shift-Left} & \seqsplit{Ctrl-Option-Shift-Left} & Remove current occurrence\{\{nl\}\}from multi-selection\{\{nl\}\}and move to previous \tn % Row Count 6 (+ 6) % Row 9 \SetRowColor{white} Ctrl-Shift-L & \seqsplit{Ctrl-Shift-L} & Select all from \seqsplit{multi-selection} \tn % Row Count 9 (+ 3) \hhline{>{\arrayrulecolor{DarkBackground}}---} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{3.268 cm} x{2.508 cm} x{1.824 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{8.4cm}}{\bf\textcolor{white}{Go to}} \tn % Row 0 \SetRowColor{LightBackground} \{\{fa-windows\}\} {\bf{Windows}}/\{\{fa-linux\}\} {\bf{Linux}} & \{\{fa-apple\}\} {\bf{Mac}} & {\bf{Action}} \tn % Row Count 3 (+ 3) % Row 1 \SetRowColor{white} Left & Left, Ctrl-B & Go to left \tn % Row Count 5 (+ 2) % Row 2 \SetRowColor{LightBackground} Right & Right, Ctrl-F & Go to right \tn % Row Count 7 (+ 2) % Row 3 \SetRowColor{white} Ctrl-Left & Option-Left & Go to word left \tn % Row Count 9 (+ 2) % Row 4 \SetRowColor{LightBackground} Ctrl-Right & Option-Right & Go to word right \tn % Row Count 11 (+ 2) % Row 5 \SetRowColor{white} Up & Up, Ctrl-P & Go line up \tn % Row Count 13 (+ 2) % Row 6 \SetRowColor{LightBackground} Down & Down, Ctrl-N & Go line down \tn % Row Count 15 (+ 2) % Row 7 \SetRowColor{white} Alt-Left, Home & Command-Left,\{\{nl\}\}Home, Ctrl-A & Go to line start \tn % Row Count 18 (+ 3) % Row 8 \SetRowColor{LightBackground} Alt-Right, End & \seqsplit{Command-Right},\{\{nl\}\}End, Ctrl-E & Go to line end \tn % Row Count 21 (+ 3) % Row 9 \SetRowColor{white} PageUp & \seqsplit{Option-PageUp} & Go to page up \tn % Row Count 23 (+ 2) % Row 10 \SetRowColor{LightBackground} PageDown & \seqsplit{Option-PageDown},\{\{nl\}\}Ctrl-V & Go to page down \tn % Row Count 26 (+ 3) % Row 11 \SetRowColor{white} Ctrl-Home & Command-Home,\{\{nl\}\}Command-Up & Go to start \tn % Row Count 29 (+ 3) % Row 12 \SetRowColor{LightBackground} Ctrl-End & Command-End,\{\{nl\}\}Command-Down & Go to end \tn % Row Count 32 (+ 3) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{8.4cm}{x{3.268 cm} x{2.508 cm} x{1.824 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{8.4cm}}{\bf\textcolor{white}{Go to (cont)}} \tn % Row 13 \SetRowColor{LightBackground} Ctrl-L & Command-L & Go to line \tn % Row Count 2 (+ 2) % Row 14 \SetRowColor{white} Ctrl-Down & Command-Down & Scroll line down \tn % Row Count 4 (+ 2) % Row 15 \SetRowColor{LightBackground} Ctrl-Up & -{}-{}- & Scroll line up \tn % Row Count 6 (+ 2) % Row 16 \SetRowColor{white} Ctrl-P & -{}-{}- & Go to matching bracket \tn % Row Count 9 (+ 3) % Row 17 \SetRowColor{LightBackground} -{}-{}- & \seqsplit{Option-PageDown} & Scroll page down \tn % Row Count 11 (+ 2) % Row 18 \SetRowColor{white} -{}-{}- & \seqsplit{Option-PageUp} & Scroll page up \tn % Row Count 13 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}---} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{4.18 cm} x{2.052 cm} x{1.368 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{8.4cm}}{\bf\textcolor{white}{Find/Replace}} \tn % Row 0 \SetRowColor{LightBackground} \{\{fa-windows\}\} {\bf{Windows}}/\{\{fa-linux\}\} {\bf{Linux}} & \{\{fa-apple\}\} {\bf{Mac}} & {\bf{Action}} \tn % Row Count 3 (+ 3) % Row 1 \SetRowColor{white} Ctrl-F & Command-F & Find \tn % Row Count 4 (+ 1) % Row 2 \SetRowColor{LightBackground} Ctrl-H & \seqsplit{Command-Option-F} & \seqsplit{Replace} \tn % Row Count 6 (+ 2) % Row 3 \SetRowColor{white} Ctrl-K & Command-G & Find next \tn % Row Count 8 (+ 2) % Row 4 \SetRowColor{LightBackground} Ctrl-Shift-K & \seqsplit{Command-Shift-G} & Find \seqsplit{previous} \tn % Row Count 10 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}---} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{3.192 cm} x{3.268 cm} x{1.14 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{8.4cm}}{\bf\textcolor{white}{Folding}} \tn % Row 0 \SetRowColor{LightBackground} \{\{fa-windows\}\} {\bf{Windows}}/\{\{fa-linux\}\} {\bf{Linux}} & \{\{fa-apple\}\} {\bf{Mac}} & {\bf{Action}} \tn % Row Count 4 (+ 4) % Row 1 \SetRowColor{white} Alt-L, Ctrl-F1 & Command-Option-L, Command-F1 & Fold \seqsplit{selection} \tn % Row Count 7 (+ 3) % Row 2 \SetRowColor{LightBackground} Alt-Shift-L,\{\{nl\}\}Ctrl-Shift-F1 & \seqsplit{Command-Option-Shift-L},\{\{nl\}\}Command-Shift-F1 & \seqsplit{Unfold} \tn % Row Count 10 (+ 3) % Row 3 \SetRowColor{white} Alt-0 & Command-Option-0 & Fold all \tn % Row Count 12 (+ 2) % Row 4 \SetRowColor{LightBackground} Alt-Shift-0 & \seqsplit{Command-Option-Shift-0} & \seqsplit{Unfold} all \tn % Row Count 14 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}---} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{3.268 cm} x{2.508 cm} x{1.824 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{8.4cm}}{\bf\textcolor{white}{Other}} \tn % Row 0 \SetRowColor{LightBackground} \{\{fa-windows\}\} {\bf{Windows}}/\{\{fa-linux\}\} {\bf{Linux}} & \{\{fa-apple\}\}{\bf{Mac}} & {\bf{Action}} \tn % Row Count 3 (+ 3) % Row 1 \SetRowColor{white} Tab & Tab & Indent \tn % Row Count 4 (+ 1) % Row 2 \SetRowColor{LightBackground} Shift-Tab & Shift-Tab & Outdent \tn % Row Count 5 (+ 1) % Row 3 \SetRowColor{white} Ctrl-Z & Command-Z & Undo \tn % Row Count 6 (+ 1) % Row 4 \SetRowColor{LightBackground} Ctrl-Shift-Z,\{\{nl\}\}Ctrl-Y & \seqsplit{Command-Shift-Z},\{\{nl\}\}Command-Y & Redo \tn % Row Count 9 (+ 3) % Row 5 \SetRowColor{white} Ctrl-, & Command-, & Show the settings menu \tn % Row Count 12 (+ 3) % Row 6 \SetRowColor{LightBackground} Ctrl-/ & Command-/ & Toggle comment \tn % Row Count 14 (+ 2) % Row 7 \SetRowColor{white} Ctrl-T & Ctrl-T & \seqsplit{Transpose} letters \tn % Row Count 16 (+ 2) % Row 8 \SetRowColor{LightBackground} Ctrl-Enter & \seqsplit{Command-Enter} & Enter full screen \tn % Row Count 18 (+ 2) % Row 9 \SetRowColor{white} Ctrl-Shift-U & Ctrl-Shift-U & Change to lower case \tn % Row Count 21 (+ 3) % Row 10 \SetRowColor{LightBackground} Ctrl-U & Ctrl-U & Change to upper case \tn % Row Count 24 (+ 3) % Row 11 \SetRowColor{white} Insert & Insert & \seqsplit{Overwrite} \tn % Row Count 25 (+ 1) % Row 12 \SetRowColor{LightBackground} Ctrl-Shift-E & \seqsplit{Command-Shift-E} & Macros replay \tn % Row Count 27 (+ 2) % Row 13 \SetRowColor{white} Ctrl-Alt-E & -{}-{}- & Macros \seqsplit{recording} \tn % Row Count 29 (+ 2) % Row 14 \SetRowColor{LightBackground} Delete & -{}-{}- & Delete \tn % Row Count 30 (+ 1) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{8.4cm}{x{3.268 cm} x{2.508 cm} x{1.824 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{8.4cm}}{\bf\textcolor{white}{Other (cont)}} \tn % Row 15 \SetRowColor{LightBackground} -{}-{}- & Ctrl-L & Center \seqsplit{selection} \tn % Row Count 2 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}---} \end{tabularx} \par\addvspace{1.3em} % That's all folks \end{multicols*} \end{document}