2
0
Fork 0
mirror of https://github.com/MartinThoma/LaTeX-examples.git synced 2025-04-19 11:38:05 +02:00
LaTeX-examples/cheat-sheets/vim/vim.tex

71 lines
2 KiB
TeX
Raw Permalink Normal View History

2013-04-15 08:13:38 +02:00
\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 \\
2013-04-16 18:00:50 +02:00
\keys{r} & Replace one character \\
\keys{R} & Enter insert mode, but replace \\
2013-04-15 08:13:38 +02:00
\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}
2014-08-15 01:52:06 +05:30
\section{Cut/Copy and paste}
2013-04-15 08:51:00 +02:00
\begin{enumerate}
2014-08-15 01:52:06 +05:30
\item Position the cursor where you want to begin cutting or copying
2013-04-15 08:51:00 +02:00
\item Press \keys{v} (or \keys{V} if you want to cut whole lines)
2014-08-15 01:52:06 +05:30
\item Move the cursor to the end of what you want to cut or copy
\item Press \keys{d} or Press \keys{y}
2013-04-15 08:51:00 +02:00
\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}
2014-08-15 01:52:06 +05:30
\section{Undo and Repeat}
\begin{enumerate}
\item Enter the command mode
\item Press \keys{u} for "undo"
\subsection{Redo}
\item Best way is to enter "redo" in last line mode
\item Another way is to Press \keys{Ctrl}+\keys{r}
\end{enumerate}
2013-04-15 08:13:38 +02:00
\end{multicols}
\end{document}