\documentclass[12pt]{article}
\usepackage{vmargin}

\setpapersize{USletter}
\setmarginsrb{0.5in}{0.50in}{0.50in}{0.50in}{0pt}{0in}{0pt}{0in}
\setlength{\parindent}{0mm}

\pagestyle{empty}

\begin{document}

\begin{center}
{\Large Useful vi--commands}\\[5mm]

\begin{tabular}{l|l}\hline\hline %\vspace{-0.1in}
vi command & what it does \\ \hline
%%
\verb+!}fmt+\framebox{Enter} & format to end of paragraph \\ 
\verb+/<string>+\framebox{Enter} & seach for next occurance of 
\verb+<string>+ \\
\verb+!/\\+\framebox{Enter}\verb+fmt+ \framebox{Enter}& format to 
next occurance of $\backslash$ \\ 
\verb+qa+\framebox{macro to record}\verb+q+ & record macro `a'\\ 
\verb+@a+ & play macro `a'\\ 
\verb+i+ & enter insert mode at cursor position\\ 
\verb+I+ & enter insert mode at beginning of line\\ 
\verb+.+ & repeat last command\\ 
\verb+999.+ & repeat last command 999 times\\ 
\verb+a+ (\verb+A+) & enter append mode at cursor position (end of line)\\ 
\verb+o+ (\verb+O+) & enter insert mode in new line below (above) current\\ 
\framebox{Esc} & enter command mode \\ 
\framebox{Ctrl}-\verb+G+ & display information about the file\\ 
\verb+$+ (\verb+0+) & go to end (beginning) of line\\ 
\verb+e+ & go to end of word\\ 
\verb+h, j, k, l+ & move one character left, down, up, right\\ 
\verb+rx+ & replace character under cursor with x\\ 
\verb+R+ & enter overwrite mode (until \framebox{Esc})\\ 
\verb+~+ & change case of character under cursor \\ 
\verb+w+ (\verb+b+) & move to beginning of next (previous) word\\ 
\verb+W+ (\verb+B+) & move to beginning of next (previous) ``real'' word\\ 
\verb+(+ [\verb+)+] & move to beginning [end] of sentence\\ 
\verb+x+ & delete character under cursor\\ 
\verb+dw+ & delete current word\\ 
\verb+cw+ & change current word, {\em i.e.}, delete word and enter 
insert mode\\ 
\verb+d$, D+ & delete to end of line\\ 
\verb+d0+ & delete to beginning of line\\ 
\verb+ma+ & set mark 'a' at current cursor position\\ 
\verb+'a+ & jump to mark 'a' set previously\\ 
\verb+y'a+ & yank everything from current cursor position to mark 'a'\\ 
\verb+J+ & join current line with next one\\ 
\verb+d999G+ & delete to line 999\\ 
\verb+dG+ & delete to end of document\\ 
\verb+:sp <filename>+ & split screen for 2nd text file\\ 
\verb+^w+ plus \framebox{$\uparrow$} or \framebox{$\downarrow$} & navigate
between split sceens \\
\verb+y}+ & yank one paragraph \\
\verb|:g/@[a-z]\+/\\cite/g| & globally replace \verb|@<string>| 
with \verb|\cite| \\
\verb|:g/|\framebox{Ctrl}-V\framebox{Ctrl}-M\verb|/s///g| & globally remove
\framebox{Ctrl}-M character (from DOS files)\\
\verb+ZZ, :x, :wq+ & save file and exit\\ 
\verb+:r <filename>+ & read-in \verb+<filename>+ below cursor position\\ 
\verb+:w+ & save file\\ 
\verb+:q+ & exit without saving\\ 
 & \\ \hline\hline
%%
\end{tabular}
\end{center}

\end{document}
