Hi,

Michael schrieb:
> 
> I have created some syntax rules and used this command:
> ~
> inoremap <silent><buffer><CR> <Esc>:call KeywordTrigger()<CR>a<CR>
> ~
> When I try to repeat last command it inserts the <CR>.
> What I want is the previous insertion plus <CR>.
> 
> Is there a solution?

modify KeywordTrigger() so that it returns an empty string if it not
already does and change your mapping to

  inoremap <silent><buffer><CR> <C-R>=KeywordTrigger()<CR><CR>

The dot command will now repeat your last insertion, but note that it
will not call KeywordTrigger() again.

Regards,
Jürgen

-- 
Sometimes I think the surest sign that intelligent life exists elsewhere
in the universe is that none of it has tried to contact us.     (Calvin)

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