On Mon, Nov 21, 2011 at 7:27 PM, Tony Mechelynck
<[email protected]> wrote:

> In scripts, I use ex-commands as much as possible, because _every_ line of a
> script must be an ex-command,
...
> where the initial colons at the start of each line are not written simply
> because every script line is implicitly an ex-command so you don't need to
> repeatedly put Vim into command-line mode.
>
That makes it much clearer.  I was thinking of scripts as just an
extended command line.

>
> The difference between :1/@ and :1call search(@") is that the first searches
> for the first at-sign in the file (or the second if the first one is the
> very first character in the file) while the second searches for the first
> match with the pattern in the default register. Adding a double quote after
> :1/@ would change nothing: it would be taken as the start of a comment.
>
Then they are quite different, I was thinking /@" in script would be
the equivalent of /^R" at the command line.

> Since _every_ line of a script is an ex-command, / and ? searches can only
> be used in scripts as part of ex-command ranges.
>
And here it is again.  Looks like I've been banging my head against
the most fundamental point of vim scripts.

>
> Now please go back, _read_ all the help topics I listed

I will do so, thanks for listing them, and for all your help, much appreciated

Graham

-- 
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