vim.tex 2.0 KB

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