

GitHub - chrisbra/unicode.vim: A Vim plugin that provides a completion function...
source link: https://github.com/chrisbra/unicode.vim
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Unicode plugin
A Vim plugin for handling unicode and digraphs characters
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 parentheses. 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 :UnicodeSearch
command can be used to search in the unicode character table to search for a certain unicode character with a given name or value. Use the "!" attribute to query for result and have it inserted at the current cursor position.
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:
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
:UnicodeSearch - Search for specific unicode char
:UnicodeSearch! - Search for specific unicode char (and add at current cursor position)
:UnicodeName - Identify character under cursor (like ga command)
:UnicodeTable - Print Unicode Table in new window
:DownloadUnicode - Download (or update) Unicode data
:UnicodeCache - Create cache file
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)
Similar Work
vim-characterize Only supports identifying characters, no completion, no public functions, until recently did not detect combining chars correctly.
easydigraph Only supports easier digraph generation.
License & Copyright
© 2009-2020 by Christian Brabandt. The Vim License applies. See :h license
NO WARRANTY, EXPRESS OR IMPLIED. USE AT-YOUR-OWN-RISK
Recommend
-
86
Recover.vim adds a diff option when Vim finds a swap file When you open a file in Vim but it was already open in another instance or not closed properly in a past edit, Vim will warn you, but it won't show you what the difference is betw...
-
123
Introduction This plugin is used for handling column separated data with Vim. Usually those files are called csv files and use the ',' as delimiter, though sometimes they use e.g. the '|' or ';' as delimiter and there also exists fixedwi...
-
145
EnhancedDiff plugin A Vim plugin for creating better diffs (sometimes) This plugin allows you to make use of the Patience diff algorithm for generating diffs to use with Vim. This needs the git command l...
-
188
This add-on defines three company-mode backends: company-math-symbols-latex - math latex tags (by default, active only on latex math faces...
-
135
NrrwRgn plugin A Vim plugin for focussing on a selected region This plugin is inspired by the Narrowing feature of Emacs and means t...
-
130
latex-unicoder.vim A plugin to type Unicode chars in Vim, using their LaTeX names. This is a more extensive version of rtdavis22/latex2unicode. I obtained the...
-
40
vim-clang Use of clang to parse and complete C/C++ source files.
-
110
GitHub is where people build software. More than 27 million people use GitHub to discover, fork, and contribute to over 80 million projects.
-
72
README *SudoEdit.txt* Edit Files using Sudo/su Author: Christian Brabandt <[email protected]> Version: Vers 0.21 Thu, 15 Jan 2015 20:57:15 +0100 Cop...
-
82
README.md Colorizer A plugin to color colornames and codes
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK