On 01/02/2011 10:49 PM, Rostyk wrote:
>      'a  or 'b  or 'c  work
>     :a,bp  to display the lines in the a,b range.  throws an  E488
> error

In "ex" commands, line ranges using marks cannot be specified
by just naming the mark register like "a"; instead, use "'a"
like this:

  :'a,'bp

More detail is found here:

  :help range

But you might start reading here:

  :help cmdline-ranges

>      :a,bd   throws an E488

Because the "'" is missing for mark "a", Vim sees this as the
"ex" command ":a", which is short for ":append".  The trailing
characters ",bd" are not valid with ":append".  See:

  :help :append

The command should have been:

  :'a,'bd

> Also confusing is that if  ma is at line 40  and mb is at line 50
>  then for the command
> :40,bmc  I am getting an error  "Not an editor command"

The line range here is "40," (which means "40,.", or from line
40 to the current line), followed by the (invalid) command "bmc".

I imagine this was intended:

  :40,'bm'c

The line number for mark "c" is provided by "'c".

> and
> for :40,bm20 I get an error that I am giving a backward range
> and is it  (y/n) all right to switch?.

The line range here is "40,", followed by the command "bm"
(short for ":bmodified") with argument "20".  The range would
appear to be backward if your cursor were on line 39 or earlier.

Try this instead:

  :40,'bm20

> Please also reply to me by email to [email protected] as well as
> posting any advice.

Michael Henry

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