Coder Social home page Coder Social logo

kana's Introduction

kana

https://melpa.org/packages/kana-badge.svg

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:

melpa

It’s available on Melpa :

M-x package-install kana

ues-package

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

Spacemacs

Add kana into dotspacemacs-additional-packages in init.el

dotspacemacs-additional-packages '(kana)

Restart Spacemacs.

Doom Emacs

Add the following line to package.el

(package! kana)

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

Quick Start

M-x kana

or

M-x kana-jump

Notes: If you found the font is very small, it is because your default fontset is not configured correctly for charsets. You have two options:

  1. Setup the default fontset. I use the following configurations to setup charsets, and the font is Sarasa Mono SC font. Note that this will set all related charsets in Emacs.
    (set-fontset-font (frame-parameter nil 'font) 'cjk-misc (font-spec :family "Sarasa Mono SC"))
    (set-fontset-font (frame-parameter nil 'font) 'bopomofo (font-spec :family "Sarasa Mono SC"))
    (set-fontset-font (frame-parameter nil 'font) 'han (font-spec :family "Sarasa Mono SC"))
    (set-fontset-font (frame-parameter nil 'font) 'kana (font-spec :family "Sarasa Mono SC"))
        
  2. Add a new fontset, configure it with set-fontset-font and setq kana-fontset to it.

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.

kana's People

Contributors

chenyanming avatar squiter avatar syohex avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.