GithubHelp home page GithubHelp logo

zenith-john / evil-pinyin Goto Github PK

View Code? Open in Web Editor NEW

This project forked from laishulu/evil-pinyin

0.0 1.0 0.0 184 KB

Evil search Chinese characters by pinyin

License: GNU General Public License v3.0

Emacs Lisp 100.00%

evil-pinyin's Introduction

README

https://melpa.org/packages/evil-pinyin-badge.svg

About

提供一个 buffer local 模式 evil-pinyin-mode ,使 evil 支持通过拼音首字母搜索。 还提供了一个全局模式 global-evil-pinyin-mode 以对所有buffer生效。

Features

  1. 支持 evil-find-char ,可以通过 f/F/t/T 行内定位汉字和英文。
  2. 支持 evil-snipe, 可以通过 s/S 行内定位双汉字和双字母。
  3. 支持 /? 搜索任意长度的词组。注意: evil 的搜索模块默认使用了 Emacs 原始的实现 isearch, 需要切换成 evil 自己的实现 evil-search(evil-select-search-module 'evil-search-module 'evil-search) ,但有些包(如 doom)默认已切换。
  4. 支持多种拼音方案:简体字-全拼,常用3500简体字-全拼,简体字-双拼(小鹤,自然码, 拼音加加,微软),繁字体-全拼。
  5. 支持自定义码表。

Install

直接从 melpa 安装。

Usage

运行 evil-pinyin-mode.

Configure

范例配置:

(use-package evil-pinyin
  :init
  ;;(setq-default evil-pinyin-scheme 'simplified-xiaohe-all)
  ;;(setq-default evil-pinyin-with-search-rule 'always)

  :config
  ;;(evil-select-search-module 'evil-search-module 'evil-search)
  (global-evil-pinyin-mode))

一般变量

VariableBuffer localDescriptionDefault
evil-pinyin-schemeyes汉语拼音方案simplified-quanpin-all
evil-pinyin-with-search-ruleyes打开 /? 搜索功能‘custom.
evil-pinyin-start-patternyes搜索起始符号默认为冒号开启,即: /:hy 可以匹配“汉语”
evil-pinyin-with-punctuationyes包含符号.t

自定义码表

(setq my-char-table
      (list
       ;; A
       "YOU CHAR TABLE FOR A"
       ;; B
       "YOU CHAR TABLE FOR B"
       ;; ....
       ;; Z
       "YOU CHAR TABLE FOR Z"))
(setq-default evil-pinyin-scheme nil)
(setq-default evil-pinyin-char-table my-char-table)

Credit

部分代码来自于 evil-find-char-pinyinpinyinlib

evil-pinyin's People

Contributors

dalugm avatar laishulu avatar lyserenity avatar

Watchers

 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.