vim.tex 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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 and paste}
  43. \begin{enumerate}
  44. \item Position the cursor where you want to begin cutting
  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
  47. \item Press \keys{d}
  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. \end{multicols}
  52. \end{document}