Last active
March 27, 2017 16:40
-
-
Save acro5piano/3a76e5abcbd50baebf48f1eea8d91f2f to your computer and use it in GitHub Desktop.
ChromebookでCrouton+Emacs+Mozcで快適日本語入力 ref: http://qiita.com/acro5piano/items/0497d04577bcc3d36065
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install Emacs | |
# 面倒であれば、aptから入れても良い | |
#sudo apt-get install emacs | |
cd /usr/local/src | |
sudo wget http://ftp.jaist.ac.jp/pub/GNU/emacs/emacs-24.5.tar.gz | |
sudo tar xzvf emacs-24.5.tar.gz && sudo rm emacs-24.5.tar.gz | |
cd emacs-24.5 | |
./configure --with-x-toolkit=no --with-xpm=no --with-jpeg=no --with-gif=no --with-tiff=no | |
make | |
sudo make install | |
# Mozc本体のインストール | |
sudo apt-get install emacs-mozc | |
# mozc.elのインストール | |
# ここは環境に応じて、Package.elやCaskを使えば良い | |
mkdir -p ~/.emacs.d/lisp | |
curl https://raw.githubusercontent.com/google/mozc/master/src/unix/emacs/mozc.el > ~/.emacs.d/lisp/mozc.el | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; Add path | |
(add-to-list 'load-path "~/.emacs.d/lisp") | |
; Mozc settings | |
(require 'mozc) | |
(set-language-environment "Japanese") | |
(setq default-input-method "japanese-mozc") | |
(setq mozc-candidate-style 'overlay) | |
(defun mozc-start() | |
(interactive) | |
(message "Mozc start") | |
(mozc-mode 1)) | |
(defun mozc-end() | |
(interactive) | |
(message "Mozc end") | |
(mozc-mode -1)) | |
; C-j -> Mozc ON | |
; C-g -> Mozc OFF | |
(bind-key* ("C-j") 'mozc-start) | |
(bind-keys :map mozc-mode-map | |
("C-g" . mozc-end) | |
("C-x h" . mark-whole-buffer) | |
("M-b" . backward-word) | |
("M-f" . forward-word) | |
("C-x C-s" . save-buffer)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment