2010/11/10 Jürgen Krämer <[email protected]>:
>
> 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
>




Thanks a lot, that helped!

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