Search code examples
vimunicodeneovimdigraphs

How to enter digraph mode permanently in vim/neovim


I want to enter digraph mode Ctrl+k permanently, so that i can type multiple digraphs at once, forexample typing a sentence in greek letters. or typing multiple languages, like japanese, chinese, greek, etc. without changing input language.

How can I do that?

Related

The only related answer on stackoverflow is this: multiple digraphs in vim which doesn't answer the question.


Solution

  • You could try this plugin, though I haven't used it myself: https://github.com/potamides/painless-digraph

    What I have in my config for Japanese in particular is this "keymap" file: ~/.vim/keymap/kana.vim. With this in my config, invoking :set keymap=kana will activate this mode and let me write ひらがな and かたかな with their digraphs. I don't know where you could find other language-specific ones, but you could google for "vim keymap" and/or learn more from :help mbyte-keymap