Skip to content
README 4.12 KiB
Newer Older
* COMMENT -*- mode: org -*-
#+Date: 2019-09-01
Yuanle Song's avatar
Yuanle Song committed
Time-stamp: <2020-02-21>

* zero-el

Yuanle Song's avatar
Yuanle Song committed
[[http://www.melpa.org/#/zero-input][file:http://www.melpa.org/packages/zero-input-badge.svg]]
[[https://stable.melpa.org/#/zero-input][file:https://stable.melpa.org/packages/zero-input-badge.svg]]
Yuanle Song's avatar
Yuanle Song committed
[[https://travis-ci.org/sylecn/zero-el][file:https://travis-ci.org/sylecn/zero-el.svg]]
zero-el provides zero-input-pinyin, an Emacs pinyin input method for Chinese
and zero-input-framework, which is an emacs Chinese input method framework.
* An introduction to zero-el, including how to install and config zero-el.
https://blog.emacsos.com/zero-el.html

Yuanle Song's avatar
Yuanle Song committed
For user configurable variables, see
M-x customize-group zero-input
M-x customize-group zero-input-pinyin

* Zero Pinyin Usage
- Enable zero-input minor mode in emacs buffer.
  M-x zero-input-mode

  You should bind a global hotkey for this function for easier switch, e.g.
  (global-set-key (kbd "<f1>") 'zero-input-mode)

- Type pinyin string, for example, "zhongwen", zero will show candidates
  matches this pinyin string. You may choose first candidate by space. You may
  choose other candidates by digit keys. You may page down, page up by =/-
  key.

  Some notes on pinyin string,
Yuanle Song's avatar
Yuanle Song committed
  - There is no ü on US keyboard, type v instead. For example lv 绿.
  - Use ' to separate pinyin substring like xi'an 西安

* Zero Framework features
- Chinese punctuation mapping. Type the char will insert the corresponding
  Chinese punctuation when zero-input-punctuation-level is basic or full.

  | char    | punctuation |
  |---------+-------------|
  | =basic= |             |
  | ,       | ,          |
  | .       | 。          |
  | ?       | ?          |
  | \!      | !          |
  | \       | 、          |
  | :       | :          |
  | =full=  |             |
  | \_      | ——          |
  | < >     | 《 》       |
  | ( )     | ( )       |
  | [ ]     | 【 】       |
  | \^      | ……          |
  | " "     | “ ”         |
  | ' '     | ‘ ’         |
  | ~       | ~          |
  | ;       | ;          |
  | \$      | ¥          |

  You may customize punctuation mapping via
  zero-input-convert-punctuation-basic and zero-input-punctuation-full-map.
- Auto save user phrases. When you type a new phrase, it will be remembered in
  user phrase db.
- To delete system phrase or user phrase, type C-<digit> when candidate is
  shown in zero-panel.
- Auto convert Chinese period to dot for digits and English letter and digit
  mixed words. For example, to type "3.6" when zero-input-mode is on, type
  "3." will insert "3。", just continue type 6, it will be converted to
  "3.6". Same thing for "H。265" -> "H.265".
Yuanle Song's avatar
Yuanle Song committed
* Bug Report and Feature Request
Please report bugs at [[https://github.com/sylecn/zero-el/issues][github issues]]. Note that development (and melpa pkg)
still happens on gitlab repo. The github repo is an official mirror to make
reporting issue easier.

Yuanle Song's avatar
Yuanle Song committed
* Changelog
- see ./ChangeLog
- The change log include change log from all sub projects.
  - zero-input is the emacs lisp package that provide user interface for zero
    input method.
  - zero-pinyin-service offers pinyin service such as find candidates and
    saving user phrases. used by zero-pinyin.
  - zero-panel offers gtk panel to show candidates.

* File list
- zero-input.el
Yuanle Song's avatar
Yuanle Song committed

  It's a generated file for one-file package distribution. Not used for
  development.

- zero-input-framework.el
  zero input framework source code. This provides the framework and user
  interface for zero-el.
- zero-input-panel.el

  dbus client to zero-panel service.

- zero-input-pinyin-service.el

  dbus client to zero-pinyin-service.

- zero-input-pinyin.el
  Pinyin input method implemented using zero-input-framework.el
- zero-input-quickdial.el

  proof of concept of how to create an input method in emacs using minor mode.

- zero-input-reload-all.el

  zero-el development utility.

- zero-input-table.el
  serves as an example of how to use zero framework to create new input
  methods.

* License
zero-el is under Apache License 2.0

zero-input--ibus-compute-pixel-position function in zero-input-framework.el is
under GPLv3. see NOTICE file.