Hi, On 6/1/07, Serhiy Boiko <[EMAIL PROTECTED]> wrote:
Hi, all.In insert mode command C-] expand abbreviation. How to call this command in function? I try this way: execute "normal i\<C-]>" but it simply put ^] in text.
To expand an abbreviation from a function, you can try using the following function: function! ExpandAbbr() let repl = maparg(expand('<cword>'), 'i', 1) if repl != '' exe "normal ciw\<C-R>=repl\<CR>" endif endfunction nnoremap <silent> ,e :call ExpandAbbr()<CR> - Yegappan