-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 06-May-2015 11:21, Enno wrote:
> Hitting a non-keyword character, <cr> or <esc> in insert mode with
> the cursor behind an abbreviation (:help abbreviation) expands the
> abbreviation. However, a mapping to that character no longer
> expands the abbreviation in the same way.
> Is this a bug or on purpose?
At least, this behavior has been in Vim for a very long time, so it's
highly unlikely that Bram changes it, as people or plugins may rely on
that.
> The remedy by prepending <C-]> to the non-recursively mapped
> character is cumbersome, because now every non-recursive mapping
> must check if the remapped character is a non-keyword character and
> eventually preprend <C-]>.
Do you have a concrete problem? In my opinion, discussing this on a
purely theoretical level rarely leads to something. If you post your
actual issue, I think we can find a solution.
I usually use :imap instead of :inoremap, and then the abbreviation gets
expanded. (I think you're aware of that and referred to it as
"non-recursively mapped".) So far, I haven't had any problems with that;
you only have to be careful now that the {rhs} gets remapped, and that
can be controlled via subordinate :inoremap'ed <SID>IntermediateMappings
(but not for the first inserted character).
- -- regards, ingo
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (MingW32)
iQEcBAEBAgAGBQJVSejNAAoJEA7ziXlAzQ/vTx0H/jeSElWRrYZY5jBgwtA0Ru7A
aXOtJpEx2YK4y/3FRjh6RSfuReU+Eg2dxCVE/LmIHsT8hoxLZntZsKHe/6T6r5pz
XQTc3JF/UbWElRi+k7sBuhPDzpoustt+LQgqDsFL9WP1a5xSchT369L3Sg+/rA8P
3DYDRsmtnR2KcjlnReAH0TYHqda9CH/ruhKnpYBZHkcPVF1yTEU6V7FXYglLS57K
svE43j7xh0yvBnFuDK4aX1sCmwESUlz6j1IndUyW1t5FwhwqdHvUdwmf4F6Sxo2q
ku9zIrERwGLGZYwJj+U50q/0EOIfb04l1/Usb8T01nWloqXrqFRwxFxJWjL9N/I=
=pIdj
-----END PGP SIGNATURE-----
--
--
You received this message from the "vim_dev" 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
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.