Eng | 中文
Allow to search with pinyin without diacritical marks in pinyin text. With few characters you will find all variants.
Emacs Isearch "submode" that replace isearch-regexp-function to generate regex for search.
For example: to find "Shànghǎi" and "上海" in text you just type: C-s shanghai.
pinyin-isearch.el
├─ pinyin-isearch-pinyin.el (→ pinyin-isearch-loaders.el)
├─ pinyin-isearch-chars.el (→ pinyin-isearch-loaders.el)
└─ pinyin-isearch-loaders.el
- should not conflict with other isearch modes
- fix isearch jumping without return.
- fallback to search for normal latin text if strict mode is not enabled.
- search from the first character entered.
- punctulation Chinese search with ascii charactes: .,[]<>()$-"` and much more.
- accurate dissasemble to all possible variants.
- white spaces are ignored between syllables
- tone or diacritical mark required only in first syllable in text: Zhēn de ma
- Add to
~/.emacs
(require 'package)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
(add-to-list 'package-archives '("melpa-stable" . "https://stable.melpa.org/packages/") t)
(package-initialize)- Install via
M-x package-install RET cui RET~ or ~M-x package-list-packages
-
git clone https://repo/user/pinyin-isearch -
Add to
~/.emacs
(add-to-list 'load-path "/path-to/pinyin-isearch/")
(require 'pinyin-isearch)
(pinyin-isearch--load) ;; force loading (optional) before modeAfter C-s/r in isearch mode:
M-s pto activate pinyin isearch submode.M-s hto activate Chinese characters isearch submode.M-s sto activate strict Chinese characters isearch submode.M-s rto activate standard search.
or with M-x pinyin-isearch-forward/backward
You can set this mode by default per file with:
;-*- mode: pinyin-isearch; -*-
M-x customize-group pinyin-isearch
- Upperacase for pinyin.
- Cangjie search
