Skip to content

Latest commit

 

History

History
135 lines (98 loc) · 3.83 KB

INSTALLATION_EN.org

File metadata and controls

135 lines (98 loc) · 3.83 KB

Emacs Rime Installation

Requirements

Emacs 26.1+ with dynamic modules support, gcc and make.

emacs-rime will build dynamic module automatically.

Install librime

Linux

ArchLinux/Manjaro

sudo pacman -S librime

Debian/Ubuntu

sudo apt install librime-dev

Check the version of librime-dev in repositiory, if it’s older than 1.5.3, you need compile it from source.

sudo apt install git build-essential cmake libboost-all-dev libgoogle-glog-dev libleveldb-dev libmarisa-dev libopencc-dev libyaml-cpp-dev libgtest-dev
git clone https://github.com/rime/librime.git ~/.emacs.d/librime
cd ~/.emacs.d/librime
make
sudo make install

Fedora

sudo dnf install librime-devel emacs-devel

openSUSE

sudo zypper install librime-devel emacs-el

MacOS

  1. First of all, make sure you have installed Squirrel, the MacOS Rime client.
  2. Then download the librime release.
  3. If you upgrade Squirrel in future, please check its CHANGELOG and upgrade librime to a matching version.
curl -L -O https://github.com/rime/librime/releases/download/1.7.1/rime-1.7.1-osx.zip
unzip rime-1.7.1-osx.zip -d ~/.emacs.d/librime
rm -rf rime-1.7.1-osx.zip

If the MacOS Gatekeeper blocks the librime executable, you can disable it temporarily with:

sudo spctl --master-disable
# later: sudo spctl --master-enable

Windows

using scoop

Install dependencies via scoop.

scoop install gcc
scoop bucket add wsw0108 https://github.com/wsw0108/scoop-bucket.git
scoop install librime

using msys2

Install dependencies via msys2.

pacman -S pactoys base-devel
pacboy -S librime:x librime-data:x emacs:x toolchain:x
ln -s /mingw64/share/opencc/* /mingw64/share/rime-data/opencc # Fix the Simplified Chinese input

Start emacs from mingw64’s environment to get the correct SHELL environment variable for building librime-emacs inside Emacs and MSYSTEM_PREFIX for specifying the rime-share-data-dir variable.

Minimal configuration

(use-package rime
  :custom
  (default-input-method "rime"))
Use Straight
(use-package rime
  :straight (rime :type git
                  :host github
                  :repo "DogLooksGood/emacs-rime"
                  :files ("*.el" "Makefile" "lib.c"))
  :custom
  (default-input-method "rime"))
Use Quelpa
(use-package rime
  :quelpa (rime :fetcher github
                :repo "DogLooksGood/emacs-rime"
                :files ("*.el" "Makefile" "lib.c"))
  :custom
  (default-input-method "rime"))

NOTE: If you are on MacOS or don’t have librime in standard path, you MUST specify rime-librime-root.

Put following in the :custom section.

(Assuming you unzip librime to ~/.emacs.d/librime)

(rime-librime-root "~/.emacs.d/librime/dist")

Activate input method

To activate Rime, use command toggle-input-method which is bound to C-\ by default.