Interactive digraphs

In a previous discussion about Vim-style digraphs:

vxid posted a link to a C program that can be used to convert text digraphs through a pipe. Aside from this link, there has been little progress on interactive digraphs for Kakoune.

Here is a plugin that tries to address this issue:

The plugin provides vim-like digraphs, but with improvements:

  • 81 new symbols (including currency symbols and useful math/tech symbols such as Planck’s constant) are included, which brings the total of available symbols to 1305

  • digraphs can be searched in Insert mode by digraph, unicode description, or hex value, and results are displayed along with their digraph and unicode point

  • digraph conversion in Insert mode has the possibility of reinserting the last inserted symbol, of appending a postfix after the insertion, and of converting the last-typed word instead of the last-typed character pair

  • a dig command, available in Normal mode, sweeps over the selection and converts each digraph in it to the corresponding symbol.

The README on GitHub gives more details and has a few examples of converted text.

4 Likes

Hi & thanks for this plugin!

One note about README/installation instructions: it looks like that e.g. the following works if you put it into your kakrc & if you use plug.kak (thus no need for manual installation nor extra directories):

plug "ftonneau/digraphs.kak" %{
        set-option global digraphs_path 'plugins/digraphs.kak'
        digraphs-enable-on <F5> <F6>
}