On 6 September 2015, Bram Moolenaar <[email protected]> wrote:
>
> Lcd wrote:
>
> > On 5 September 2015, Tony Mechelynck <[email protected]> wrote:
> > > Let's say I want to define ,, (two commas) as a digraph for … (U+2026
> > > HORIZONTAL ELLIPSIS). At the moment, in [g]vim 7.4.854 (with +multi_byte
> > > and 'encoding' set to utf-8),
> > > :dig ,, 8230
> > > does it, but
> > > :dig ,, 0x2026
> > > doesn't (AFAICT, it fails silently). The only way to use the hex value
> > > explicitly is at the moment
> > > :exec 'dig ,,' 0x2026
> > > which is ugly.
> > > Now the Unicode Consortium lists all codepoints by hex value, so the
> > > decimal equivalent is losing currency. Even in HTML, where once upon a
> > > time … or … would have been the only valid entities for that
> > > character, … is now a third valid alternative. So why not in Vim
> > > digraphs?
> > >
> > > N.B. Of course, if (let's say) patch 875 fixes it, "cautious" scripts
> > > will at first either still use the backward-compatible decimal number (or
> > > the :execute workaround), or test
> > > :if version > 704 || (version == 704 && has('patch875'))
> > > but it will be usable manually as soon as compiled-in.
> >
> > Please try the patch below. It (hopefully) makes the :digraphs
> > command accept hex and octal values.
>
> Thanks! Would it be too much to ask for a test? I don't think we
> have any tests for digraphs, would be useful to have a few basic ones.
Digraphs depend on the terminal encoding, and that might be a
problem when running tests. But even that aside, I'm afraid I have no
idea how to test digraphs from a script, sorry.
/lcd
--
--
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.