Hi,

I'm wondering if it's possible to get the insert mode cursor position in
Vim-script. col() and virtcol() don't really solve my problem because in
order to invoke my function, I'm using a mapping like

imap <F2> <Esc>:call functionname()<CR>i

so by the time the function is called, Vim is in normal mode. Now this
causes a problem, because a line like "abcd" (quotes for clarity) has only
four cursor positions in normal mode, but five cursor positions in insert
mode. So col() doesn't differentiate between "|abcd" and "a|bcd". I'm not
really sure what virtcol() is doing (from reading :help virtcol()), but it
isn't solving my problem either.

So, does anyone know how to differentiate between these two cases.

Thanks,
Ivan

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to