2
0
Fork 0
mirror of https://github.com/MartinThoma/LaTeX-examples.git synced 2025-04-25 22:38:04 +02:00
LaTeX-examples/cheat-sheets/vim/vim.tex
2013-04-16 18:00:50 +02:00

62 lines
1.7 KiB
TeX

\documentclass[a4paper,10pt,landscape]{article}
\usepackage{myStyle}
\begin{document}
\raggedright
\footnotesize
\begin{multicols}{3}
% multicol parameters
% These lengths are set only within the two main columns
%\setlength{\columnseprule}{0.25pt}
\setlength{\premulticols}{1pt}
\setlength{\postmulticols}{1pt}
\setlength{\multicolsep}{1pt}
\setlength{\columnsep}{2pt}
\begin{center}
\Large{\textbf{Vim}} \\
\end{center}
\section{Basic commands}
\begin{tabular}{@{}ll@{}}
\verb!:w [file]! & Write to \textit{file} \\
\verb!:x! & Exit, saving changes \\
\verb!:q! & Exit as long as there have been no changes \\
\verb!:q!! & Exit and ignore any changes \\
\verb!:wq! & Save file and exit
\end{tabular}
\section{Inserting Text}
\begin{tabular}{@{}ll@{}}
\keys{i} & Insert before cursor \\
\keys{I} & Insert before line \\
\keys{r} & Replace one character \\
\keys{R} & Enter insert mode, but replace \\
\end{tabular}
\section{Motion}
\begin{tabular}{@{}ll@{}}
\keys{h} & Move left \\
\keys{j} & Move down \\
\keys{k} & Move up \\
\keys{l} & Move right \\
\keys{w} & Move to next word \\
\keys{W} & Move to next blank delimited word \\
\keys{e} & Move to the end of the word \\
\end{tabular}
\section{Cut and paste}
\begin{enumerate}
\item Position the cursor where you want to begin cutting
\item Press \keys{v} (or \keys{V} if you want to cut whole lines)
\item Move the cursor to the end of what you want to cut
\item Press \keys{d}
\item Move to where you would like to paste
\item Press \keys{p} to paste after the cursor, or \keys{P} to paste before
\end{enumerate}
\end{multicols}
\end{document}