Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download

📚 The CoCalc Library - books, templates and other resources

132928 views
License: OTHER
1
\documentclass[a4paper,10pt,landscape]{article}
2
\usepackage{myStyle}
3
4
\begin{document}
5
6
\raggedright
7
\footnotesize
8
\begin{multicols}{3}
9
10
11
% multicol parameters
12
% These lengths are set only within the two main columns
13
%\setlength{\columnseprule}{0.25pt}
14
\setlength{\premulticols}{1pt}
15
\setlength{\postmulticols}{1pt}
16
\setlength{\multicolsep}{1pt}
17
\setlength{\columnsep}{2pt}
18
19
\begin{center}
20
\Large{\textbf{Vim}} \\
21
\end{center}
22
23
\section{Basic commands}
24
\begin{tabular}{@{}ll@{}}
25
\verb!:w [file]! & Write to \textit{file} \\
26
\verb!:x! & Exit, saving changes \\
27
\verb!:q! & Exit as long as there have been no changes \\
28
\verb!:q!! & Exit and ignore any changes \\
29
\verb!:wq! & Save file and exit
30
\end{tabular}
31
32
\section{Inserting Text}
33
\begin{tabular}{@{}ll@{}}
34
\keys{i} & Insert before cursor \\
35
\keys{I} & Insert before line \\
36
\keys{r} & Replace one character \\
37
\keys{R} & Enter insert mode, but replace \\
38
\end{tabular}
39
40
\section{Motion}
41
\begin{tabular}{@{}ll@{}}
42
\keys{h} & Move left \\
43
\keys{j} & Move down \\
44
\keys{k} & Move up \\
45
\keys{l} & Move right \\
46
\keys{w} & Move to next word \\
47
\keys{W} & Move to next blank delimited word \\
48
\keys{e} & Move to the end of the word \\
49
\end{tabular}
50
51
\section{Cut/Copy and paste}
52
\begin{enumerate}
53
\item Position the cursor where you want to begin cutting or copying
54
\item Press \keys{v} (or \keys{V} if you want to cut whole lines)
55
\item Move the cursor to the end of what you want to cut or copy
56
\item Press \keys{d} or Press \keys{y}
57
\item Move to where you would like to paste
58
\item Press \keys{p} to paste after the cursor, or \keys{P} to paste before
59
\end{enumerate}
60
\section{Undo and Repeat}
61
\begin{enumerate}
62
\item Enter the command mode
63
\item Press \keys{u} for "undo"
64
\subsection{Redo}
65
\item Best way is to enter "redo" in last line mode
66
\item Another way is to Press \keys{Ctrl}+\keys{r}
67
\end{enumerate}
68
69
\end{multicols}
70
\end{document}
71
72