Humor: Cargo Cult Programming
Bob Bell
bobbell at zk3.dec.com
Fri Nov 15 17:08:46 EST 2002
On Fri, Nov 15, 2002 at 04:57:44PM -0500, Steven Knight <steven.knight at unh.edu> wrote:
> > 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?
>
> Yeah, if I do:
>
> :e mai<tab> will do the completion.
Actually, I think he means editing the buffer text. This can be
done with ^N ("next", starts looking below) and ^P ("previous", start
looking above). Both can be repeated until the desired match is found.
When editing a C file, this will also search the #include-d headers.
> > 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:
<snip>
> > Out of curiosity, does VIM do anything like this?
I'm not sure I even understand what is being asked (I missed the
original email).
> > 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?
>
> I'm not sure how to do these two things.
I don't what "fill" means, but yes, you can re-wrap lines in vim.
'gq' reformats the selected text.
--
Bob Bell <bobbell at zk3.dec.com>
-------------------------------------------------------------------------
"Linux represents a best-of-breed Unix, that is trusted in mission
critical applications, and -- due to it's open source code -- has
a long term credibility which exceeds many other competitive OS's."
-- Microsoft "Halloween" Document
More information about the gnhlug-discuss
mailing list