/kana

Learn Japanese kana (仮名,五十音) in emacs.

Primary LanguageEmacs LispGNU General Public License v3.0GPL-3.0

kana

Table of Contents

Description

Learn Japanese kana (仮名,五十音) in Emacs.

img/kana.gif

Install kana

Choose one of the following installation methods based on your needs:

use-package

(use-package kana
  :quelpa
  (kana :repo "chenyanming/kana" :fetcher github))

Doom Emacs

Add the following line to package

(package! kana :recipe (:host github :repo "chenyanming/kana"))

Run ./.emacs.d/bin/doom sync

Spacemacs or other emacs distributions

Put kana to your load-path. Here is example of spacemacs

git clone git@github.com:chenyanming/kana.git ~/.emacs.d/private/kana
(add-to-list 'load-path (expand-file-name "~/.emacs.d/private/kana"))
(require 'kana)

Quick Start

M-x kana

or

M-x kana-jump

Keybindings

(defvar kana-mode-map
  (let ((map (make-sparse-keymap)))
    (define-key map "v" #'kana-validate)
    (define-key map "s" #'kana-say-question)
    (define-key map "p" #'kana-previous)
    (define-key map "n" #'kana-next)
    (define-key map "t" #'kana-toggle-kana)
    (define-key map "r" #'kana-toggle-random)
    (define-key map "l" #'kana-loop-toggle)
    (define-key map "]" #'kana-loop-inc)
    (define-key map "[" #'kana-loop-dec)
    (define-key map "a" #'kana-first)
    (define-key map "j" #'kana-jump)
    (define-key map "q" #'kana-quit)
    (define-key map "d" #'kana-details)
    map)
  "Keymap for `kana-mode'.")

Features

Show the corresponding romaji and hiragana (平仮名) or katakana (片仮名)

M-x kana-validate

Say the kana

M-x kana-say-question

Currently, only mac is supported.

Toggle between hiragana (平仮名) and katakana (片仮名)

M-x kana-toggle-kana

Toggle between in random or in sequence

M-x kana-toggle-random

Toggle between loop mode or normal mode

M-x kana-loop-toggle

Increase or decrease the repeat timer in loop mode

M-x kana-loop-inc
M-x kana-loop-dec

First, Next or Previous kana

M-x kana-first
M-x kana-next
M-x kana-previous

Jump to the kana from list

M-x kana-jump

Show kana details

M-x kana-details
  1. Show stroke order using svg files provided by kanji-mode (if available). You can install kanji-mode via melpa.
  2. Show the help links (Wikipedia, Jisho, and Weblio) whose keybindings inherits from shr-map.
  3. *kana-details* will be automatically updated when *kana* updates.

img/kana-details.gif

Quit kana

M-x kana-quit

Mouse click on the kana

Jump to the corresponding Wikipedia page.