On 02/06/10 18:14, rewar wrote:
[...]
further, how do you become better at using such an editor as vim? I
only know some basic stuff for c programming and when i need to do
something like search/replace, i just google it. is there a good guide
to start with? I mean that statement u wrote just then was quite
complex for me to even understand lol
[...]

With Vim, don't google: use the help instead. It's the only program I know whose help contains *everything*.

The :help command accepts one optional argument: the topic about which you need help. That argument can be auto-completed: type part of it, then <Tab> instead of <Enter>, and Vim will complete the first (or only) matching tag. (By "first", I mean "what Vim thinks is the best".)

If you have 'wildmenu' set (which is not the default), hitting <Tab> to complete an ex-command (not just :help) will give you a menu of possible completions on the status line. Select with <Left> and <Right>, and, for filenames and menus (but not helptags) navigate the tree with <Down> and <Up>; then accept with <Enter> or abort with <Esc>.

There are various lists of pointers to help subjects: the first helpfile (which you get by hitting F1) has a list of all the others; ":help index" lists the commands for Insert, Normal, Visual and Command-line modes; ":help function-list" has a list of functions by subject (with a hotlink to the alphabetical list), etc.

But when all hope of finding your needle in that huge haystack seems lost, there is one extremely useful command: :helpgrep. It accepts one Vim-style regular expression (without the bounding slashes) and will search the whole contents on the help for anything matching that pattern. Results are given as a quickfix list (see :help quickfix.txt), navigate them with :cnext, :cprev, :cnfile, :cpfile, :cfirst, :clast (which may of course be assigned to single keys, e.g.

        :map <F2> :cnext<CR>
        :map <S-F2> ;cprev<CR>

or else, :copen will open (and, afterwards, :cclose will close) a window showing one line per match with the filename, linenumber, and the relevant line of text.


Best regards,
Tony.
--
Wombat's Laws of Computer Selection:
        (1) If it doesn't run Unix, forget it.
        (2) Any computer design over 10 years old is obsolete.
        (3) Anything made by IBM is junk. (See number 2)
        (4) The minimum acceptable CPU power for a single user is a
            VAX/780 with a floating point accelerator.
        (5) Any computer with a mouse is worthless.
                -- Rich Kulawiec

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Reply via email to