Skip to content

tonyfettes/coc-rime

Repository files navigation

coc-rime

pre-commit.ci status github/workflow

Rime input method integration of coc.nvim

This extension is created by create-coc-extension

screenshot

screencast

Dependencies

# Ubuntu
sudo apt-get -y install pkg-config librime-dev librime1
sudo apt-mark auto librime-dev pkg-config
# ArchLinux
sudo pacman -S pkg-config librime
# Android Termux
apt-get -y install pkg-config librime
# Nix
# without any extra operation
# homebrew
brew tap tonyfettes/homebrew-rime
brew install pkg-config librime
# Windows msys2
pacboy -S --noconfirm pkg-config:x librime:x gcc:x

Install

" command line
CocInstall coc-rime
" or add the following code to your vimrc
let g:coc_global_extensions = ['coc-rime', 'other coc-plugins']

Commands

  1. rime.source.enable: enable this source temporarily.
  2. rime.source.disable: disable this source temporarily.
  3. rime.source.toggle: temporarily toggle the status of the source.
  4. rime.enable: enable this IME temporarily.
  5. rime.disable: disable this IME temporarily.
  6. rime.toggle: toggle this IME temporarily.

Lists

You could use CocList to switch between schema.

:CocList rime_schema

User Configuration

  1. rime.enabled: Whether to enable this source.
  2. rime.priority: The priority of this completion source.
  3. rime.schemaId: The schemaId selected when coc-rime start. You could get it from rime_schema list.
  4. rime.priority: Priority of Rime completion source
  5. rime.traits.shared_data_dir: Path(s) where rime data stores
  6. rime.traits.user_data_dir: Path(s) where rime configuration stores
  7. rime.traits.*: More rime traits
  8. rime.ui.*: The symbols used for IME UI

Limitations

  • It will break all imap <Buffer> created by other plugins, such as vim-peekaboo's <C-R>.

License

MIT

Related Projects

IM for vim

Pure vim

  • VimIM: Stop maintenance

本项目希望为不可能使用输入法的环境中提供必要的中文支持:

  • 文本终端。例如在构建 Linux 时添加 cjktty-patches 可以在文本终端显示中文,但在不使用 fbterm 时缺乏输入中文的方法。
  • Android 。受限于 Android 权限机制,不可能在 termux 中获取输入法 APP 的状态以实现:
    • 退出插入模式时恢复英文输入模式
    • 进入插入模式时恢复上一次退出插入模式时的中、英文输入模式

Rime frontends

See here.