Humor: Cargo Cult Programming

Kevin D. Clark kclark at CetaceanNetworks.com
Thu Nov 14 17:14:40 EST 2002


This message isn't intended to start an emacs vs. vi flamewar --
really, I'm just looking to understand how other people using
different editors handle these situations.




Emacs has a scheme for handling compilation of programs.  I can type
(something like) M-x compile and the compilation will be run under
my Emacs process.  If there's a compilation error, I can type a few
keystrokes and Emacs will bring me to the exact source file and line
number where the compilation failed (even if the file wasn't
previously loaded into Emacs).

Out of curiosity, does VIM do anything like this?





Emacs has a general scheme for auto-completing keywords.  Let's say
that I have three files loaded into Emacs, two locally and one
remotely (via a ssh connection, for example).  Let's say that the file
on the remote machine happens to contain the word
"supercalifragilisticexpeialidocious".  Let's say that I am currently
editing one of the local files.  By pressing a tiny few keys, I've got
my emacs setup so I can just type "sup M-/" and
"supercalifragilisticexpeialidocious" will magically appear (because
it is a potential completion).

Out of curiosity, does VIM do anything like this?






My Emacs setup is integrated with my source control system -- I can
check in and check out files without leaving my editor, as well as
checkin files in bulk.

Out of curiosity, does VIM do anything like this?






Let's say that I have the following LaTeX code:
(note:  the #'s here are complete garbage)


\begin{table}
\begin{center}
\begin{tabular}{|l|l|r|r|} \hline
Matrix Size & & System1 & System2 \\ \hline
512x512 \\ \hline
 & Serial & 7.195 & 6.210 \\ \hline
 & 2 nodes & 5.622 (5.639*)& 3.300 \\ \hline
 & 4 nodes & 8.481* & 3.930 \\ \hline
 & 8 nodes & 15.399* & 2.34 \\ \hline
 & 16 nodes & 44.017* & 0.77 \\ \hline
 1024x1024 \\ \hline
 & Serial & 62.466 & 65.620 \\ \hline
 & 2 nodes & 40.017* & 33.450 \\ \hline
 & 4 nodes & 22.202* & 17.430 \\ \hline
 & 8 nodes & 10.788* & 9.550 \\ \hline
 & 16 nodes & 84.652## & 5.360 \\ \hline
\end{tabular}
\caption{Foo Timings}
\label{foo_tab}
\end{center}
\end{table}


Suppose I decide that this looks horrible, and I want to clean this
up.  In Emacs I can type a few keys and transmorgify things thusly:

\begin{table}
\begin{center}
\begin{tabular}{|l|l|r|r|} \hline
Matrix Size & & System1 & System2 \\ \hline
512x512 \\ \hline
 & Serial   & 7.195          & 6.210  \\ \hline
 & 2 nodes  & 5.622 (5.639*) & 3.300  \\ \hline
 & 4 nodes  & 8.481*         & 3.930  \\ \hline
 & 8 nodes  & 15.399*        & 2.34   \\ \hline
 & 16 nodes & 44.017*        & 0.77   \\ \hline
 1024x1024 \\ \hline
 & Serial   & 62.466         & 65.620 \\ \hline
 & 2 nodes  & 40.017*        & 33.450 \\ \hline
 & 4 nodes  & 22.202*        & 17.430 \\ \hline
 & 8 nodes  & 10.788*        & 9.550  \\ \hline
 & 16 nodes & 84.652##       & 5.360  \\ \hline
\end{tabular}
\caption{Foo Timings}
\label{foo_tab}
\end{center}
\end{table}

Out of curiosity, does VIM do anything like this?




Suppose I have cut and pasted 5 paragraphs from somewhere else, and
all of the lines are >80 characters in length.  I can easily instruct
Emacs to just "fill" these paragraphs and wrap all of the lines
properly.

Out of curiosity, does VIM do anything like this?




Again, I am just looking to learn how other people handle 
these tasks -- thanks!

--kevin
-- 
Kevin D. Clark / Cetacean Networks / Portsmouth, N.H. (USA)
cetaceannetworks.com!kclark (GnuPG ID: B280F24E)
alumni.unh.edu!kdc




More information about the gnhlug-discuss mailing list