Hi Hari,
On 4/21/06, Hari Krishna Dara <[EMAIL PROTECTED]> wrote:
>
> According to the doc, the '. mark is supposed to indicate the position
> where the last change started, but the value always seems to be the
> current column. I tried this in both vim 6.3 and 7.0e, and they both
> behave the same. In Vim7, I tested the value in two ways, using
> expression register and using an imap with <expr> option. E.g., here is
> what I typed:
>
> <C-R>=col("'.")<CR>abc<C-R>=col("'.")def<C-R>=col("'.")
>
> which resulted in
>
> 1abc4def7
>
> I also tried this:
>
> inoremap <expr> <F12> col("'.")
> <F12>abc<F12>def<F12>
>
> which again resulted in the same string. Is it working as expected? If
> this is expected, I wonder how useful it is going to be, when it always
> equals the current column. I was expecting to see:
>
> 1abc1def1
>
I think this is behaving as documented under :help '.
--------------------------------------------------------------------------
The position is at or near where the change started.
Sometimes a command is executed as several changes,
then the position can be near the end of what the
command changed. For example when inserting a word,
the position will be on the last character.
--------------------------------------------------------------------------
As noted by the last sentence, when you are inserting text,
the '. mark is set to position of the last inserted character.
- Yegappan