On Apr 20, 5:43 am, Tony Mechelynck <[email protected]>
wrote:
> On 20/04/09 05:01, AndyHancock wrote:
> [...]
>
> > I tried to dig up info on how single and double quotes are
> > interpretted in vim script.  All I can find were quotations lauding
> > vim (much deserved!).  I even googled for
>
> >     vim single-quote double-quote
>
> > Finally, I assumed that vim script syntax had some inheritance from
> > ed.  This is just a speculative stab, since I have no idea aside from
> > the fact that vi commands looked like ed commands.  However, vim
> > script code uses versions of vi commands with a syntax that resemble
> > third generation languages more than cryptic ed commands.  Google hits
> > on ed commands didn't turn up anything relevant.
>
> > Is there documentation on the vim script commands that depart from the
> > vi command syntax (for commands started with colon ":")?
>
> Documentation on _everything_ (but *EVERYTHING*) in Vim is in the Vim
> help. So that, not Google, should be the first place you look.
>
> Single- and double- quoted strings are some ov the buiding blocs from
> which expressions are built.
>
> Hitting F1 gives you the firest page of help; lower down is a list of
> all help files, with a one-line description of each. You can see there
> that quotes.txt is not what you want, but look under "Advanced editing":
> the second-last item is about expression evaluation. Double-click
> |eval.txt| -- or place the cursor on it and hit Ctrl-] -- and you're
> brought to the table of contents of the halp about expression
> evaluation. Then |expression-syntax| brings you to a top-down breakdown
> of expression building blocks. Single and double string constants are
> under |expr9|. It starts there with numbers so scroll down until you
> come to the |expr-quote| help with the |help-string| tag a couple of
> lines above. So ":help expr-quote" or ":help expr-string" is what you
> should use the next time you want to come back to that same section.
> There is there a summary of all backslash-sequences that can be used in
> a double-quoted string. Lower down, you see that single-quoted strings
> are interpreted literally, except that two single quotes in the middle
> of a single-quoted string mean one single quote, so that you can
> represent everything, including single quotes, in single-quoted strings:
> a single single quote is thus '''' as a single-quoted string or "'" as a
> double-quoted one, while a single double quote is '"' or "\"".
>
> The above is somewhat lengthy but I tried to decompose help searching by
> categories into as small easily understandable steps as I could. There
> are other ways to search the Vim help:
>
> - if you know part of the help tag (or think you do: let's say "string")
> you can either use
>
>         :help string<Ctrl-D>
>
> to see all possible completions as a list, or, if 'wildmenu' is on
> (which is not the default,
>
>         :help string<Tab>
>
> to see the various completions as a menu (if there are at least two: if
> there is only one possible completion Vim fills it in on your command-line).
>
> There can be wildcards in the middle of the "partial tag". The same
> kinds of wildcards are used as in filename: ? for one wild character, *
> for any number of characters, etc.
>
> This will find already-defined help tags. If all else fails, you can
> even search the full text of all help files by means of
>
>         :helpgrep <pattern>
>
> where <pattern> is any Vim regular expression.

Thanks, Tony.  I'll be following up with reading during the weekend.
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to