unicode.vim : A Completion function for Unicode glyphs
| script karma
Downloaded by 1131
Comments, bugs, improvements
script versions (upload new version)
|Basically, this plugin serves 3 purposes:
1) it provides the possibility to complete characters using their Unicode Name or the Unicode Codepoint
2) It can be used to identify the character under the Cursor using the :UnicodeName command
3) It eases the use of digraphs, by providing the :Digraphs command (so one can more easily find a specific digraph).
For a screenshot, see: http://www.256bit.org/~chrisbra/vim_unicode.png
This plugin was written to enable an easier use of any Unicode glyph
available. The unicode.vim Plugin uses the data available from the Unicode
Consortium's website (http://www.unicode.org) to let you enter Unicode
characters using a completion function.
By default, the plugin creates a directory unicode below the path autoload
where this plugin is located. Within this directory it will store the file
Index.txt from http://www.unicode.org/Public/UNIDATA/Index.txt which it will
try to download using *netrw* . If this is unsuccessfull, or you do not have
|netrw| enabled, dowload the file manually and save it in the unicode
directory below the autoload directory in which unicode.vim is located.
By default the plugin is not enabled. To enable it enter
When you run this command, *unicode.vim* checks for the availability of
Index.txt from the Unicode Consortium, and if it is not available, it will try
to download it.
This will also set up the completion function |completefunc| to use for your
buffer. You can use |i_CTRL-X_CTRL-U| then to start the completion.
If you want to disable the plugin, enter
If you have enabled the plugin using |:EnableUnicodeCompletion| then there are
2 possibilities to use the plugin. You can either enter the Unicode Character
name, or enter the Unicode-Codeposition.
For example, you would like to enter Æ, so you enter AE and press <C-X><C-U>
while in insert mode. Alternatively you can enter the Unicode-Codepoint: U+C6
and press <C-X><C-U> and the popup menu will show you all characters, that
have a codepoint like C6 with leading zeros, eg. U+00C6 and U+0C66
A popup menu will appear, showing you the Unicode-Codeposition value, the
Unicode Character Name and the Unicode Character (and if you have enabled it,
it can also show you the digraph characters needed to create this character in
paranthesis, see |unicode-plugin-config| ). You can scroll down in the menu by
pressing <C-N> and up by pressing <C-P>.
The plugin can be customized to include the 2 digraph characters you have to
type, to get that character. This works only, if there is a digraph defined
for that Unicode char. If you would like this you need to set
This functionality is by default disabled, cause it seems to cause some delay
and screen-rendering errors in the menu. Enter
to disable the Digraph feature afterwards.
If you would like to specify a different URL from which to download Index.txt,
enter the URL as:
To force downloading the file from that new url, enter
If the plugin gives an error, first check, that Index.txt from the Unicode
Consortium has been successfully downloaded. It should look something like
A WITH ACUTE, LATIN CAPITAL LETTER 00C1
A WITH ACUTE, LATIN SMALL LETTER 00E1
A WITH BREVE, LATIN SMALL LETTER 0103
A WITH CARON, LATIN SMALL LETTER 01CE
A WITH CIRCUMFLEX, LATIN CAPITAL LETTER 00C2
A WITH CIRCUMFLEX, LATIN SMALL LETTER 00E2
A WITH DIAERESIS, LATIN CAPITAL LETTER 00C4
A WITH DIAERESIS, LATIN SMALL LETTER 00E4
A WITH DOT ABOVE, LATIN SMALL LETTER 0227
A WITH DOT BELOW, LATIN SMALL LETTER 1EA1
A WITH DOUBLE GRAVE, LATIN SMALL LETTER 0201
A WITH GRAVE, LATIN CAPITAL LETTER 00C0
(several thounsand lines following)
elinks is known to mangle that file and make it unusable, so please check
first if the format is right.
If the file looks correct, and the plugin is still not working correctly
contact the maintainer. You'll find his email-adress in the first line of this
document. Please be patient, it might take a while, until I can take care of
|simply source the file and the plugin will be installed automatically
And afterwards, have a look at the documentation: :h unicode.txt
Click on the package to download.
ip used for rating: 184.108.40.206