\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{mutanclan (mutanclan)} \pdfinfo{ /Title (vim.pdf) /Creator (Cheatography) /Author (mutanclan (mutanclan)) /Subject (vim 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}{4DA333} \definecolor{LightBackground}{HTML}{F3F9F2} \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{vim Cheat Sheet}}}} \\ \normalsize{by \textcolor{DarkBackground}{mutanclan (mutanclan)} via \textcolor{DarkBackground}{\uline{cheatography.com/79625/cs/19288/}}} \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}mutanclan (mutanclan) \\ \uline{cheatography.com/mutanclan} \\ \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Cheat Sheet}} \\ \vspace{-2pt}Published 6th April, 2019.\\ Updated 9th April, 2019.\\ 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{0.9954 cm} x{3.9816 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Up-Down motions}} \tn % Row 0 \SetRowColor{LightBackground} k & {\emph{count}} lines upward \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} j & {\emph{count}} lines downward \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} gk & {\emph{count}} display lines upward \tn % Row Count 3 (+ 1) % Row 3 \SetRowColor{white} gj & {\emph{count}} display lines downward \tn % Row Count 4 (+ 1) % Row 4 \SetRowColor{LightBackground} - & {\emph{count}} lines upward on the firest non-blank char \tn % Row Count 6 (+ 2) % Row 5 \SetRowColor{white} + & {\emph{count}} lines downward on the first non-blank char \tn % Row Count 8 (+ 2) % Row 6 \SetRowColor{LightBackground} \_ & {\emph{count - 1}} lines downward on the first non-blank char \tn % Row Count 10 (+ 2) % Row 7 \SetRowColor{white} G & goto line {\emph{count}}, default last line \tn % Row Count 12 (+ 2) % Row 8 \SetRowColor{LightBackground} gg & goto line {\emph{count}}, default first line \tn % Row Count 14 (+ 2) % Row 9 \SetRowColor{white} :{\emph{{[}range{]}}} & set cursor on last line number in {\emph{range}} \tn % Row Count 16 (+ 2) % Row 10 \SetRowColor{LightBackground} {\emph{\{count\}}}\% & go to {\emph{count}} percentage in file \tn % Row Count 18 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{p{0.74655 cm} x{4.23045 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Left-right motions}} \tn % Row 0 \SetRowColor{LightBackground} h & {\emph{count}} chars to the left \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} l & {\emph{count}} chars to the right \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} 0 & to the first char of the line \tn % Row Count 3 (+ 1) % Row 3 \SetRowColor{white} \textasciicircum{} & to the first non-blank char of the line \tn % Row Count 5 (+ 2) % Row 4 \SetRowColor{LightBackground} \$ & to the end of the line \tn % Row Count 6 (+ 1) % Row 5 \SetRowColor{white} g\_ & to the last non-blank char of the line and {\emph{count - 1}} lines downward \tn % Row Count 9 (+ 3) % Row 6 \SetRowColor{LightBackground} g0 & wrap: to the first char of the screen line \tn % Row Count 11 (+ 2) % Row 7 \SetRowColor{white} g\textasciicircum{} & rwap: to the first non-blank char of the screen line \tn % Row Count 13 (+ 2) % Row 8 \SetRowColor{LightBackground} gm & like g0, but half a screenwidth to the right \tn % Row Count 15 (+ 2) % Row 9 \SetRowColor{white} g\$ & wrap: to the last char of the screen line \tn % Row Count 17 (+ 2) % Row 10 \SetRowColor{LightBackground} | & to screen column {\emph{count}} in current line \tn % Row Count 19 (+ 2) % Row 11 \SetRowColor{white} f{\emph{char}} & to {\emph{count}} occurence of {\emph{char}} to the right \tn % Row Count 21 (+ 2) % Row 12 \SetRowColor{LightBackground} F{\emph{char}} & to {\emph{count}} occurence of {\emph{char}} to the left \tn % Row Count 23 (+ 2) % Row 13 \SetRowColor{white} t{\emph{char}} & till before {\emph{count}} occurence of {\emph{char}} to the right \tn % Row Count 25 (+ 2) % Row 14 \SetRowColor{LightBackground} T{\emph{char}} & till after {\emph{count}} occurence of {\emph{char}} to the left \tn % Row Count 27 (+ 2) % Row 15 \SetRowColor{white} ; & repeat latest f, t, F, T {\emph{count}} times \tn % Row Count 29 (+ 2) % Row 16 \SetRowColor{LightBackground} , & repeat latest f, t, F, T {\emph{count}} times in opposite direction \tn % Row Count 31 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{p{0.69678 cm} x{4.28022 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Scrolling}} \tn % Row 0 \SetRowColor{LightBackground} \seqsplit{CTRL-U} & scroll down half a screen of text \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} \seqsplit{CTRL-D} & scroll up half a screen of text \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} \seqsplit{CTRL-E} & scroll one line up \tn % Row Count 6 (+ 2) % Row 3 \SetRowColor{white} \seqsplit{CTRL-Y} & scroll one line down \tn % Row Count 8 (+ 2) % Row 4 \SetRowColor{LightBackground} \seqsplit{CTRL-F} & scroll forward a whole screen \tn % Row Count 10 (+ 2) % Row 5 \SetRowColor{white} \seqsplit{CTRL-B} & scroll backward a whole screen \tn % Row Count 12 (+ 2) % Row 6 \SetRowColor{LightBackground} zz & scroll to see the context of the line \tn % Row Count 14 (+ 2) % Row 7 \SetRowColor{white} zt & put the cursor line at the top \tn % Row Count 15 (+ 1) % Row 8 \SetRowColor{LightBackground} zb & put the cursor line at the bottom \tn % Row Count 16 (+ 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}{Word motions}} \tn % Row 0 \SetRowColor{LightBackground} w & move forward {\emph{count}} words \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} W & move forward {\emph{count}} WORDS \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} b & move backward {\emph{count}} words \tn % Row Count 3 (+ 1) % Row 3 \SetRowColor{white} B & move backward {\emph{count}} WORDs \tn % Row Count 4 (+ 1) % Row 4 \SetRowColor{LightBackground} e & move to the next end of a word \tn % Row Count 5 (+ 1) % Row 5 \SetRowColor{white} E & move to next end of a WORD \tn % Row Count 6 (+ 1) % Row 6 \SetRowColor{LightBackground} ge & move to the previous end of a word \tn % Row Count 7 (+ 1) % Row 7 \SetRowColor{white} gE & move to the previous end of a WORD \tn % Row Count 8 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{a WORD is white-space separated word.} \tn \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{p{0.74655 cm} x{4.23045 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Operators and motions}} \tn % Row 0 \SetRowColor{LightBackground} dd & delete whole line \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} x or dl & delete char under the cursor \tn % Row Count 3 (+ 2) % Row 2 \SetRowColor{LightBackground} X or dh & delete char left of the cursor \tn % Row Count 5 (+ 2) % Row 3 \SetRowColor{white} D or d\$ & delete to the end of the line \tn % Row Count 7 (+ 2) % Row 4 \SetRowColor{LightBackground} C or c\$ & chage to the end of the line \tn % Row Count 9 (+ 2) % Row 5 \SetRowColor{white} s or cl & change one char \tn % Row Count 11 (+ 2) % Row 6 \SetRowColor{LightBackground} S or cc & change whole line excluding indentation \tn % Row Count 13 (+ 2) % Row 7 \SetRowColor{white} r & command to replace char under cursor \tn % Row Count 15 (+ 2) % Row 8 \SetRowColor{LightBackground} . & repeat last change \tn % Row Count 16 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.74195 cm} x{3.23505 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Windows and Panes}} \tn % Row 0 \SetRowColor{LightBackground} \{\{nobreak\}\}CTRL-W + & increase current window height by N \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} \{\{nobreak\}\}CTRL-W - & decrease current window height by N \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} \{\{nobreak\}\}CTRL-W = & evensize all windows \tn % Row Count 6 (+ 2) % Row 3 \SetRowColor{white} \{\{nobreak\}\}CTRL-W \textless{} & decrease current window width by N \tn % Row Count 8 (+ 2) % Row 4 \SetRowColor{LightBackground} \{\{nobreak\}\}CTRL-W \textgreater{} & increase current window width by N \tn % Row Count 10 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.89126 cm} x{3.08574 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Jumps}} \tn % Row 0 \SetRowColor{LightBackground} CTRL-O & Go to {[}count{]} Older cursor position in jump list \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} CTRL-I & go to {[}count{]} newer cursor position in jump list \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} :ju{[}mps{]} & print the jump list \tn % Row Count 5 (+ 1) % Row 3 \SetRowColor{white} \{\{nobreak\}\} :cle{[}arjumps{]} & clear the jump list of the current window \tn % Row Count 7 (+ 2) % Row 4 \SetRowColor{LightBackground} g; & go to {\emph{count}} older position in {\bf{change}} list \tn % Row Count 9 (+ 2) % Row 5 \SetRowColor{white} g, & go to {\emph{count}} newer position in {\bf{change}} list \tn % Row Count 11 (+ 2) % Row 6 \SetRowColor{LightBackground} :changes & print the change list \tn % Row Count 12 (+ 1) % Row 7 \SetRowColor{white} \% & find the next {\bf{item}} in this line and jump to its match \tn % Row Count 15 (+ 3) % Row 8 \SetRowColor{LightBackground} {[}( & go to {\emph{count}} previous unmatched {\bf{(}} \tn % Row Count 17 (+ 2) % Row 9 \SetRowColor{white} {]}) & go to {\emph{count}} next unmatched {\bf{)}} \tn % Row Count 19 (+ 2) % Row 10 \SetRowColor{LightBackground} {[}\{ & go to {\bf{count}} previous unmatched {\bf{\{}} \tn % Row Count 21 (+ 2) % Row 11 \SetRowColor{white} {]}\} & go to {\bf{count}} next unmatched {\bf{\}}} \tn % Row Count 23 (+ 2) % Row 12 \SetRowColor{LightBackground} {]}m & go to {\bf{count}} next start of a method \tn % Row Count 25 (+ 2) % Row 13 \SetRowColor{white} {]}M & go to {\bf{count}} next end of a Method \tn % Row Count 27 (+ 2) % Row 14 \SetRowColor{LightBackground} {[}m & go to {\bf{count}} previous start of a methdo \tn % Row Count 29 (+ 2) % Row 15 \SetRowColor{white} {[}M & go to {\bf{count}} previous end of a method \tn % Row Count 31 (+ 2) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{x{1.89126 cm} x{3.08574 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Jumps (cont)}} \tn % Row 16 \SetRowColor{LightBackground} H & move to first visible line \tn % Row Count 2 (+ 2) % Row 17 \SetRowColor{white} M & move to middle visible line \tn % Row Count 4 (+ 2) % Row 18 \SetRowColor{LightBackground} L & move to last visible line \tn % Row Count 6 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{The following commands are "jump" commands: "'", "`", "G", "/", "?", "n", "N", "\%", "(", ")", "{[}{[}", "{]}{]}", "\{", "\}", ":s", ":tag", "L", "M", "H" and the commands that start editing a new file.} \tn \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{2.4885 cm} x{2.4885 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Using marks}} \tn % Row 0 \SetRowColor{LightBackground} \textbackslash{}`\textbackslash{}` {\bf{or}} '' & to the position of the latest jump \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} CTRL-O & jump to older position \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} CTRL-I & jump back to newer position \tn % Row Count 6 (+ 2) % Row 3 \SetRowColor{white} :jumps & Give list of positions of jumps \tn % Row Count 8 (+ 2) % Row 4 \SetRowColor{LightBackground} m{\emph{char}} & mark the place under cursor with mark {\emph{char}} \tn % Row Count 11 (+ 3) % Row 5 \SetRowColor{white} \{\{nobreak\}\} `{\emph{\{a-z\}}} {\bf{or}} '{\emph{\{a-z\}}} & move to the mark {\emph{char}} in current buffer \tn % Row Count 14 (+ 3) % Row 6 \SetRowColor{LightBackground} \{\{nobreak\}\} `{\emph{\{A-Z0-9\}}} {\bf{or}} '{\emph{\{A-Z0-9\}}} & move to the mark {\emph{char}} in other file \tn % Row Count 17 (+ 3) % Row 7 \SetRowColor{white} \textbackslash{}`{\emph{char}} & move to the mark {\emph{char}} \tn % Row Count 19 (+ 2) % Row 8 \SetRowColor{LightBackground} '{\emph{char}} & move to first non-blank char of line with mark {\emph{char}} \tn % Row Count 22 (+ 3) % Row 9 \SetRowColor{white} :marks & get a list of marks \tn % Row Count 23 (+ 1) % Row 10 \SetRowColor{LightBackground} " & cursor position when last editing the file \tn % Row Count 26 (+ 3) % Row 11 \SetRowColor{white} {[} & start of the last change \tn % Row Count 28 (+ 2) % Row 12 \SetRowColor{LightBackground} {]} & end of the last change \tn % Row Count 30 (+ 2) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{x{2.4885 cm} x{2.4885 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Using marks (cont)}} \tn % Row 13 \SetRowColor{LightBackground} :delm{[}arks{]} {\emph{\{marks\}}} & Delete the specified {\emph{marks}} \tn % Row Count 2 (+ 2) % Row 14 \SetRowColor{white} :delm! & Delete all marks for current buffer \tn % Row Count 4 (+ 2) % Row 15 \SetRowColor{LightBackground} '" {\bf{or}} \textbackslash{}`" & to the position when last exiting the current buffer \tn % Row Count 7 (+ 3) % Row 16 \SetRowColor{white} '\textasciicircum{} {\bf{or}} \textbackslash{}`\textasciicircum{} & to the position where the cursor was the last time when Insert mode was stopped \tn % Row Count 11 (+ 4) % Row 17 \SetRowColor{LightBackground} \textbackslash{}`. {\bf{or}} '. & to the position of the last change \tn % Row Count 13 (+ 2) % Row 18 \SetRowColor{white} '( {\bf{or}} \textbackslash{}`( & to the start of the current sentence \tn % Row Count 15 (+ 2) % Row 19 \SetRowColor{LightBackground} ') {\bf{or}} \textbackslash{}`) & to the end of the current sentence \tn % Row Count 17 (+ 2) % Row 20 \SetRowColor{white} '\{ {\bf{or}} \textbackslash{}`\{ & to the start of the current paragraph \tn % Row Count 19 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{When making jumps to positions further than within the same line, vim remembers the position before the jump and sets a mark.} \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}{Search mode}} \tn % Row 0 \SetRowColor{LightBackground} / & activate forward search mode \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} ? & activate backward search mode \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} n & continue search forward \tn % Row Count 5 (+ 1) % Row 3 \SetRowColor{white} N & continue search backward \tn % Row Count 6 (+ 1) % Row 4 \SetRowColor{LightBackground} \textless{}UP\textgreater{} & Search through history upwards \tn % Row Count 8 (+ 2) % Row 5 \SetRowColor{white} \{\{nobreak\}\} \textless{}DOWN\textgreater{} & Search through history downwards \tn % Row Count 10 (+ 2) % Row 6 \SetRowColor{LightBackground} * & search {\emph{count}} words under cursor forward \tn % Row Count 12 (+ 2) % Row 7 \SetRowColor{white} \# & search {\emph{count}} word under cursor backward \tn % Row Count 14 (+ 2) % Row 8 \SetRowColor{LightBackground} \textbackslash{}\textgreater{} & match the end of a word \tn % Row Count 15 (+ 1) % Row 9 \SetRowColor{white} \textbackslash{}\textless{} & match the beginning of a word \tn % Row Count 17 (+ 2) \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}{Visual mode}} \tn % Row 0 \SetRowColor{LightBackground} v & start visual mode \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} V & visual mode on whole lines \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} \seqsplit{CTRL-V} & visual block mode \tn % Row Count 4 (+ 2) % Row 3 \SetRowColor{white} o & move to the other end of selection \tn % Row Count 5 (+ 1) % Row 4 \SetRowColor{LightBackground} O & in block mode: move to the other corner of the same line \tn % Row Count 7 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.89126 cm} x{3.08574 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Operators}} \tn % Row 0 \SetRowColor{LightBackground} c & change \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} d & delete \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} y & yank into register \tn % Row Count 3 (+ 1) % Row 3 \SetRowColor{white} \textasciitilde{} & swap case under cursor \tn % Row Count 4 (+ 1) % Row 4 \SetRowColor{LightBackground} \{\{nobreak\}\} g\textasciitilde{}{\emph{{[}motion{]}}} & swap case within {\emph{motion}} \tn % Row Count 6 (+ 2) % Row 5 \SetRowColor{white} \{\{nobreak\}\} gu{\emph{{[}motion{]}}} & make lowercase within {\emph{motion}} \tn % Row Count 8 (+ 2) % Row 6 \SetRowColor{LightBackground} \{\{nobreak\}\} gU{\emph{{[}motion{]}}} & make uppercase within {\emph{motion}} \tn % Row Count 10 (+ 2) % Row 7 \SetRowColor{white} ! & filter through external program \tn % Row Count 12 (+ 2) % Row 8 \SetRowColor{LightBackground} g? & ROT-13 encoding \tn % Row Count 13 (+ 1) % Row 9 \SetRowColor{white} \textgreater{} & shift right \tn % Row Count 14 (+ 1) % Row 10 \SetRowColor{LightBackground} \textless{} & shift left \tn % Row Count 15 (+ 1) % Row 11 \SetRowColor{white} zf & define a fold \tn % Row Count 16 (+ 1) % Row 12 \SetRowColor{LightBackground} g@ & call function set with the 'operatorfunc' option \tn % Row Count 18 (+ 2) \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}{Moving text}} \tn % Row 0 \SetRowColor{LightBackground} p & paste back last deleted text \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} P & past back last deleted text before the cursor \tn % Row Count 3 (+ 2) % Row 2 \SetRowColor{LightBackground} {\emph{number}}p & like p but {\emph{number}} times \tn % Row Count 5 (+ 2) % Row 3 \SetRowColor{white} {\emph{number}}P & like P but {\emph{number}} times \tn % Row Count 7 (+ 2) % Row 4 \SetRowColor{LightBackground} xp & swap the next char with the char under cursor \tn % Row Count 9 (+ 2) % Row 5 \SetRowColor{white} y & yank char under cursor \tn % Row Count 10 (+ 1) % Row 6 \SetRowColor{LightBackground} yw & yank word \tn % Row Count 11 (+ 1) % Row 7 \SetRowColor{white} Y or yy & yank whole line \tn % Row Count 12 (+ 1) % Row 8 \SetRowColor{LightBackground} *yy & yank whole line to clipboard \tn % Row Count 13 (+ 1) % Row 9 \SetRowColor{white} *p & put text from the clipboard back \tn % Row Count 14 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{2.28942 cm} x{2.68758 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Text object selection}} \tn % Row 0 \SetRowColor{LightBackground} aw & a word \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} iw & inner word \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} aW & a WORD \tn % Row Count 3 (+ 1) % Row 3 \SetRowColor{white} as & a sentence includes white space after the sentence \tn % Row Count 6 (+ 3) % Row 4 \SetRowColor{LightBackground} ap & a paragraph \tn % Row Count 7 (+ 1) % Row 5 \SetRowColor{white} a{]} {\bf{or}} a{[} & a {[}{]} block \tn % Row Count 8 (+ 1) % Row 6 \SetRowColor{LightBackground} \{\{nobreak\}\} a) {\bf{or}} a( {\bf{or}} ab & a () block \tn % Row Count 10 (+ 2) % Row 7 \SetRowColor{white} a\textless{} {\bf{or}} a\textgreater{} & a \textless{}\textgreater{} block \tn % Row Count 11 (+ 1) % Row 8 \SetRowColor{LightBackground} at & a tag block \tn % Row Count 12 (+ 1) % Row 9 \SetRowColor{white} \{\{nobreak\}\} a\} {\bf{or}} a\{ {\bf{or}} aB & a \{\} block \tn % Row Count 14 (+ 2) % Row 10 \SetRowColor{LightBackground} \{\{nobreak\}\} a" {\bf{or}} a' {\bf{or}} a` & a quoted string \tn % Row Count 16 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{a blocks may be inner blocks with {\bf{i}} instead of {\bf{a}}. \newline These commands can only be used while in {\bf{Visual mode}} or after an {\bf{operator}}} \tn \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}{Text object motions}} \tn % Row 0 \SetRowColor{LightBackground} ( & {\emph{count}} sentences backward \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} ) & {\emph{count}} sentences forward \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} \{ & {\emph{count}} paragraphs backward \tn % Row Count 3 (+ 1) % Row 3 \SetRowColor{white} \} & {\emph{count}} paragraphs forward \tn % Row Count 4 (+ 1) % Row 4 \SetRowColor{LightBackground} {]}{]} & {\emph{count}} sections forward or to the next {\bf{\{}} in the first column \tn % Row Count 6 (+ 2) % Row 5 \SetRowColor{white} {[}{[} & {\emph{count}} sections backward or to the previous {\bf{\{}} in the first column \tn % Row Count 8 (+ 2) % Row 6 \SetRowColor{LightBackground} {]}{[} & {\emph{count}} sections forward or to the next {\bf{\{}} in the first column \tn % Row Count 10 (+ 2) % Row 7 \SetRowColor{white} {[}{]} & {\emph{count}} sections backward or to the previous {\bf{\}}} in the first column \tn % Row Count 12 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} % That's all folks \end{multicols*} \end{document}