Am 12.01.2012 20:47, schrieb Charles Campbell:
Hello,

I have "hints" files that echo prototypes when a function name is typed in 
insert mode.

Example:
inorea abc abc<c-o>:echoh Unique<Bar>echo "void abc(void *ptr)"<Bar>echoh 
None<CR>

so that when in insert mode and

abc(

is typed, a message is echo'd to the effect that:

void abc(void *ptr)

is displayed.

The problem I'm having involves the dot command; the <c-o> apparently breaks the 
"small change":
assume one has a file with two lines:

one
two

Typing (with the above inorea... hint active):
1Gi(abc) <esc>j0.

yields

(abc) one
) two

Any suggestions on how to get around this issue?

Regards,
Chip Campbell

* use <expr> mapping, and :echo as side-effect:

inorea <expr> abc  SelfEcho('abc')

func! SelfEcho(name)
    echoh Unique
    echo printf("void %s(void *ptr)", a:name)
    echoh None
    return a:name
endfunc

--
Andy

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