\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{deftcode} \pdfinfo{ /Title (webstorm-os-x.pdf) /Creator (Cheatography) /Author (deftcode) /Subject (Webstorm OS X 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}{A3A3A3} \definecolor{LightBackground}{HTML}{F3F3F3} \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{Webstorm OS X Cheat Sheet}}}} \\ \normalsize{by \textcolor{DarkBackground}{deftcode} via \textcolor{DarkBackground}{\uline{cheatography.com/36955/cs/11988/}}} \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}deftcode \\ \uline{cheatography.com/deftcode} \\ \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Cheat Sheet}} \\ \vspace{-2pt}Published 3rd June, 2017.\\ Updated 3rd June, 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{2.8 cm} x{5.2 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Editing}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{Ctrl + Space}} & Basic code completion \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} {\bf{Alt + Enter}} & Show intention actions and quick-fixes \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} {\bf{Cmd + P}} & Parameter info (within method call arguments) \tn % Row Count 6 (+ 2) % Row 3 \SetRowColor{white} {\bf{Alt + J}} & Quick documentation lookup \tn % Row Count 7 (+ 1) % Row 4 \SetRowColor{LightBackground} {\bf{Cmd + N}} & Create new file \tn % Row Count 8 (+ 1) % Row 5 \SetRowColor{white} {\bf{Cmd + Alt + T}} & Surround with... \tn % Row Count 10 (+ 2) % Row 6 \SetRowColor{LightBackground} {\bf{Cmd + J}} & Insert live template \tn % Row Count 11 (+ 1) % Row 7 \SetRowColor{white} {\bf{Cmd + /}} & Comment/uncomment with line comment \tn % Row Count 13 (+ 2) % Row 8 \SetRowColor{LightBackground} {\bf{Cmd + Shift + /}} & Comment/uncomment with block comment \tn % Row Count 15 (+ 2) % Row 9 \SetRowColor{white} {\bf{Alt + Up}} & Select successively increasing code blocks \tn % Row Count 17 (+ 2) % Row 10 \SetRowColor{LightBackground} {\bf{Alt + Bottom}} & Decrease current selection to previous state \tn % Row Count 19 (+ 2) % Row 11 \SetRowColor{white} {\bf{Cmd + Alt + L}} & Reformat code \tn % Row Count 21 (+ 2) % Row 12 \SetRowColor{LightBackground} {\bf{Tab}} & Indent selected lines \tn % Row Count 22 (+ 1) % Row 13 \SetRowColor{white} {\bf{Shift + Tab}} & Unindent selected lines \tn % Row Count 24 (+ 2) % Row 14 \SetRowColor{LightBackground} {\bf{Cmd + D}} & Duplicate current line or selected block \tn % Row Count 26 (+ 2) % Row 15 \SetRowColor{white} {\bf{Cmd + Backspace}} & Delete line at caret \tn % Row Count 28 (+ 2) % Row 16 \SetRowColor{LightBackground} {\bf{Alt + Shift + Up}} & Move line up \tn % Row Count 30 (+ 2) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{8.4cm}{x{2.8 cm} x{5.2 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Editing (cont)}} \tn % Row 17 \SetRowColor{LightBackground} {\bf{Alt + Shift + Down}} & Move line down \tn % Row Count 2 (+ 2) % Row 18 \SetRowColor{white} {\bf{Cmd+ / Cmd-}} & Expand/collapse code block \tn % Row Count 4 (+ 2) % Row 19 \SetRowColor{LightBackground} {\bf{Cmd + W}} & Close active editor tab \tn % Row Count 5 (+ 1) % Row 20 \SetRowColor{white} Cmd + F1 & Show descriptions of error or warning at caret \tn % Row Count 7 (+ 2) % Row 21 \SetRowColor{LightBackground} Ctrl + Shift + J & Join lines \tn % Row Count 9 (+ 2) % Row 22 \SetRowColor{white} Cmd + Enter & Split line \tn % Row Count 10 (+ 1) % Row 23 \SetRowColor{LightBackground} Shift + Enter & Start new line \tn % Row Count 11 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{4.16 cm} x{3.84 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Refactoring}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{Ctrl + T}} & Refactor this \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} {\bf{F5 / F6}} & Copy / Move \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} {\bf{Shift + F6}} & Rename \tn % Row Count 3 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{3.6 cm} x{4.4 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{VCS/Local history}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{Ctrl + V}} & VCS quick popup \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} {\bf{Cmd + K}} & Commit project to VCS \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} {\bf{Cmd + T}} & Update project from VCS \tn % Row Count 4 (+ 2) % Row 3 \SetRowColor{white} {\bf{Shift + Cmd + K}} & Push project to VCS \tn % Row Count 6 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{3.12 cm} x{4.88 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{General}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{Double Shift}} & Search everywhere \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} {\bf{Shift + Cmd + A}} & Find action \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} {\bf{Cmd + 0...Cmd+9}} & Open corresponding tool window \tn % Row Count 6 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{3.2 cm} x{4.8 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Navigation}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{Cmd + Shift + {]}}} & Go to next editor tab \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} {\bf{Cmd + Shift + {[}}} & Go to previous editor tab \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} {\bf{Shift + Cmd + O}} & Go to file \tn % Row Count 6 (+ 2) % Row 3 \SetRowColor{white} {\bf{Cmd + Up}} & Jump to navigation bar \tn % Row Count 7 (+ 1) % Row 4 \SetRowColor{LightBackground} {\bf{Cmd + Y}} & Open quick definition lookup \tn % Row Count 9 (+ 2) % Row 5 \SetRowColor{white} {\bf{Cmd + E}} & Recent files popup \tn % Row Count 10 (+ 1) % Row 6 \SetRowColor{LightBackground} {\bf{Cmd + B}} & Go to declaration \tn % Row Count 11 (+ 1) % Row 7 \SetRowColor{white} {\bf{Cmd + O}} & Go to class \tn % Row Count 12 (+ 1) % Row 8 \SetRowColor{LightBackground} {\bf{Cmd + Alt + Q}} & Go to symbol \tn % Row Count 14 (+ 2) % Row 9 \SetRowColor{white} {\bf{Cmd + Alt + B}} & Go to implementation(s) \tn % Row Count 16 (+ 2) % Row 10 \SetRowColor{LightBackground} Cmd + F12 & File structure popup \tn % Row Count 17 (+ 1) % Row 11 \SetRowColor{white} Cmd + L & Go to line \tn % Row Count 18 (+ 1) % Row 12 \SetRowColor{LightBackground} Ctrl + M & Move caret to matching brace \tn % Row Count 20 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \SetRowColor{LightBackground} \mymulticolumn{2}{x{8.4cm}}{- You can navigate in any webstorm's list just typing in it \newline - Alt + character let's you choose proper button in webstorm's UI.} \tn \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{3.84 cm} x{4.16 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Multiple carets and selections}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{Alt + Left click}} & Add or remove caret \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} {\bf{Ctrl + Cmd + G}} & Select all occurrences \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} {\bf{Ctrl + G}} & Select next occurrence \tn % Row Count 6 (+ 2) % Row 3 \SetRowColor{white} {\bf{Ctrl + Shift + G}} & Unselect occurrence \tn % Row Count 8 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{4.96 cm} x{3.04 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Search/Replace}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{Cmd + F / Cmd + R}} & Find / Replace \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} {\bf{Cmd + G / Shift + Cmd + G}} & Find next/previous \tn % Row Count 3 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{3.6 cm} x{4.4 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Usage search}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{Alt + F7}} & Find usages \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} {\bf{Cmd + F7}} & Find usages in file \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} {\bf{Shift + Cmd + F7}} & Highlight usages in file \tn % Row Count 4 (+ 2) % Row 3 \SetRowColor{white} {\bf{Alt + Cmd +F7}} & Show usages \tn % Row Count 5 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} % That's all folks \end{multicols*} \end{document}