All Projects → merrickluo → Liberime

merrickluo / Liberime

Licence: gpl-3.0
A emacs dynamic module provide librime bindings for emacs

Programming Languages

c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to Liberime

Emacs Rime
RIME ㄓ in Emacs
Stars: ✭ 229 (+377.08%)
Mutual labels:  input-method, emacs
Emacs Smart Input Source
Less manual switch for native or OS input source (input method).
Stars: ✭ 130 (+170.83%)
Mutual labels:  input-method, emacs
Org Reverse Datetree
Reversed date trees for Emacs Org mode
Stars: ✭ 33 (-31.25%)
Mutual labels:  emacs
Mix Format.el
Emacs package to format Elixir code in Emacs with elixir-mode
Stars: ✭ 46 (-4.17%)
Mutual labels:  emacs
Fix Word
Transform words in Emacs (upcase, downcase, capitalize, etc.)
Stars: ✭ 39 (-18.75%)
Mutual labels:  emacs
Sublime Text Imfix
Fix Sublime Text 3 Input method problem (CJK words) under Ubuntu
Stars: ✭ 969 (+1918.75%)
Mutual labels:  input-method
0xc
Easy base conversion in emacs
Stars: ✭ 42 (-12.5%)
Mutual labels:  emacs
Coldnew Emacs
coldnew's emacs config
Stars: ✭ 32 (-33.33%)
Mutual labels:  emacs
Emacs Async Await
Async/Await for Emacs
Stars: ✭ 47 (-2.08%)
Mutual labels:  emacs
Swim
A command line tool to switch the current input method by identifier for macOS.
Stars: ✭ 39 (-18.75%)
Mutual labels:  input-method
Cfrs
Child Frame Read String
Stars: ✭ 46 (-4.17%)
Mutual labels:  emacs
Grugru
Rotate text at point in Emacs.
Stars: ✭ 39 (-18.75%)
Mutual labels:  emacs
Organic
Outliner, organizer and notes management app.
Stars: ✭ 34 (-29.17%)
Mutual labels:  emacs
Etrace
Emacs Lisp Latency Tracing for the Chromium Catapult Trace Event Format
Stars: ✭ 45 (-6.25%)
Mutual labels:  emacs
Homebrew Emacs Plus
Emacs Plus formulae for the Homebrew package manager
Stars: ✭ 965 (+1910.42%)
Mutual labels:  emacs
.emacs.d
My emacs configuration, written as literate elisp
Stars: ✭ 46 (-4.17%)
Mutual labels:  emacs
Elegant Emacs
A very minimal but elegant emacs (I think)
Stars: ✭ 961 (+1902.08%)
Mutual labels:  emacs
Scimex
一个macOS简体中文输入法的插件
Stars: ✭ 35 (-27.08%)
Mutual labels:  input-method
Avim
Vietnamese input method extension (IME) for Firefox, Thunderbird, SeaMonkey, Komodo, etc. — bộ gõ tiếng Việt dành cho Firefox, Thunderbird, SeaMonkey, Komodo, …
Stars: ✭ 41 (-14.58%)
Mutual labels:  input-method
Intero
Stars: ✭ 1,042 (+2070.83%)
Mutual labels:  emacs

#+TITLE: liberime [开发中]

  • 简介

liberime 是一个 Emacs 动态模块,提供了 librime 库绑定。目前只实现了几 个方法,理想情况是暴露所有 librime 的 API 到 emacs-lisp.

  • 依赖 ** 依赖说明
  1. Emacs 需要启用动态模块支持,一般是在编译的时候使用 --with-modules 选项。
  2. librime 版本 > 1.3.2

** Windows 系统下使用 msys2 安装依赖 #+BEGIN_SRC shell pacman -Sy --overwrite "*" --needed base-devel zip
${MINGW_PACKAGE_PREFIX}-gcc
${MINGW_PACKAGE_PREFIX}-librime
${MINGW_PACKAGE_PREFIX}-librime-data
${MINGW_PACKAGE_PREFIX}-rime-wubi
${PACKAGE_PREFIX}-rime-emoji
${MINGW_PACKAGE_PREFIX}-rime-double-pinyin #+END_SRC

将 opencc 包自带的文件链接到 rime-data/opencc 目录下,解决无法输入 简体中文的问题。

#+BEGIN_SRC shell ln -s ${MINGW_PREFIX}/share/opencc/* ${MINGW_PREFIX}/share/rime-data/opencc #+END_SRC

  • 编译 ** Linux 系统下编译 liberime:

    #+BEGIN_SRC shell export EMACS_MAJOR_VERSION = 26 # 按实际情况更改 make #+END_SRC

** Mac (Darwin) 系统下编译 liberime:

  1. Mac 下编译 librime, 需要安装 Xcode (good luck), 可以参考: [[https://github.com/rime/librime/blob/master/README-mac.md]]

  2. 环境变量 RIME_PATH 的取值设置为 librime 所在的目录,比如: #+begin_src shell export RIME_PATH=~/Develop/others/librime #+end_src

  3. 编译 liberime:

    #+BEGIN_SRC shell export EMACS_MAJOR_VERSION = 26 # 按实际情况更改 make #+END_SRC

** Windows 系统下使用 msys2 编译 liberime

  1. 打开 MSYS2 MinGW 终端

  2. 切换到 liberime 所在的目录

  3. 运行下面的命令

    #+BEGIN_SRC shell export EMACS_MAJOR_VERSION = 26 # 按实际情况更改 make #+END_SRC

  • 使用 ** Emacs 配置 #+BEGIN_SRC emacs-lisp (require 'pyim) (require 'liberime nil t) (setq default-input-method "pyim") (with-eval-after-load "liberime" (liberime-try-select-schema "luna_pinyin_simp") (setq pyim-default-scheme 'rime-quanpin)) #+END_SRC

用户也可以通过 Rime 配置文件 (默认为:~/.emacs.d/rime/default.custom.yaml) 来设置默认 schema,设置方式可以参考: https://gist.github.com/merrickluo/553f39c131d0eb717cd59f72c9d4b60d

注意事项:

  1. 一般情况下,liberime 和 [[https://github.com/tumashu/pyim][pyim]] 配合使用
  2. 默认情况下,liberime 会自动搜索 rime 共享数据目录(shared_data_dir)和 rime 用户数据目录(user_data_dir), 用户也可以使用下面两个变量强制设置:
    1. liberime-shared-data-dir
    2. liberime-user-data-dir
  3. Window 用户不要将 shared_data_dir 设置为小狼毫的 data 目录,因为小 狼毫自带的 OpenCC 文件无法用于 msys2 编译的 liberime, 会出现无法输 入简体中文的问题。

*** 加载时自动编译 #+BEGIN_SRC emacs-lisp (let ((liberime-auto-build t)) (require 'liberime nil t)) #+END_SRC

** 部署 Rime

手动修改 librime 配置后,可以调用 (liberime-deploy) 重新部署。

** 同步 Rime 词库 使用 liberime 存在词库跟系统输入法不一致的问题,可以使用 rime 词库同步 功能来变相的解决。

  1. 设置 sync_dir 目录 (默认修改 $HOME/.emacs.d/rime/installation.yaml 文件)
  2. 运行 liberime-sync 函数,比如:将其加入 after-init-hook 中。 #+begin_src emacs-lisp (add-hook 'after-init-hook #'liberime-sync) #+end_src

Rime 同步功能的其它信息可以参考:[[https://github.com/rime/home/wiki/UserGuide#%E5%90%8C%E6%AD%A5%E7%94%A8%E6%88%B6%E8%B3%87%E6%96%99][Rime 同步用户资料]]。

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].