distribute my unicode plugin with vim?

76 views
Skip to first unread message

Christian Brabandt

unread,
May 20, 2016, 8:08:12 AM5/20/16
to v...@vim.org, vim-dev
Hi,
as some of you may know, I am maintaining a little unicode plugin
https://github.com/chrisbra/unicode.vim

Now I got an issue, that asks if it would be possible to distribute this
plugin with Vim, so I am asking here for feedback. Would such a plugin
or package be considered generally useful to be distributed with Vim or
should I continue to maintain it as separate plugin?

Feedback is welcome.

Here is the description of the plugin, taken from
https://github.com/chrisbra/unicode.vim/blob/master/README.md which also
contains a little screencast:

This plugin aims to make the handling of unicode and digraphs chars in
Vim easier. It serves 3 purposes:

Complete Characters
Identify Characters
Ease the use of Digraphs

Complete Characters

A custom completion function is available to complete characters using
their Unicode name or Codepoint. If a digraph exists for that character,
it will be displayed in paranthesis. Press Ctrl-X Ctrl-Z to trigger this
completion from insert mode. Also a new custom completion for digraph
chars is available. Press Ctrl-X Ctrl-G to trigger this completion. It
will display all digraphs, that are reachable from the previous typed
letter.

Identify Characters

The :UnicodeName command can be used to identify the character under the
cursor. This works similar to the builtin ga command (in fact, the help
also states a possibility to map this command to the ga builtin
command), but it also displays the digraph character (if it exists) and
the HTML entity.

The :SearchUnicode command can be used to search in the unicode
character table to search for a certain unicode character with a given
name or value.

The :UnicodeTable can be used to generate an Unicode table, including
HTML entity names and Digraph chars. The UnicodeTable will be nicely
syntax highlighted.

Ease the use of Digraphs

Use the :Digraphs command to search for an digraph with the given name
(e.g. :Digraphs copy will display all digraphs that will create a
character name which contains copy in its name). You can also search for
the decimal value. This plugin also maps the key <F4> that will allow to
transform 2 given normal chars into their digraph char.

See also the following screencast, that shows several features
available: screencast of the plugin

Installation

Use the plugin manager of your choice. Or download the stable version of
the plugin, edit it with Vim (vim unicode-XXX.vmb) and simply source it
(:so %). Restart and take a look at the help (:h unicode-plugin)
Usage

Once installed, take a look at the help at :h unicode-plugin

Here is a short overview of the functionality provided by the plugin:
Ex commands:

:Digraphs - Search for specific digraph char
:SearchUnicode - Search for specific unicode char
:UnicodeName - Identify character under cursor (like ga command)
:UnicodeTable - Print Unicode Table in new window
:DownloadUnicode - Download (or update) Unicode data

Normal mode commands:

<C-X><C-G> - Complete Digraph char
<C-X><C-Z> - Complete Unicode char
<F4> - Combine characters into digraphs

Scripting Functions:

unicode#FindUnicodeBy() - Find unicode characters
unicode#FindDigraphBy() - Find Digraph char
unicode#Digraph() - Returns digraph char
unicode#UnicodeName() - Identifies unicode character (by value)

License & Copyright

© 2009-2014 by Christian Brabandt. The Vim License applies. See :h license

NO WARRANTY, EXPRESS OR IMPLIED. USE AT-YOUR-OWN-RISK


Best,
Christian
--
Hoffentlich werden wir so alt wie wir aussehen.

Enno

unread,
May 20, 2016, 11:43:54 AM5/20/16
to vim_use, v...@vim.org, vim...@vim.org
Hello Christian,

the request on GitHub (by me) was specifically about the `:UnicodeName` command (and mapping it to `ga`) as a better alternative to the built-in `ga`.
It could come coupled with `:DownloadUnicode` to download the latest Unicode data on demand.

All other functions, while very useful, extend but do not replace existing Vim functions (for example, they set up their proper mappings such as `<leader>un`). Therefore these maybe are better supplied on demand than by default.

BPJ

unread,
May 21, 2016, 6:57:54 AM5/21/16
to vim...@googlegroups.com, v...@vim.org, vim-dev
fredag 20 maj 2016 skrev Christian Brabandt <cbl...@256bit.org>:
Hi,
as some of you may know, I am maintaining a little unicode plugin
https://github.com/chrisbra/unicode.vim

Now I got an issue, that asks if it would be possible to distribute this
plugin with Vim, so I am asking here for feedback. Would such a plugin
or package be considered generally useful to be distributed with Vim or
should I continue to maintain it as separate plugin?

Feedback is welcome.


I for one use your Unicode plugin constantly. Mostly the UnicodeName command, but also Unicode completion. I might have discovered the plugin sooner if it had been distributed with Vim, but there is no guarantee as it took me some time to discover those plugins which are distributed with Vim. However I think that the Unicode plugin deserves to be discovered and used by everyone who does multilingual text entry in Vim (I sure hope I'm not one of a very few! :-) For ordinary typing I prefer keymaps, but the plugin is very useful for writing keymaps too! One functionality which i miss or haven't found is the ability to define digraphs by hex number or Unicode name for the cases when I need to define a digraph on the fly for occasional use in a document. A while back you (Christian) showed a trick to define a digraph by hex number in a mail to this list. I immediately turned it into a command, and I think such a command would be a valuable addition to the Unicode plugin.

Christian Brabandt

unread,
May 27, 2016, 8:35:41 AM5/27/16
to vim_use, v...@vim.org, vim...@vim.org
Hi Enno!
Yeah I suppose that could be useful, although I would have to split and
refactor the existing plugin. I would only do it, once we agree it
should be distributed with Vim.

However, since most functionality builds around new custom commands, it
might make sense to distribute as package so it can be enabled on demand
by users and they can then use whatever they like.

Best,
Christian
--
Frau: Liebling, wo willst du nächstes Jahr Urlaub machen?
Mann: Am liebsten dort, wo ich noch nie war.
Frau: Ja prima, wie wär's dann mit der Küche.

Christian Brabandt

unread,
May 27, 2016, 8:37:16 AM5/27/16
to vim...@googlegroups.com, v...@vim.org, vim-dev
Thanks for the feedback. I just updated your issue on the plugin list.

Waiting for Brams opinion, whether he thinks it could be distributed
together with Vim.

Best,
Christian
--
Vom Verdienste fordert man Bescheidenheit; aber diejenigen, die
unbescheiden das Verdienst schmälern, werden mit Behagen angehört.
-- Goethe, Maximen und Reflektionen, Nr. 665
Reply all
Reply to author
Forward
0 new messages