Hi everobody,
I recently had a very similar conversation with three guys on #vim
(irc.freenode.net).
Basicaly, there is two official help for Vim:
- the vimtutor
- :help
And that's basically it.
:help being your Vim dictionnary/encyclopedia/bible, it's very complete
and has everything in it but it's hardcore to read and understand.
Unfortunately, it's not easy at all to go through and to 'get' the way
it works.
I believe that there is room between vimtutor and :help to have some
beginner to intermediate tutorial that will take you by the hand and
bring you through the Vim universe in a nice and easy way. Let's not
forget (especially for the Vim gurus out there) that Vim is very
powerful but because of that it can be very hard to understand sometimes
or even to adapt to it and make it your favourite text editor.
Of course Google is your friend but the sheer ammount of tutorials out
there can easily make you go left, right and center and basically not
teach you anything useful but some 'tips and tricks' that is cool but
won't make you code faster or deeply understand Vim.
So I think that there is room for some official tutorial after the
vimtutor and before a perfect use of the ultimate :help. The tutorial
will totally avoid to be a scientific precision on
how-to-exactly-define-terms-the-best-way-possible-using-the-less-words-possible.
The tutorial should be well written and take time to explain things to
novice in simple words. The idea is to bring people to the Vim highway
efficiently. Such a basic tutorial could _also_ help novices to avoid
asking questions that will make any Vim guru feel like saying: 'RTFM'
As an example, here are some topics proposed:
Non-technical:
- Phylosophy behind Vim
Where you would learn why it will help you to be faster in your
everyday coding and what the user has to understand to truely enjoy Vim
(talk about the need to touch-type to be truely efficient for instance)
- Phylosophy behind the three modes (Normal, Visual, Insert)
- Phylosophy behind the command line mode
- Differences between Vi and Vim
- Explain the folder structure and how the various config files work
- Differences between Vim on Windows, Mac, Linux, Unix and console use
- Configure once, use everywhere (or how to adapt your config to a
different platform)
- etc.
Technical:
- The big apple : Think different!
Where you would learn that you need to think gg instead of
'CTRL-home' or xp to invert the order of two letters etc. This could
have a list of standard keyboard shortcuts mapped to a list of Vim
shortcuts.
- Basics of Vim variables (:set :let etc.)
- My first function : hello world!
- Basic understanding of filetypes
- Basic folding
- Basics of syntax highlighting
- Basic mappings & abbreviations
- etc.
Help! I need somebody
- Phylosophy behind the :help command: how to 'think' :help
- How to use :help efficiently
- Good references to go one step further
- etc.
Of course, this is only a guide of what would be useful to a beginner
but I firmy believe that some official tutorial is needed. Maybe this
could be achieved by doing a 'best off' the various tutorials already
available.
Let me know what you think of this,
Laurent
A.J.Mechelynck wrote:
Meghdad Azriel wrote:
I was just kidding ;)
I know that they are not secret but, they´re not that intuitive...
and i´m
still learning how to use that help effectivelly...
maybe I neet to read those basic files with care...
[...]
To use the help effectively, one should learn to use the tools Vim
itself includes to search the help (see, among others, ":help :help"
and ":help :helpgrep"):
:help <topic>
brings you to the help for <topic> if there is one, otherwise to some
help topic "resembling" what you typed
:help pattern<Tab>
completes your command-line with the first help topic matching the
pattern. Hit <Tab> again to see the next one. Hit Ctrl-D to see them
all. If you have 'wildmenu' on, the bottom status line will be
replaced by a "menu" of possible matches: hit <Left> or <Right> to
select, <Enter> to accept, <Esc> to abort.
:helpgrep pattern
searches the whole help text for /pattern/. The results are used to
build a "quickfix error list" (see ":help quickfix.txt"). Then the
following commands may come useful:
:cn[ext]
:cp[revious] or :cN[ext]
:cnf[ile]
:cpf[ile] or :cNf[ile]
:cfir[st] or :cr[ewind]
:cla[st]
to navigate the list, displaying the helpfiles with the cursor on a
match;
:cope[n]
to open the list of matching lines in its own split-window, where you
can position the cursor on any of those lines then hit <Return> to see
the same line in context in its helpfile;
:ccl[ose]
to close the quickfix window, even if it is not the current window.
(Brackets represent the optional part of the command names: e.g.
":cp[revious]" means that the ":cprevious" command can be abbreviated
to any of :cp :cpr :cpre :cprev etc.)
If you often use the ":helpgrep" command and/or other quickfix
commands such as ":make" ":vimgrep" etc., you may find the following
mappings handy (replace the left-hand side by whatever suits you):
:map <F2> :cnext<CR>
:map <S-F2> :cprev<CR>
Best regards,
Tony.