There are some odd details about how abbreviations get triggered:

(abbrevs like  :ia foo bar )

1. abbrevs are not triggered by a mapping when remapping is off:

" abbrevs not triggered:
 :ino <esc> <esc>
 :ino <esc> <c-]><esc>

" abbrevs triggered as expected:
 :imap <esc> <esc>
 :imap <esc> <c-]><esc>| " careful, endless loop

I'd like to have abbrevs expanded in all situations.


2. The key i_Ctrl-] is supposed to trigger an abbrev without inserting a
character.  Now it does insert itself if there is no abbrev to expand.
How is this useful in any way?  IMHO it should never insert itself.


Example: (this is where I stumbled over the problem (again))

The autoclose.vim plugin (vimscript #1849) has a mapping
   :inoremap <silent> <Esc> <C-R>=<SID>CloseStackPop('')<CR><Esc>

Currently, pressing Esc in Insert mode doesn't expand abbrevs.
A simple remedy could be

   :inoremap <silent> <Esc> <C-]><C-R>=<SID>CloseStackPop('')<CR><Esc>

but this doesn't work, because both above mentioned issue show up here.


Does Vim need an upgrade or am I just missing something?

-- 
Andy

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

Raspunde prin e-mail lui