How to search in digraphs?

99 views
Skip to first unread message

Peng Yu

unread,
Apr 10, 2012, 3:41:02 PM4/10/12
to vim_use
Hi,

I have a hard time to find the symbol that I need in :diagraph. Is
there a table that better organize the symbols? In particular, I want
to type in $\times$. Could anybody let me know what is the shortcut?

Regards,
Peng

Taylor Hedberg

unread,
Apr 10, 2012, 3:52:08 PM4/10/12
to vim...@googlegroups.com
Peng Yu, Tue 2012-04-10 @ 12:41:02-0700:

> I have a hard time to find the symbol that I need in :diagraph. Is
> there a table that better organize the symbols? In particular, I want
> to type in $\times$. Could anybody let me know what is the shortcut?

I usually use `:help digraph-table` and then search within the help
buffer with /.

Taylor Hedberg

unread,
Apr 10, 2012, 3:54:54 PM4/10/12
to vim...@googlegroups.com
Taylor Hedberg, Tue 2012-04-10 @ 15:52:07-0400:

Forgot to add, the digraph for the multiplication symbol ('×') is `*X`, or
for a middle dot ('·'), it's `.M`.

Charles Campbell

unread,
Apr 10, 2012, 4:22:45 PM4/10/12
to vim...@googlegroups.com
Hello!

Are you trying to use math? My math plugin makes such symbols available via

keymap
menu
operator

The "operator" method sets up several visual maps; one may convert 2 to
² or ₂
by visually selecting the "2" and pressing ^ or _, respectively. a to α
with visual selection and pressing & .

You may get it at:

http://www.drchip.org/astronaut/vim/index.html#MATH

Regards,
Chip Campbell

Chris Jones

unread,
Apr 10, 2012, 8:51:16 PM4/10/12
to vim_use

RFC1345 is another option, with better coverage than Vim's digraph-table.

CJ

--
ALL YOUR BASE ARE BELONG TO US!

Christian Brabandt

unread,
Apr 11, 2012, 2:20:41 AM4/11/12
to vim...@googlegroups.com

I usually use either digraph.txt or
http://www.vim.org/scripts/script.php?script_id=2822

regards,
Christian

Boyko Bantchev

unread,
Apr 11, 2012, 2:26:03 PM4/11/12
to vim...@googlegroups.com
> I have a hard time to find the symbol that I need in :diagraph. Is
> there a table that better organize the symbols? In particular, I want
> to type in $\times$. Could anybody let me know what is the shortcut?

rfc1345 is worth checking at times, but its digraph set is different
from Vim's, and that document does not display the characters
themselves.

digraph.txt or, more specifically, :help digraph-table only show part
of the available digraphs (less than a half, I think).

I don't know of a best option than using the :digraphs command.
You can find there all available digraphs, and it is immediately seen
which of the respective characters are correctly displayed on your
system. For more convenient browsing of the table, redirect the
output of :digraphs and read it in Vim as normal text.

Specifically for typing × I use the /\ digraph.

Christian Brabandt

unread,
Apr 11, 2012, 4:00:27 PM4/11/12
to vim...@googlegroups.com
Hi Boyko!

That is not true. Since 7.3.116 digraph.txt contains all digraphs
available.

regards,
Christian
--
Der Mensch ist bereit, f�r jede Idee zu sterben, vorausgesetzt, da�
ihm die Idee nicht ganz klar ist.
-- Gilbert Keith Chesterton

Chris Jones

unread,
Apr 11, 2012, 10:27:32 PM4/11/12
to vim...@googlegroups.com
On Wed, Apr 11, 2012 at 02:26:03PM EDT, Boyko Bantchev wrote:

> > I have a hard time to find the symbol that I need in :diagraph. Is
> > there a table that better organize the symbols? In particular, I want
> > to type in $\times$. Could anybody let me know what is the shortcut?
>
> rfc1345 is worth checking at times, but its digraph set is different
> from Vim's,

In Vim 7.2's help:

:h digraphs-default

| ‘These default digraphs are taken from the RFC1345 mnemonics
| [...] Exception: RFC1345 doesn't specify the euro sign.’

And the way things are going, that ‘euro exception’ shouldn't be
relevant for much longer anyway.. :-)

Of course there are ‘variable length’ mnemonics (trigraphs mostly) in
rfc1345 that are not supported by Vim, but in my experience the digraphs
are exactly the same.

I guess you could write a script to compare the output of the :digraphs
command with the table in rfc1345.

> and that document does not display the characters themselves.

Well.. if you don't know the digraph, it's not going to be possible to
search for it anyway.. It makes more sense to do a search on the ISO
10646 long descriptive name (3rd column of rfc1345). e.g. you need an
arrow and you do a ‘/arrow’.. a star symbol.. ‘/star’ etc.

If you need to see the glyphs, for instance to check that it's covered
by your font, it's not too hard to do a lookup of the hex code points in
column 2 of the rfc1345 table and generate an extra glyph/char column.

> digraph.txt or, more specifically, :help digraph-table only show part
> of the available digraphs (less than a half, I think).

About 10%. It only covers the 00-FF range.

> I don't know of a best option than using the :digraphs command. You
> can find there all available digraphs, and it is immediately seen
> which of the respective characters are correctly displayed on your
> system. For more convenient browsing of the table, redirect the
> output of :digraphs and read it in Vim as normal text.

I was getting cross-eyed trying to find what I was looking for in the
output of the :digraphs command, so I converted rfc1345 to a local vim
help file and added the correponding glyphs via a five-line script that
looked them up in the python ‘unicodedata’ module.

If you have any use for it, drop me a line off-list and I'll send you
a copy.¹

CJ

¹ Come to think of it, s/o who's familiar with Vim developement might
use it as the basis of a patch that would provide a digraph-table in
sync' with the ouput of the ‘:digraphs’ command on unicode-capable
systems.

--
Oh My God!!! Larry is back!

Chris Jones

unread,
Apr 11, 2012, 10:49:17 PM4/11/12
to vim...@googlegroups.com
On Wed, Apr 11, 2012 at 04:00:27PM EDT, Christian Brabandt wrote:
> Hi Boyko!
>
> On Mi, 11 Apr 2012, Boyko Bantchev wrote:

[..]

> > digraph.txt or, more specifically, :help digraph-table only show part
> > of the available digraphs (less than a half, I think).

[..]

> That is not true. Since 7.3.116 digraph.txt contains all digraphs
> available.

Hehe.. now everyone knows I (among others) am not current..

Now I can trash my local rfc1345 vim page..

CJ
--
HOW ARE YOU GENTLEMEN?

Chris Jones

unread,
Apr 11, 2012, 11:17:07 PM4/11/12
to vim...@googlegroups.com
On Wed, Apr 11, 2012 at 04:00:27PM EDT, Christian Brabandt wrote:

[..]

> That is not true. Since 7.3.116 digraph.txt contains all digraphs
> available.

Is there a format of the ‘:digraphs’ command that lets you list only
custom user-defined digraphs - i.e. those that are different from the
defaults..?

Couldn't find such a thing in Vim 7.2..

If there isn't, something like ‘:dig!’ would be nice..

Depending on screen size, in a UTF-8 locale I may have to hit the space
bar three or four times to reach the end of the listing and if I hit it
once too many, I have to start over.

CJ

--

Hi! My name is bobby...

Boyko Bantchev

unread,
Apr 12, 2012, 2:13:32 AM4/12/12
to vim...@googlegroups.com
> That is not true. Since 7.3.116 digraph.txt contains all digraphs available.

Nice to know that, but it seems a very recent addition.
I happen to be using several versions of Vim, the most recent being 7.3.46,
and none of them has all the chars in digraph.txt.
So, perhaps we should say, `That *is* true, unless you compiled Vim
yourself from the most recent sources.' :)

In fact, even in its most recent version, digraph.txt is missing some digraphs.
I just searched for the digraph /\ (for ×), and it is not in
http://code.google.com/p/vim/source/browse/runtime/doc/digraph.txt .

> | ‘These default digraphs are taken from the RFC1345 mnemonics
> | [...] Exception: RFC1345 doesn't specify the euro sign.’

The Euro sign is not the only difference between rfc1345 and the
output of :digraphs. I cannot tell what all of them are, but, e.g.,
the already mentioned /\ is known to Vim but is not in the rfc.
Perhaps, as well, Vim misses some definitions that the rfc has.

Christian Brabandt

unread,
Apr 12, 2012, 2:30:37 AM4/12/12
to vim...@googlegroups.com
On Thu, April 12, 2012 08:13, Boyko Bantchev wrote:
>> That is not true. Since 7.3.116 digraph.txt contains all digraphs
>> available.
>
> Nice to know that, but it seems a very recent addition.

If I recall correctly, it's more than a year ago, that I provided the
patch:
http://groups.google.com/group/vim_dev/msg/1eeb0d49255204d1

> I happen to be using several versions of Vim, the most recent being
> 7.3.46,
> and none of them has all the chars in digraph.txt.
> So, perhaps we should say, `That *is* true, unless you compiled Vim
> yourself from the most recent sources.' :)

I wouldn't call that recent anymore ;)

> In fact, even in its most recent version, digraph.txt is missing some
> digraphs.
> I just searched for the digraph /\ (for �), and it is not in
> http://code.google.com/p/vim/source/browse/runtime/doc/digraph.txt .

Search for the hex code d7 and you'll find it.
It seems like the Multiplication sign uses /\ and *X as digraph
while only *X is documented. I don't know, how many more digraphs have
several different chars to enter it (which are not documented).

I found it by using my plugin that I already mentioned before.

>> | �These default digraphs are taken from the RFC1345 mnemonics


>> | [...] Exception: RFC1345 doesn't specify the euro sign.�
>
> The Euro sign is not the only difference between rfc1345 and the
> output of :digraphs. I cannot tell what all of them are, but, e.g.,
> the already mentioned /\ is known to Vim but is not in the rfc.
> Perhaps, as well, Vim misses some definitions that the rfc has.

Would be good to know, what else is missing, so one could add to the
documentation.

regards,
Christian

Christian Brabandt

unread,
Apr 12, 2012, 2:49:55 AM4/12/12
to vim...@googlegroups.com

I looked it up in the source. The /\ is an old digraph, which was defined
with Vim 5 and back then digraphs did not correspond to the RFC.
Starting with Vim 6, digraphs correspond to RFC1345, but Vim still
supports the old digraphs, if they are unambigous to RFC1345.

This is mentioned briefly at :h digraphs-changed

regards,
Christian

Dominique Pellé

unread,
Apr 12, 2012, 3:17:00 AM4/12/12
to vim...@googlegroups.com
Chris Jones wrote:

> Depending on screen size, in a UTF-8 locale I may have to hit the space
> bar three or four times to reach the end of the listing and if I hit it
> once too many, I have to start over.

When you see the -- More -- prompt after typing :dig, you can press f
instead of <Space> to move forward by page (and b to move backward).
Unlike <Space>, you don't have to start over when you reach the end
when pressing f.

See also :help more-prompt

Regards
-- Dominique

Chris Jones

unread,
Apr 12, 2012, 3:20:14 AM4/12/12
to vim...@googlegroups.com
On Thu, Apr 12, 2012 at 02:13:32AM EDT, Boyko Bantchev wrote:

> The Euro sign is not the only difference between rfc1345 and the
> output of :digraphs.

It's the only exception listed in the documentation.

> I cannot tell what all of them are, but, e.g., the already mentioned
> /\ is known to Vim but is not in the rfc. Perhaps, as well, Vim misses
> some definitions that the rfc has.

The standard mnemonic for ‘×’ is ‘*X’. I have no idea where the ‘/\’
came into the picture, but it looks like some non-standard Vim-ism that
may be there for historical reasons. After all when you run the :dig
command, it's listed with a bunch of others out of code point sequence
right near the end of the listing while the ‘*X’ rfc1345 mnemonic is
listed near the beginning where it belongs, between code point ‘214’ and
‘216’. Seems to be the same for the other mnemonics that appear right at
the end of the listing such as ‘11’ -> ‘¹’...‘22’ -> ‘²’...

My guess is that they predate the RFC (or rather the integration of the
RFC's mnemonics to Vim) and were kept as aliases so that users who had
grown accustomed to them wouldn't have to add them back manually.

CJ

John Beckett

unread,
Apr 12, 2012, 3:37:19 AM4/12/12
to vim...@googlegroups.com
I needed to look at ':help digraph-table' and noticed
something strange. There are 22 lines that have <space><grave>
at the end, for example:

- -N 2013 8211 EN DASH `

However, the grave is hidden in the help.

Is there a reason for the grave, or is it a documentation glitch?

John

Christian Brabandt

unread,
Apr 12, 2012, 3:53:49 AM4/12/12
to vim...@googlegroups.com, vim...@googlegroups.com
On Thu, April 12, 2012 09:37, John Beckett wrote:
[forwarding to vim-dev]

That is probably a documentation glitch. I bet, the space grave
should be there at every entry, since this is used for syntax highlighting
help files (helpGraphics I think).

Additionally helpGraphic should also link to something so it
is highlighted in the help file, maybe Macro?

regards,
Christian

Dominique Pellé

unread,
Apr 12, 2012, 3:59:00 AM4/12/12
to vim...@googlegroups.com
John Beckett <johnb....@gmail.com> wrote:


I think that's perhaps intended. If I remove the trailing grave in...

Ń N' 0143 0323 LATIN CAPITAL LETTER N WITH ACUTE `

... then the N letter becomes highlighted (with helpSpecial syntax group).
With the trailing `, the whole line has helpGraphic syntax group.

However, the trailing ` is not used consistently. For example, it does
not appear in...

ñ n? 0xf1 241 LATIN SMALL LETTER N WITH TILDE

... where the N letter is highlighted.

I suppose that the trailing ` should be added to every lines in the
digraph table.

I also did not see any documentation for the trailing ` anywhere.
I think it should be described in ":help help-writing".

-- Dominique

Boyko Bantchev

unread,
Apr 12, 2012, 9:19:42 AM4/12/12
to vim...@googlegroups.com
On 12 April 2012 09:30, Christian Brabandt <cbl...@256bit.org> wrote:
> If I recall correctly, it's more than a year ago, that I provided the
> patch:
> .........

> I wouldn't call that recent anymore ;)

Your version of digraph.txt is not in the compiled versions of Vim
distributed from vim.org. It is not even in the source packages for
those who would compile Vim themselves.

So long as it is not in the current Vim distributions, this version
of digraph.txt is by no means representative of Vim. It is still
ineffective. Had you not mentioned it, I wouldn't even know it
existed. How would I?

Now, I did not intend to make a big deal of all this, but saying that
digraph.txt contains all digraph definitions, as was the case, is
simply misleading, because it appears to not be true for almost all
users of Vim.

>> In fact, even in its most recent version, digraph.txt is missing some
>> digraphs.
>> I just searched for the digraph /\ (for ×), and it is not in
>> http://code.google.com/p/vim/source/browse/runtime/doc/digraph.txt .
>
> Search for the hex code d7 and you'll find it.

What can be found is ×, but /\, as I said, is missing. Also missing
are c|, cO, n~, etc. – perhaps all those at the end of :digraph's
output. As long as they are effective in Vim, it is worth listing
them, too, in digraph.txt (under 'legacy' or whatever).

Regards,
Boyko

Christian Brabandt

unread,
Apr 12, 2012, 9:55:21 AM4/12/12
to vim...@googlegroups.com
On Thu, April 12, 2012 15:19, Boyko Bantchev wrote:
> On 12 April 2012 09:30, Christian Brabandt <cbl...@256bit.org> wrote:
>> If I recall correctly, it's more than a year ago, that I provided the
>> patch:
>> .........
>> I wouldn't call that recent anymore ;)
>
> Your version of digraph.txt is not in the compiled versions of Vim
> distributed from vim.org. It is not even in the source packages for
> those who would compile Vim themselves.

It is. I provided the patch and Bram committed it to the runtime files
that you can find at
at the help :h digraph-table-mbyte and online at
http://code.google.com/p/vim/source/browse/runtime/doc/digraph.txt
(which was after 7.3.115 and before 7.3.116, see also the Last change
line from January 15th, 2011).

> So long as it is not in the current Vim distributions, this version
> of digraph.txt is by no means representative of Vim. It is still
> ineffective. Had you not mentioned it, I wouldn't even know it
> existed. How would I?

Because it is in the official runtime files.

> Now, I did not intend to make a big deal of all this, but saying that
> digraph.txt contains all digraph definitions, as was the case, is
> simply misleading, because it appears to not be true for almost all
> users of Vim.
>

[�]


> What can be found is �, but /\, as I said, is missing. Also missing

Which happens to produce the same glyph (it just uses a different set
of characters to create them).

> are c|, cO, n~, etc. � perhaps all those at the end of :digraph's
> output. As long as they are effective in Vim, it is worth listing
> them, too, in digraph.txt (under 'legacy' or whatever).

Please don't understand me wrong but I am getting tired of discussing
this. If you miss the old legacy digraphs back from the Vim 5 days
(that do not conform to RFC1345), feel free to submit a documentation
patch.

regards,
Christian

Boyko Bantchev

unread,
Apr 12, 2012, 12:06:14 PM4/12/12
to vim...@googlegroups.com
>> Your version of digraph.txt is not in the compiled versions of Vim
>> distributed from vim.org.  It is not even in the source packages for
>> those who would compile Vim themselves.
>
> It is. I provided the patch and Bram committed it to the runtime files

No it isn't, effectively. It is nowhere in the exe or src packages
on http://www.vim.org/download.php or http://www.vim.org/sources.php,
which are what almost all users of Vim use. To all of them, including
me, digraph.txt only lists a small portion of the available digraphs.
We would not even suspect the existence of a newer version of anything
(let alone use it) until it comes with an official package that can be
run on our systems.

> Which happens to produce the same glyph (it just uses a different set
> of characters to create them).

But that pair of characters, and not the glyph which it represents, is
precisely what is called a 'digraph'. And saying 'it is there' when
it actually isn't won't make it appear.

Ben Fritz

unread,
Apr 12, 2012, 12:59:48 PM4/12/12
to vim...@googlegroups.com
On Thursday, April 12, 2012 11:06:14 AM UTC-5, Boyko Bantchev wrote:
> >> Your version of digraph.txt is not in the compiled versions of Vim
> >> distributed from vim.org.  It is not even in the source packages for
> >> those who would compile Vim themselves.
> >
> > It is. I provided the patch and Bram committed it to the runtime files
>
> No it isn't, effectively. It is nowhere in the exe or src packages
> on http://www.vim.org/download.php or http://www.vim.org/sources.php,
> which are what almost all users of Vim use. To all of them, including
> me, digraph.txt only lists a small portion of the available digraphs.
> We would not even suspect the existence of a newer version of anything
> (let alone use it) until it comes with an official package that can be
> run on our systems.
>

From vim.org/sources.php:

"The preferred way is to use Mercurial. You can easily get the latest version with all the patches, or go back to an older version if you need to."

So I disagree that "almost all" users who build Vim from source would necessarily use the outdated archives available for direct download.

As for user who get Vim in executable binary form, I'd bet that "almost all" of such users on a Linux platform will get Vim through their package manager, which will be more recent than the direct downloads, even if it's not the MOST recent version.

For Windows users, it is true that the latest *official* version available in installer form is 7.3.46. However, just below the download link, it says "For the latest version with all patches included see Cream below", where "Cream" links eventually to http://sourceforge.net/projects/cream/files/Vim/ . This is the recommended place to get a Vim installer.

Benjamin R. Haskell

unread,
Apr 12, 2012, 1:00:48 PM4/12/12
to vim...@googlegroups.com
On Thu, 12 Apr 2012, Boyko Bantchev wrote:

>>> Your version of digraph.txt is not in the compiled versions of Vim
>>> distributed from vim.org.  It is not even in the source packages for
>>> those who would compile Vim themselves.
>>
>> It is. I provided the patch and Bram committed it to the runtime files
>
> No it isn't, effectively. It is nowhere in the exe or src packages
> on http://www.vim.org/download.php or http://www.vim.org/sources.php,
> which are what almost all users of Vim use.

[This comes off as more argumentative than I'd intended. The points
that matter are the questions at the end.]

I'd argue that those are not "what almost all users of Vim use".
Definitely not those sources. If you're compiling from source, rather
than using http://www.vim.org/sources.php, current development uses
Mercurial (See: http://www.vim.org/mercurial.php ).

If you're not compiling from source, most O/S distributions add to those
versions the patches that have been released since those were packaged.

E.g. the source package from your second link is for Vim 7.3 (with no
patches). O/S'es that are actively maintained usually have something
much later than that. Gentoo is at >= 7.3.266, OpenSUSE is at >=
7.3.322, MacVIM is currently at 7.3.390 (despite being called "snapshot
64"?), Ubuntu 11.10 has 7.3.154.

Only the Windows-native versions are behind the 7.3.116 patch that's
under discussion: 7.3.46 is the official Windows d/l, and 7.3.107 is the
current Vim-with-Cream, (Cygwin is at >= 7.3.447). So, depending on
what fraction of Vim users are using it under Windows (and not via
Cygwin), it's not "almost all".

Related questions this raises, though:

1. Why are the Windows versions so far behind?

2. Is sources.php even useful? (Why would anyone want to start with
vim-7.3, vim-7.2, or vim-6.4 as a jumping-off point? It'd be much
better to start from "Vim from Mercurial" -- even if only via a
tar.bzip'ed archive rather than via `hg`.)

3. "Vim from CVS" should have a warning similar to what the "Vim from
SVN" has (E.g. "NOTE: Vim 7.3 is not in CVS, use Mercurial instead").
But is there really any reason to keep those pages around?

--
Best,
Ben H

Phil Dobbin

unread,
Apr 12, 2012, 1:23:53 PM4/12/12
to vim...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

[snip]

Just to add the latest Vim from current Debian (Squeeze 6.0.4) repos
is 7.2.445

Cheers,

Phil...

- --
But masters, remember that I am an ass.
Though it be not written down,
yet forget not that I am an ass.

Wm. Shakespeare - Much Ado About Nothing


-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: §auto-key-locate cert pka ldap hkp://keys.gnupg.net
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJPhw+mAAoJEKpMeDHWT5ADlmgIANSacoscA6hODzuxHLjtYVfq
bAZ5/LrLpHg/04+wfJdvDbYw6se5v0CPwt+rnZOBvTEwXguJWvwbaQUN3gpkY3tt
9C4D0/0y+FcCH6ykw7G5PXN7XvWwe5p30Jhhl37v5V9MMSbfpH1Ph/l8MeAKXXFK
Ygq2fDHqeuZ9f7RlL2vtplU01VP9o1/zlNl7He8pLt4CKw0rgMFGMETAmdLZcL3f
etqXaUoRvjHFWqQGjrrSm9kE4dt+1+G9i3sFmG3WiVwIKl7Ud38TFH4LRAI50fR6
5WJ7M/dA2plyJpOXTHCa/Tm5fR36hrgsd4XZamx/7x2NvcUTuM0h8wc844nVPJE=
=zcC5
-----END PGP SIGNATURE-----

Steve Hall

unread,
Apr 12, 2012, 3:19:34 PM4/12/12
to vim...@googlegroups.com
On Thu, Apr 12, 2012 at 1:00 PM, Benjamin R. Haskell wrote:
>
> Only the Windows-native versions are behind the 7.3.116 patch that's
> under discussion: 7.3.46 is the official Windows d/l, and 7.3.107 is
> the current Vim-with-Cream, (Cygwin is at >= 7.3.447). So,
> depending on what fraction of Vim users are using it under Windows
> (and not via Cygwin), it's not "almost all".
>
> Related questions this raises, though:
>
> 1. Why are the Windows versions so far behind?

We roll Vim *without* Cream quite frequently:

http://sourceforge.net/projects/cream/files/Vim/

Latest is 7.3.480, built from the official Mercurial repository,
includes runtimes, and I believe includes all patches to date.


--
Steve Hall [ digitect dancingpaper com ]

Christian Brabandt

unread,
Apr 12, 2012, 5:03:52 PM4/12/12
to vim...@googlegroups.com, vim-dev Mailingliste
Bram,

On Mi, 11 Apr 2012, Chris Jones wrote:

> Is there a format of the ‘:digraphs’ command that lets you list only
> custom user-defined digraphs - i.e. those that are different from the
> defaults..?
>
> Couldn't find such a thing in Vim 7.2..
>
> If there isn't, something like ‘:dig!’ would be nice..

Here is a patch, that makes :dig! display only user-defined digraphs and
:dig! xy remove the digraph, that is defined by the chars xy

This sounds like a useful addition.

regards,
Christian

digraphs.diff

Boyko Bantchev

unread,
Apr 12, 2012, 6:25:48 PM4/12/12
to vim...@googlegroups.com
> Only the Windows-native versions are behind the 7.3.116 patch that's under
> discussion ............

I use both Ubuntu and Windows, and know many people who do the same.
On Windows, changing Vim to a newer compiled version is the easiest
thing to do, but the official package is indeed not very recent.
(And I, being conservative, have so far only relied on that version.
If most other people do like me – and why not, since this is the
version best promoted on Vim's download page – then this is the most
used Vim currently on Windows.)

Ubuntu, up to 10.10, appears to package Vim 7.2.330, and not the then
already current 7.3. Ubuntu 11.04 is with Vim 7.3.035 …
it appears that only 11.11 is recent enough to offer a Vim with a
version number ahead of its Windows counterpart. But, many people
avoid changing their o.s. every half year (too much of a headache),
so they, too, use an older Vim.

So, even if 'almost all' was a bit exaggerated, it was hardly totally
wrong ... Anyway, it seems that Ubuntu is currently catching up
in this respect, which is a good news if they keep doing so.

Chris Jones

unread,
Apr 12, 2012, 11:03:32 PM4/12/12
to vim...@googlegroups.com, vim-dev Mailingliste

Not sure if/when I'll be able to test it since I'm on debian and I don't
have a vim source environment set up.

Shouldn't there be a patch against the digraph.txt help file as well..
or does that work differently..?

CJ

--
SOMEBODY SET UP US THE BOMB

Tony Mechelynck

unread,
Apr 13, 2012, 2:14:00 AM4/13/12
to vim...@googlegroups.com, Boyko Bantchev
On 13/04/12 00:25, Boyko Bantchev wrote:
>> Only the Windows-native versions are behind the 7.3.116 patch that's under
>> discussion ............
>
> I use both Ubuntu and Windows, and know many people who do the same.
> On Windows, changing Vim to a newer compiled version is the easiest
> thing to do, but the official package is indeed not very recent.
> (And I, being conservative, have so far only relied on that version.
> If most other people do like me � and why not, since this is the
> version best promoted on Vim's download page � then this is the most

> used Vim currently on Windows.)
>
> Ubuntu, up to 10.10, appears to package Vim 7.2.330, and not the then
> already current 7.3. Ubuntu 11.04 is with Vim 7.3.035 �

> it appears that only 11.11 is recent enough to offer a Vim with a
> version number ahead of its Windows counterpart. But, many people
> avoid changing their o.s. every half year (too much of a headache),
> so they, too, use an older Vim.
>
> So, even if 'almost all' was a bit exaggerated, it was hardly totally
> wrong ... Anyway, it seems that Ubuntu is currently catching up
> in this respect, which is a good news if they keep doing so.
>


FTR, the Vim distributed with my current (12.1) distribution of openSUSE
Linux is 7.3.322 (minus two patches only relevant for Windows).

For Windows, the version distributed at vim.org is always the current
x.x.0 version (the current minor release with no patches), which is only
rarely recent. Like Steve said, a �Vim without Cream� distribution is
available from the Cream project on sourceforge.net. It is often
updated; its current version is 7.3.480.

For Linux, or indeed for most Unix-like systems, I recommend compiling
one's own Vim if one wants to keep up-to-date. It isn't difficult, see
http://vim.wikia.com/wiki/Getting_the_Vim_source_with_Mercurial
http://users.skynet.be/antoine.mechelynck/vim/compunix.htm
This way, of course, users can be as current as they want. (The latest
patchlevel as of this writing is 7.3.495.)

For the Mac, a non-X (Cocoa, I think) GUI is distributed by Bj�rn
Winckler under the name MacVim. IIUC, it is usually kept rather recent,
and beta �snapshots� are also available. I don't know the latest details
but they will be given you if you ask on the vim_mac list.

So I wouldn't say that �almost all� Vim users are at 7.3.0 or earlier.
I'll concede �maybe a sizable minority�. If you want to affirm more than
that, I'll ask where you get your statistics; and anyway, any user
suffering from a bug which is fixed in current versions should of course
update his Vim release (e.g. by installing the latest �Vim without
Cream� on Windows, the latest MacVim release or the latest MacVim beta
on the Mac, or by compiling his own on other Unix-like). You can know
which patches have been fixed in 7.3.001 or later by looking at
ftp://ftp.vim.org/pub/vim/patches/7.3/README


Best regards,
Tony.
--
An egg has the shortest sex-life of all: if gets laid once; it gets
eaten once. It also has to come in a box with 11 others, and the only
person who will sit on its face is its mother.

Tony Mechelynck

unread,
Apr 13, 2012, 2:31:50 AM4/13/12
to vim...@googlegroups.com
On 12/04/12 04:27, Chris Jones wrote:
[...]

> Well.. if you don't know the digraph, it's not going to be possible to
> search for it anyway.. It makes more sense to do a search on the ISO
> 10646 long descriptive name (3rd column of rfc1345). e.g. you need an
> arrow and you do a �/arrow�.. a star symbol.. �/star� etc.
[...]
In addition:

If you know the Unicode codepoint number in decimal, that is listed in
the output of the :digraphs command (not very searchable other than by
eyeball).

If you know the Unicode codepoint in decimal *or* in hex (the hex value
is how it is usually given), you can search for it in digraph.txt. It
helps to use the \< and \> word boundaries in your search pattern.

If you don't know the Unicode codepoint number, you can find it by means
of the following:
http://www.unicode.org/charts/ (charts by language or category)
http://www.unicode.org/charts/charindex.html (codepoints by name)

If you know the Unicode codepoint and there is no digraph for that
particular codepoint, see :help i_CTRL-V_digit


Best regards,
Tony.
--
Arnold's Laws of Documentation:
(1) If it should exist, it doesn't.
(2) If it does exist, it's out of date.
(3) Only documentation for useless programs transcends the
first two laws.

Bram Moolenaar

unread,
Apr 13, 2012, 5:38:19 AM4/13/12
to Christian Brabandt, vim...@googlegroups.com, vim-dev Mailingliste

Christian Brabandt wrote:

If ":dig! xy" deletes a digraph I would expect ":dig!" to delete all
user-defined digraphs. Thus have "!" mean delete.

Can we use another command to list user-defined digraphs? Perhaps
":dig ?"?

This patch would also need documentation. And a test would be good too.

--
`When any government, or any church for that matter, undertakes to say to
its subjects, "This you may not read, this you must not see, this you are
forbidden to know," the end result is tyranny and oppression no matter how
holy the motives' -- Robert A Heinlein, "If this goes on --"

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

Boyko Bantchev

unread,
Apr 13, 2012, 9:26:28 AM4/13/12
to vim...@googlegroups.com
> So I wouldn't say that “almost all” Vim users are at 7.3.0 or earlier. I'll
> concede “maybe a sizable minority”. If you want to affirm more than that,

> I'll ask where you get your statistics

I do not have any real statistics. I just doubt that most users
are willing to take the pains of frequently updating their Vim
(especially from sources, including installing/learning/using
Mercurial), or their o.s., or both. To do so, they must have a
particular, serious reason, otherwise they would just use what
they have. It is hard for me to imagine the majority of Vim users
being so unsatisfied with the editor that they are constantly in
the need for replacing it with a newer one. If I turn to be wrong
in this, I'll be really surprised.

Christian Brabandt

unread,
Apr 14, 2012, 8:28:59 AM4/14/12
to vim...@googlegroups.com, vim-dev Mailingliste
Hi Bram!

On Fr, 13 Apr 2012, Bram Moolenaar wrote:

> Can we use another command to list user-defined digraphs? Perhaps
> ":dig ?"?
>
> This patch would also need documentation. And a test would be good too.

Updated patch.
The patch introduces the following changes:
1) :dig? print only user-defined digraphs
2) :dig? <char1>[<char2>] print an exact match, if 2 chars are given,
else print all digraphs matching char1
3) :dig? Number print digraph for decimal value Number
4) :dig! clear all user-defined digraphs
5) :dig! <char1><char2> clear user-defined digraph <char1><char2>
6) documentation update
7) including a test (test85)


regards,
Christian

digraphs.diff

Bram Moolenaar

unread,
Apr 14, 2012, 8:42:00 AM4/14/12
to Christian Brabandt, vim...@googlegroups.com, vim-dev Mailingliste

Christian Brabandt wrote:

Thanks for the quick update.

We don't use ? like this in any command, but somehow it feels right. Or
would there be something better?

":dig ? Number" is OK, but this looks like it only works for user
digraps. I suppose leaving out the ? has the problem that it would look
like defining a digraph, although ":dig 12" currently gives an error.
So perhaps we can use that.

--
WOMAN: Well, 'ow did you become king then?
ARTHUR: The Lady of the Lake, [angels sing] her arm clad in the purest
shimmering samite, held aloft Excalibur from the bosom of the water
signifying by Divine Providence that I, Arthur, was to carry
Excalibur. [singing stops] That is why I am your king!
The Quest for the Holy Grail (Monty Python)

Tim Chase

unread,
Apr 14, 2012, 8:48:54 AM4/14/12
to vim...@googlegroups.com, Bram Moolenaar, Christian Brabandt
On 04/14/12 07:42, Bram Moolenaar wrote:
> We don't use ? like this in any command, but somehow it feels right.

I think it feels right because of the ":set foo?" syntax which is
the "tell me this setting, even if it's boolean". I like it.

-tim

Marvin Renich

unread,
Apr 14, 2012, 2:04:00 PM4/14/12
to vim...@googlegroups.com
* Tim Chase <v...@tim.thechases.com> [120414 08:53]:

I like :dig? a lot. However, I still think :dig! to delete is wrong and
:undig is much more consistent with :unmap and :unab. I don't think
:au! should be used a model for this.

...Marvin

Chris Jones

unread,
Apr 14, 2012, 5:31:29 PM4/14/12
to vim...@googlegroups.com
On Sat, Apr 14, 2012 at 08:42:00AM EDT, Bram Moolenaar wrote:
>
> Christian Brabandt wrote:
>
> > On Fr, 13 Apr 2012, Bram Moolenaar wrote:
> >
> > > Can we use another command to list user-defined digraphs? Perhaps
> > > ":dig ?"?
> > >
> > > This patch would also need documentation. And a test would be good too.
> >
> > Updated patch.
> > The patch introduces the following changes:
> > 1) :dig? print only user-defined digraphs
> > 2) :dig? <char1>[<char2>] print an exact match, if 2 chars are given,
> > else print all digraphs matching char1
> > 3) :dig? Number print digraph for decimal value Number
> > 4) :dig! clear all user-defined digraphs
> > 5) :dig! <char1><char2> clear user-defined digraph <char1><char2>
> > 6) documentation update
> > 7) including a test (test85)
>
> Thanks for the quick update.
>
> We don't use ? like this in any command, but somehow it feels right. Or
> would there be something better?
>
> ":dig ? Number" is OK, but this looks like it only works for user
> digraps. I suppose leaving out the ? has the problem that it would look
> like defining a digraph, although ":dig 12" currently gives an error.
> So perhaps we can use that.

So I noticed as well.. I think I was the one who originally mentioned
‘:dig!’ to list user-defined digraphs (without giving it much thought..
it was mostly for the sake of example..) and I may have had the way
‘:map’ vs. ‘:map!’.. in a mathematical sense, listing two different
subsets:

What I probably had in my mind was something along the lines of ‘:dig’
-> default digraphs vs. ‘:dig!’ -> custom digraphs.

Personally, I can't say I'm crazy about usin ‘?’ after a command because
it breaks syntax consistency, one of Vim's strong points, I think..

The same goes for using ‘!’ to clear/delete custom digraphs.

CJ

--
WE GET SIGNAL

Chris Jones

unread,
Apr 14, 2012, 5:56:19 PM4/14/12
to vim...@googlegroups.com

As to syntax consistency, rather an argument to the contrary, in fact..
since they are very different beasts: ‘foo’ is an 'option' while ‘:dig’
is a command.

Reply all
Reply to author
Forward
0 new messages