On Sunday 23 November 2008 10:52 am, David wrote:
> 
[snip]
> Q1. Where is the article that explains to a beginner that the default
> comment symbol is a double quote mark?

i tried 

    :helpgrep comment

and the first hit indicated comments in vim scripting are
created with the double quote -- this was not a link to 'how
to script', which maybe you are looking for, which i believe
is in usr_41.txt -- if you search that module with 

    /^COMMENTS

you will find the section you wanted

searching vim help does take some getting used to -- so how
were you supposed to find usr_41.txt?  perhaps

    :help

with no arguments to take you to the main/first help page,
then follow the link to the table of contents and reading
til you find "Write a Vim script"

> Q2. How should I have proceeded to find that section of help?

see above

> Q3. Suppose there are 25 sections of help that discuss comment
> symbols. Is there a convenient way to find them all? And how could I
> conveniently work through them systematically?

learn to use the :helpgrep command -- it is arguably more
useful than :help, for which you almost have to know exactly
what you need before you can find it

read 

    :help helpgrep

to learn about :cn and :cp

read 

    :help :help

to learn about prefixes to :help arguments, for example

    :help i_CTRL-O

takes you to help for the insert mode command <C-O>

> Q4. Does the format *:comment* have a particular significance? It must
> have, because one finds it everywhere in the help files. What is less
> apparent is what it means and whether one can use it to jump to a
> suitable topic.
> 
> In sample vimrc files on the web, I found entries as follows:
> set comments+=b:\"
> set comments+=n::

the += syntax adds values to the {lhs}, for example

    :set guioptions+=T

will add the toolbar to the top of the gVim window, where

    :set guioptions=T

will set guioptions to include ONLY the toolbar

> Q5. How could I find out what += means here? I mean by using vim help,
> not by asking this news group. I tried :help += and obtained an
> article on the use of :let, which I do not consider relevant.

let and set are both very relevant here, they are where +=
is used

> Q6. What is the meaning of += here?
> Q7. What is the meaning of the b: and n: in this context?

the b: is for setting options that are local to the current
buffer

    :help b:

will take you to an explanation of buffer-variables in the
eval.txt help module -- scroll up to see them all -- in this
context n: is not a variable prefix

    :help 'comments'

shows what we are looking at is not related to vim
scripting, rather how formatting and syntax define comments
for languages you may be editing

i must go now, perhaps others can carry on with your other
questions

> Here is the problem I started with at the beginning of my 2 hours of
> frustration:
> I tried Unix>vim>following_command
> 
> :.!date " and here I put a comment
> 
> and received error messages.
> The problem is not, as I mistakenly thought, with the comment symbol,
> but, as you experts undoubtedly realise instantly, with the fact that
> vim is feeding back the whole line
> 
> date " and here I put a comment
> 
> to the Unix shell for interpretation. This brings me to my final
> question:
> Q8. Is there any way of telling vim not to feed the whole line to the
> Unix shell, but only the initial part? I tried shielding the comment
> part by inserting a | as shown to me by the vim online help response
> to :help comment, but it didn't work. (This all occurs in something I
> am trying to automate in a source file of vim commands, and that's why
> I do want to include a comment. I suppose I could give up and put the
> comment elsewhere, where vim would find it less puzzling, but a human
> reader would find it more puzzling.)
> 
> Thanks very much for your patience if you have managed to stick with
> me this far, and many thanks in advance for any help. Apologies for
> asking so many questions, but it might have been much more irritating
> if I had used 8 postings for my 8 questions. If there are any
> responders, I would be grateful if you could say which of my 8
> questions you are answering.
> 
> Thanks once again for any help.
> David

sc



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

Reply via email to