Artyom Bologov <[email protected]> writes:

> But wait, does not \/HELLO/ set the dot before
> executing `k'?

        The way  I understand it, /hello  on its own
  is a  command that  changes the line  address, but
  /hello/ka is not a /hello/ command followed by a k
  command, which  I think  is what you  are alluding
  to, but it  is more of a /hello/  address given to
  the k command.  /hello/ka is more similar to 10ka,
  where `10'  does not  change the  current address,
  nor does $ka set the  current address to $, and in
  a similar way, /hello/ka  does not set the current
  address to  the position  of `hello'.  But  if you
  run the /hello/  command separately, thus changing
  the address  first, then run kan  separately, then
  the result is the line which you last moved to.

        This sounds perfectly expected to me, and my
  muscle memory is even used  to it.  If I'm writing
  some  C code  in the  main function,  and at  some
  point wanted to mark the beginning of it, I may do
  something like ?main?ka, and keep editing in place
  fully expecting  that my current line  address did
  not change.   But, if  I'm searching for  the main
  definition, I  may do /^main  and see that  I'm at
  that function, then run ka  to mark it before I do
  further editing in the lines that follow.

        Basically, /hello/p changes the address just
  like 10p  changes the address, but  /hello/ka does
  not change  the line address, just  like 10ka does
  not change the address.

  Hopefully I understood what you're saying :)


Best Regards,
Lumin Etherlight

Reply via email to