\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{dogecoder} \pdfinfo{ /Title (neovim.pdf) /Creator (Cheatography) /Author (dogecoder) /Subject (neovim 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}{968C92} \definecolor{LightBackground}{HTML}{F8F7F8} \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{neovim Cheat Sheet}}}} \\ \normalsize{by \textcolor{DarkBackground}{dogecoder} via \textcolor{DarkBackground}{\uline{cheatography.com/210319/cs/45359/}}} \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}dogecoder \\ \uline{cheatography.com/dogecoder} \\ \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 January, 2025.\\ Updated 1st January, 2025.\\ 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{1.09494 cm} x{3.88206 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Exiting}} \tn % Row 0 \SetRowColor{LightBackground} :q & Close file \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} :qa & Close all files \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} :w & Save \tn % Row Count 3 (+ 1) % Row 3 \SetRowColor{white} :wq / :x & Save and close file \tn % Row Count 4 (+ 1) % Row 4 \SetRowColor{LightBackground} ZZ & Save and Quit \tn % Row Count 5 (+ 1) % Row 5 \SetRowColor{white} :q! /ZQ & Quit without checking changes \tn % Row Count 6 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{p{0.64701 cm} x{4.32999 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Editing}} \tn % Row 0 \SetRowColor{LightBackground} a & Append \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} A & Append fron end of line \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} i & Insert \tn % Row Count 3 (+ 1) % Row 3 \SetRowColor{white} o & Next line \tn % Row Count 4 (+ 1) % Row 4 \SetRowColor{LightBackground} O & Previous line \tn % Row Count 5 (+ 1) % Row 5 \SetRowColor{white} s & Delete char and insert \tn % Row Count 6 (+ 1) % Row 6 \SetRowColor{LightBackground} S & Delete line and insert \tn % Row Count 7 (+ 1) % Row 7 \SetRowColor{white} C & Delete until end of line and insert \tn % Row Count 9 (+ 2) % Row 8 \SetRowColor{LightBackground} r & Replace one character \tn % Row Count 10 (+ 1) % Row 9 \SetRowColor{white} R & Enter Replace mode \tn % Row Count 11 (+ 1) % Row 10 \SetRowColor{LightBackground} u & Undo changes \tn % Row Count 12 (+ 1) % Row 11 \SetRowColor{white} \textless{}C-R\textgreater{} & Redo changes \tn % Row Count 13 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{p{0.4977 cm} x{4.4793 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Character}} \tn % Row 0 \SetRowColor{LightBackground} fc & Go forward to character c \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} Fc & Go backward to character c \tn % Row Count 2 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.14471 cm} x{3.83229 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Line}} \tn % Row 0 \SetRowColor{LightBackground} 0 \textasciicircum{}(zero)\textasciicircum{} & Start of line \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} \textasciicircum{} & Start of line `(after whitespace)` \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} \$ & End of line \tn % Row Count 5 (+ 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}{Operators Usage}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{\{\{colspan=2\}\}{\emph{Operators let you operate in a range of text (defined by motion). These are performed in normal mode.}}} \tn % Row Count 3 (+ 3) % Row 1 \SetRowColor{white} d & w \tn % Row Count 4 (+ 1) % Row 2 \SetRowColor{LightBackground} \textasciicircum{}Operator\textasciicircum{} & \textasciicircum{}Motion\textasciicircum{} \tn % Row Count 5 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{p{0.94563 cm} x{4.03137 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Words}} \tn % Row 0 \SetRowColor{LightBackground} b / w & Previous/next word \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} ge / e & Previous/next end of word \tn % Row Count 2 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.00694 cm} x{2.2885 cm} x{1.28156 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{5.377cm}}{\bf\textcolor{white}{Text Objects Usage}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{3}{x{5.377cm}}{\{\{colspan=3\}\}Text objects let you operate (with an `operator`) in or around text blocks `(objects)`} \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} v & i & p \tn % Row Count 3 (+ 1) % Row 2 \SetRowColor{LightBackground} \textasciicircum{}Operator\textasciicircum{} & \textasciicircum{}{[}i{]}nside or {[}a{]}around\textasciicircum{} & \textasciicircum{}Text object\textasciicircum{} \tn % Row Count 5 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}---} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{p{0.9954 cm} x{3.9816 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Text Objects}} \tn % Row 0 \SetRowColor{LightBackground} p & Paragraph \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} w & Word \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} s & Sentence \tn % Row Count 3 (+ 1) % Row 3 \SetRowColor{white} {[} ( \{ & A {[}{]}, () or \{\} block \tn % Row Count 4 (+ 1) % Row 4 \SetRowColor{LightBackground} ` ' " & A quoted string \tn % Row Count 5 (+ 1) % Row 5 \SetRowColor{white} b & A block {[}( \tn % Row Count 6 (+ 1) % Row 6 \SetRowColor{LightBackground} B & A block in {[}\{ \tn % Row Count 7 (+ 1) % Row 7 \SetRowColor{white} t & A XML tag block \tn % Row Count 8 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.34379 cm} x{3.63321 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Windows}} \tn % Row 0 \SetRowColor{LightBackground} z\{height\}\textless{}Cr\textgreater{} & Resize pane to `\{height\}` lines tall \tn % Row Count 2 (+ 2) \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} \% & Nearerst/matching `\{{[}(){]}\}` \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} {[}( {[}\{ {[}\textless{} & Previous `(` or `\{` or `\textless{}` \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} {]}) & Next \tn % Row Count 3 (+ 1) % Row 3 \SetRowColor{white} {[}m & Previous method start \tn % Row Count 4 (+ 1) % Row 4 \SetRowColor{LightBackground} {[}M & Previous method end \tn % Row Count 5 (+ 1) \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}{Folds}} \tn % Row 0 \SetRowColor{LightBackground} zo / zO & Open \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} zc / zC & Close \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} za / zA & Toggle \tn % Row Count 3 (+ 1) % Row 3 \SetRowColor{white} zv & Open folds for thi line \tn % Row Count 4 (+ 1) % Row 4 \SetRowColor{LightBackground} zM & Close all \tn % Row Count 5 (+ 1) % Row 5 \SetRowColor{white} zR & Open all \tn % Row Count 6 (+ 1) % Row 6 \SetRowColor{LightBackground} zm & Fold more `(foldlevel +=1) ` \tn % Row Count 7 (+ 1) % Row 7 \SetRowColor{white} zr & Fold less `(foldlevel -=1)` \tn % Row Count 8 (+ 1) % Row 8 \SetRowColor{LightBackground} zx & Update folds \tn % Row Count 9 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{Uppercase ones are recursive (eg, `zO` is open recursively).} \tn \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.54287 cm} x{3.43413 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Tags}} \tn % Row 0 \SetRowColor{LightBackground} :tag Classname & Jump to first definition of `Classname` \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} \textless{}C-{]}\textgreater{} & Jump to definition \tn % Row Count 3 (+ 1) % Row 2 \SetRowColor{LightBackground} g{]} & See all definitions \tn % Row Count 4 (+ 1) % Row 3 \SetRowColor{white} \textless{}C-T\textgreater{} & Go back to last tag \tn % Row Count 5 (+ 1) % Row 4 \SetRowColor{LightBackground} \textless{}C-O\textgreater{} / \textless{}C-I\textgreater{} & Back/forward \tn % Row Count 7 (+ 2) % Row 5 \SetRowColor{white} :tselect Classname & Find definitions of `Classname` \tn % Row Count 9 (+ 2) % Row 6 \SetRowColor{LightBackground} :tjump Classname & Find definitions of `Classname` (auto-select 1st) \tn % Row Count 11 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.09494 cm} x{3.88206 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Exiting Insert Mode}} \tn % Row 0 \SetRowColor{LightBackground} Esc / \textless{}C-{[}\textgreater{} & Exit insert mode \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} \textless{}C-C\textgreater{} & Exit insert mode, and abort current command \tn % Row Count 4 (+ 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}{Clipboard}} \tn % Row 0 \SetRowColor{LightBackground} x & Delete character \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} dd & Delete line (Cut) \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} yy & Yank line (Copy) \tn % Row Count 3 (+ 1) % Row 3 \SetRowColor{white} p & Paste \tn % Row Count 4 (+ 1) % Row 4 \SetRowColor{LightBackground} P & Paste before \tn % Row Count 5 (+ 1) % Row 5 \SetRowColor{white} "*p / "+p & Paste from system clipboard \tn % Row Count 6 (+ 1) % Row 6 \SetRowColor{LightBackground} "*y / "+y & Paste to system clipboard \tn % Row Count 7 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.34379 cm} x{3.63321 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Document}} \tn % Row 0 \SetRowColor{LightBackground} gg & First line \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} G & Last line \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} :\{number\} & Go to line `\{number\}` \tn % Row Count 3 (+ 1) % Row 3 \SetRowColor{white} \{number\}G & Go to line `\{number\}` \tn % Row Count 4 (+ 1) % Row 4 \SetRowColor{LightBackground} \{number\}j & Go down `\{number\}` lines \tn % Row Count 5 (+ 1) % Row 5 \SetRowColor{white} \{number\}k & Go up `\{number\}` lines \tn % Row Count 6 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{p{0.4977 cm} x{4.4793 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Window}} \tn % Row 0 \SetRowColor{LightBackground} zz & Center this line \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} zt & Top this line \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} zb & Bottom this line \tn % Row Count 3 (+ 1) % Row 3 \SetRowColor{white} H & Move to top of screen \tn % Row Count 4 (+ 1) % Row 4 \SetRowColor{LightBackground} M & Move to middle of screen \tn % Row Count 5 (+ 1) % Row 5 \SetRowColor{white} L & Move to bottom of screen \tn % Row Count 6 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{p{0.4977 cm} x{4.4793 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Operators List}} \tn % Row 0 \SetRowColor{LightBackground} d & Delete \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} y & Yank \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} c & Change `(delete then insert)` \tn % Row Count 3 (+ 1) % Row 3 \SetRowColor{white} \textgreater{} & Indent right \tn % Row Count 4 (+ 1) % Row 4 \SetRowColor{LightBackground} \textless{} & Indent left \tn % Row Count 5 (+ 1) % Row 5 \SetRowColor{white} = & Autoident \tn % Row Count 6 (+ 1) % Row 6 \SetRowColor{LightBackground} g\textasciitilde{} & Swap case \tn % Row Count 7 (+ 1) % Row 7 \SetRowColor{white} gU & Uppercase \tn % Row Count 8 (+ 1) % Row 8 \SetRowColor{LightBackground} gu & Lowercase \tn % Row Count 9 (+ 1) % Row 9 \SetRowColor{white} ! & Filter through external program \tn % Row Count 10 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{See `:help operator`} \tn \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.04517 cm} x{3.93183 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Text Objects Examples}} \tn % Row 0 \SetRowColor{LightBackground} vip & Select paragraph \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} \seqsplit{vipipipip} & Select more \tn % Row Count 3 (+ 2) % Row 2 \SetRowColor{LightBackground} yip & Yank inner paragraph \tn % Row Count 4 (+ 1) % Row 3 \SetRowColor{white} yap & Yank paragraph (including newline) \tn % Row Count 6 (+ 2) % Row 4 \SetRowColor{LightBackground} dip & Delete inner paragraph \tn % Row Count 7 (+ 1) % Row 5 \SetRowColor{white} cip & Change inner paragraph \tn % Row Count 8 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{0.89586 cm} x{4.08114 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Marks}} \tn % Row 0 \SetRowColor{LightBackground} \textbackslash{}`\textasciicircum{} & Last position of cursos in insert mode \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} \textbackslash{}`. & Last change in current buffer \tn % Row Count 3 (+ 1) % Row 2 \SetRowColor{LightBackground} \textbackslash{}`" & Last exited current buffer \tn % Row Count 4 (+ 1) % Row 3 \SetRowColor{white} \textbackslash{}`0 & In last file edited \tn % Row Count 5 (+ 1) % Row 4 \SetRowColor{LightBackground} '' & Back to line in current buffer where jumped from \tn % Row Count 7 (+ 2) % Row 5 \SetRowColor{white} \textbackslash{}`\textbackslash{}` & Back to position in current buffer where jumped from \tn % Row Count 9 (+ 2) % Row 6 \SetRowColor{LightBackground} \textbackslash{}`{[} & To beginning of previourly changed or yankend text \tn % Row Count 11 (+ 2) % Row 7 \SetRowColor{white} \textbackslash{}`{]} & To end of previously changed or yanked text \tn % Row Count 13 (+ 2) % Row 8 \SetRowColor{LightBackground} \textbackslash{}`\textless{} & To beginning of last visual selection \tn % Row Count 15 (+ 2) % Row 9 \SetRowColor{white} \textbackslash{}`\textgreater{} & To end of last visual selection \tn % Row Count 16 (+ 1) % Row 10 \SetRowColor{LightBackground} ma & Mark this cursor position as `a` \tn % Row Count 17 (+ 1) % Row 11 \SetRowColor{white} \textbackslash{}`a & Jump to the cursos position `a` \tn % Row Count 18 (+ 1) % Row 12 \SetRowColor{LightBackground} 'a & Jump to the beginning of the line with position `a` \tn % Row Count 20 (+ 2) % Row 13 \SetRowColor{white} d'a & Delete from current line to line of mark `a` \tn % Row Count 22 (+ 2) % Row 14 \SetRowColor{LightBackground} c'a & Change text from current line to line of `a` \tn % Row Count 24 (+ 2) % Row 15 \SetRowColor{white} y\textbackslash{}`a & Yank text from current position to position of `a` \tn % Row Count 26 (+ 2) % Row 16 \SetRowColor{LightBackground} :marks & List all current marks \tn % Row Count 27 (+ 1) % Row 17 \SetRowColor{white} :delm a & Delete mark `a` \tn % Row Count 28 (+ 1) % Row 18 \SetRowColor{LightBackground} :delm a-d & Delete marks `a, b, c, d` \tn % Row Count 30 (+ 2) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{x{0.89586 cm} x{4.08114 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Marks (cont)}} \tn % Row 19 \SetRowColor{LightBackground} :delm abc & Delete marks `a, b, c` \tn % Row Count 2 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{p{0.4977 cm} x{4.4793 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Case}} \tn % Row 0 \SetRowColor{LightBackground} \textasciitilde{} & Toggle case (Case =\textgreater{} cASE) \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} gU & Uppecase \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} gu & Lowercase \tn % Row Count 3 (+ 1) % Row 3 \SetRowColor{white} gUU & Uppercase current line (also `gUgU`) \tn % Row Count 4 (+ 1) % Row 4 \SetRowColor{LightBackground} guu & Lowercase current line (also `gugu`) \tn % Row Count 5 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{Do these in visual or normal mode.} \tn \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{p{0.89586 cm} x{4.08114 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Visual Mode}} \tn % Row 0 \SetRowColor{LightBackground} v & Enter visual mode \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} V & Enter visual line mode \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} \textless{}C-V\textgreater{} & Enter visual block mode \tn % Row Count 3 (+ 1) % Row 3 \SetRowColor{white} \mymulticolumn{2}{x{5.377cm}}{\{\{colspan=2\}\}\textasciicircum{}{\bf{In visual mode}}\textasciicircum{}} \tn % Row Count 4 (+ 1) % Row 4 \SetRowColor{LightBackground} d / x & Delete selection \tn % Row Count 5 (+ 1) % Row 5 \SetRowColor{white} s & Replace selection \tn % Row Count 6 (+ 1) % Row 6 \SetRowColor{LightBackground} y & Yank selection (Copy) \tn % Row Count 7 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{See Operators for other things you can do.} \tn \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.29402 cm} x{3.68298 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Find \& Replace}} \tn % Row 0 \SetRowColor{LightBackground} \seqsplit{:\%s/foo/bar/g} & Replace {\emph{foo}} with {\emph{bar}} in whole document \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} \seqsplit{:\%s/foo/bar/gc} & Replace {\emph{foo}} with {\emph{bar}} in whole document interactively \tn % Row Count 4 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{p{0.4977 cm} x{4.4793 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Search}} \tn % Row 0 \SetRowColor{LightBackground} n & Next matching search pattern \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} N & Previous match \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} * & Next whole word under cursor \tn % Row Count 3 (+ 1) % Row 3 \SetRowColor{white} \# & Previous whole word under cursor \tn % Row Count 4 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.54287 cm} x{3.43413 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Operators Examples}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{\{\{colspan=2\}\}Combine operators with motions to use them.} \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} {\bf{d}}{\emph{d}} & `(repeat the letter)` Delete current line \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} {\bf{d}}{\emph{w}} & Delete to next word \tn % Row Count 5 (+ 1) % Row 3 \SetRowColor{white} {\bf{d}}{\emph{b}} & Delete to beginning of word \tn % Row Count 6 (+ 1) % Row 4 \SetRowColor{LightBackground} {\emph{2{\bf{}}d}}{\emph{d}} & Delete 2 lines \tn % Row Count 7 (+ 1) % Row 5 \SetRowColor{white} {\bf{d}}{\emph{ip}} & Delete a text object `(inside paragraph)` \tn % Row Count 9 (+ 2) % Row 6 \SetRowColor{LightBackground} (in visual mode) d & Delete selection \tn % Row Count 11 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{See `:help motion.txt`} \tn \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}{Diff}} \tn % Row 0 \SetRowColor{LightBackground} gvimdiff file1 file2 {[}file3{]} & See differences between files, in HMI \tn % Row Count 2 (+ 2) \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}{Diff}} \tn % Row 0 \SetRowColor{LightBackground} gvimdiff file1 file2 {[}file3{]} & See differences between files, in HMI \tn % Row Count 2 (+ 2) \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}{Tab Pages}} \tn % Row 0 \SetRowColor{LightBackground} :tabedit {[}file{]} & Edit file in a new tab \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} :tabfind {[}file{]} & Open file if exists in new tab \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} :tabclose & Close current tab \tn % Row Count 5 (+ 1) % Row 3 \SetRowColor{white} :tabs & List all tabs \tn % Row Count 6 (+ 1) % Row 4 \SetRowColor{LightBackground} :tabfirst & Go to first tab \tn % Row Count 7 (+ 1) % Row 5 \SetRowColor{white} :tablast & Go to last tab \tn % Row Count 8 (+ 1) % Row 6 \SetRowColor{LightBackground} :tabn & Go to next tab \tn % Row Count 9 (+ 1) % Row 7 \SetRowColor{white} :tabp & Go to previous tab \tn % Row Count 10 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.14471 cm} x{3.83229 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Miscellaneous}} \tn % Row 0 \SetRowColor{LightBackground} . & Repeat last command \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} {]}p & Paste under the current indentation level \tn % Row Count 3 (+ 2) % Row 2 \SetRowColor{LightBackground} :set ff=unix & Convert Windows endings to Unix line endings \tn % Row Count 5 (+ 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}{Command Line}} \tn % Row 0 \SetRowColor{LightBackground} \textless{}C-R\textgreater{}\textless{}C-W\textgreater{} & Insert current word into the command line \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} \textless{}C-R\textgreater{}" & Paste from " register \tn % Row Count 3 (+ 1) % Row 2 \SetRowColor{LightBackground} \textless{}C-X\textgreater{}\textless{}C-F\textgreater{} & Auto-completion of path in insert mode \tn % Row Count 5 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Text Alignment}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{:center {[}width{]}} \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{:right {[}width{]}} \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{:left} \tn % Row Count 3 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}-} \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{See `:help formatting`} \tn \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}{Counters}} \tn % Row 0 \SetRowColor{LightBackground} `\textless{}C-A\textgreater{}` & Incerase number \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} `\textless{}C-X\textgreater{}` & Decrement number \tn % Row Count 2 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.09494 cm} x{3.88206 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Calculator}} \tn % Row 0 \SetRowColor{LightBackground} \textless{}C-R\textgreater{}=128/2 & Shows the result of the division: `'64'` \tn % Row Count 2 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{Do this in insert mode.} \tn \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Exiting With an Error}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{:cq} \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{:cquit} \tn % Row Count 2 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}-} \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Works like `:qa`, but throws an error. Great for aborting Git commands.} \tn \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}{Spell checking}} \tn % Row 0 \SetRowColor{LightBackground} :set spell \seqsplit{spelllang=en\_us} & Turn on US English spell checking \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} {]}s & Move to next misspelled word after the cursor \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} {[}s & Move to previous misspelled word before the cursor \tn % Row Count 7 (+ 3) % Row 3 \SetRowColor{white} z= & Suggest spellings for the word under/after the cursor \tn % Row Count 10 (+ 3) % Row 4 \SetRowColor{LightBackground} zg & Add word to spell list \tn % Row Count 11 (+ 1) % Row 5 \SetRowColor{white} zw & Mark word as bad/misspelling \tn % Row Count 13 (+ 2) % Row 6 \SetRowColor{LightBackground} zu / C-X (Insert Mode) & Suggest words for bad word under cursor from spellfile \tn % Row Count 16 (+ 3) \hhline{>{\arrayrulecolor{DarkBackground}}--} \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{See `:help spell`} \tn \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} % That's all folks \end{multicols*} \end{document}