On Tue, Jan 08, 2008 at 09:12:24AM +1100, Ben Schmidt wrote: > > > The builtin Escape key already expands abbrevs. Isn't this like a part > > of its definition? If I put <esc> on the right side of a noremap, I do > > this in order to get this builtin behaviour. > > I disagree. If *I* put <Esc> on the right hand side of a mapping I do it to > get > the builtin behaviour of 'exit insert mode', not 'change the text in > user-customised ways and then exit insert mode'.
<Esc> *by default* will trigger an abbr if you're at the end of the {lhs}. So it should still do so when using a noremap. Using one of the help's examples: :ab foo four old otters ifoo<Esc> This will leave you with "four old otters" in the buffer (after the timeout expires or you press another key). > But more importantly, if I put something like "iword " on the right hand side > of a > mapping, I expect 'word' to be inserted, not expanded as an abbreviation. > Much > more important is if I put ':command something' on the right hand side of a > mapping, I expect ':command' to get executed, not something else that the > user has > defined as an abbreviation. I think the original poster would agree on this. His contention was that <Esc> isn't following its normal behavior when used in a noremap while it does follow normal behavior in a map. James -- GPG Key: 1024D/61326D40 2003-09-02 James Vega <[EMAIL PROTECTED]>
signature.asc
Description: Digital signature