Tuesday, September 1, 2009

Re: Suggest a vim task for a college workshop

On 25/08/09 19:08, Erik Falor wrote:
> On Tue, Aug 25, 2009 at 09:25:51AM -0700, Ben Fritz wrote:
>> 1. Vim is a very powerful tool with plenty of advantages over other
>> tools.
>> 2. Vim is complex, but there are ways to learn how to use it
>> effectively.
>
> Most of my colleagues who use Vim at work do not use it to its full
> potential. For instance, I haven't encountered a single one who was
> aware of text objects. Most folks are content to learn only 10% of
> Vim's unique functionality. I suspect that's true for most people who
> use any software. But it's especially sad in the case of Vim since
> they really are missing out on a lot.
>
> I believe that any approach that emphasizes using Vim's help system
> will do them the greatest service in the long-term. And if you teach
> them to effectively search and navigate the help system, it should
> also have the effect of getting them hooked. You'll be showing them
> that:
> 1) Vim isn't really *that* hard because it comes with so much good
> documentation.
> 2) Vim has an overwhelming number of features, but I can learn
> about them at my own pace because I know where to look for
> help.
> 3) Vim's normal-mode and ex-mode commands all adhere to
> well-defined conventions with respect to addresses and motions.
> Once I master that, it's just a matter of remembering the names
> of some commands. Oh, there is tab completion for the ex-mode
> commands! That means I really only need to memorize a few
> normal mode commands!
>
>> Start them out with a pre-configured Vim with a lot of "bells and
>> whistles" such as syntax highlighting already enabled for them. Maybe
>> even install a snippet or skeleton plugin that pre-populates most of a
>> C program for them. TagList would not be out of the question.
>
> I would also show off Vim's insert-mode completion capabilities. That
> is something that programmers coming from an IDE very much rely on.
>
>> 3. Vim's help tells you basically EVERYTHING you need to know about
>> the editor.
>>
>> This step is VERY important. Without knowledge of :help, Vim is
>> basically useless, and a new user will never get beyond basic editing.
>> If time permits, I would even demonstrate CTRL-D with a :help topic,
>> and :helpgrep.
>
> Please make time to show this aspect of the help system off. I also
> encourage you to point out that they can use Ctrl-] and Ctrl-T to
> navigate via helptags.

Rather than Ctrl-D, I would demonstrate 'wildmenu' (Tab) with a help
topic. ":helpgrep" is essential indeed.

>
> The :options command along with :mkvimrc would be a good thing to
> throw into a hand-out. Vim is very, very configurable. These
> commands are a good way to explore all of those settings.

hm. Never used :mkvimrc myself. My vimrc is something I built little by
little, starting with

runtime vimrc_example.vim

then adding one command (if block, rather) above it when I got messages
in the "wrong" language

if has('unix')
language messages C
else
language messages en
endif

(I already had a double-boot system by that time, and Windows and Unix
versions didn't accept the same arguments here)

the rest came after the call to vimrc_exmple.vim, starting with

filetype indent off

after a lot of searching why Vim was high-handedly changing my
indentation and how to prevent it

...etc... (YMMV).

I did (rather early) check every possible option, but I didn't use
:mkvimrc, I added the changes, with the appropriate "if has(" or "if
exists(" wrappers to avoid errors in different versions (such as
vim-minimal vs. vim-enhanced vs. vim-x11 on Linux, vs. vim.exe vs.
gvim.exe on Windows.

>
> In addition to the great resources Ben Fritz pointed to, you can also
> direct new users to #vim on irc.freenode.net.
>

not to forget the vim_use (and possibly vim_multibyte etc.) Google
Group, which I don't think Ben mentioned.


Best regards,
Tony.
--
"Nuclear war can ruin your whole compile."
-- Karl Lehenbauer

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

No comments:

Post a Comment