No description
Find a file
2026-04-18 21:18:59 +08:00
src delete some useless function 2026-04-18 21:18:59 +08:00
.editorconfig Initial version build 2026-04-16 20:49:57 +08:00
.gitignore change README.md 2026-04-18 16:01:28 +08:00
.npmrc Initial version build 2026-04-16 20:49:57 +08:00
esbuild.config.mjs Initial version build 2026-04-16 20:49:57 +08:00
eslint.config.mjs delete some useless function 2026-04-18 21:18:59 +08:00
LICENSE add license 2026-04-16 21:18:07 +08:00
manifest.json update to v1.0.1 2026-04-16 23:33:13 +08:00
package-lock.json delete some useless function 2026-04-18 21:18:59 +08:00
package.json delete some useless function 2026-04-18 21:18:59 +08:00
README.md change README.md 2026-04-18 16:01:28 +08:00
README.zh-CN.md add license 2026-04-16 21:18:07 +08:00
styles.css change repo name 2026-04-16 21:05:19 +08:00
tsconfig.json Initial version build 2026-04-16 20:49:57 +08:00

Engnese

简体中文

Engnese is an Obsidian desktop plugin for English-first pinyin completion.

It allows users to keep typing English letters in the editor while treating the current token as pinyin in the background. When a candidate is accepted, the already inserted English token is replaced in place with Chinese text.

What It Does

  • Keeps the normal English typing flow and avoids inline preedit.
  • Reads local Rime .dict.yaml dictionaries, including import_tables.
  • Falls back to the longest valid prefix when a full pinyin stream has no direct match.
  • Supports configurable candidate shortcuts and paging.
  • Supports optional double-space to accept the first candidate.
  • Avoids triggering inside fenced code blocks, inline code, and math contexts.

Examples

  • woaini -> 我爱你
  • ni + double-space ->
  • chunfengyichui -> select 春风, then continue with yichui

If a full-token match does not exist, Engnese uses the longest available prefix and leaves the remaining suffix in the editor so the next completion cycle can continue from there.

Requirements

  • Obsidian desktop
  • A local Rime dictionary file
  • Node.js and npm if building from source

The plugin is desktop-only because it reads dictionaries from the local filesystem.

Install From Source

git clone https://github.com/xXxGeorge/obsidian-engnese.git
cd obsidian-engnese
npm install
npm run build

Copy the build output into:

<vault>/.obsidian/plugins/engnese/

Required files:

  • manifest.json
  • main.js
  • styles.css

Then enable Engnese in Obsidian Community Plugins.

Development

Run the watcher:

npm run dev

Build a production bundle:

npm run build

The plugin ID is engnese, so the target plugin directory should also be named engnese.

Dictionary Path

Default path:

~/Library/Rime/rime_ice.dict.yaml

If path expansion causes issues, use an absolute path such as:

/Users/<user>/Library/Rime/rime_ice.dict.yaml

Settings

General

  • Enable plugin: turn Engnese on or off
  • Rime dictionary path: main dictionary entry file
  • Rebuild dictionary index: re-parse the configured dictionary and refresh the in-memory index

Candidate behavior

  • Double Space selects first candidate
  • Double Space timeout
  • Keep space after Double Space selection

Selection shortcuts

  • Selection keys: candidate 1
  • Select candidate 2
  • Select candidate 3
  • Select candidate 4
  • Select candidate 5
  • Previous page
  • Next page

Default shortcuts:

  • Tab: candidate 1
  • Ctrl-;: candidate 2
  • Ctrl-': candidate 3
  • Ctrl-/: candidate 4
  • Ctrl-[: candidate 5
  • Ctrl-,: previous page
  • Ctrl-.: next page

In some environments, Ctrl-[ is interpreted as Escape. If that happens, remap Select candidate 5 in plugin settings.

Context guards

  • Disable in code blocks
  • Disable in inline code
  • Disable in math

Limitations

  • The dictionary index is currently kept in memory only and is rebuilt on demand.
  • Candidate ranking is dictionary-weight based with a few simple heuristics; there is no adaptive learning yet.
  • The plugin currently targets desktop usage only.

Troubleshooting

  • Dictionary load error: verify the configured path and try an absolute path.
  • Dictionary changed but results did not update: click Rebuild dictionary index.
  • Ctrl-[ behaves like Escape: remap candidate 5 to another shortcut.
  • Double-space keeps a trailing space unexpectedly: disable Keep space after Double Space selection.

License

This project is licensed under MIT. See LICENSE.