Search...Search plugins and themes...
⌘K
Sign in
  • Get started
  • Download
  • Pricing
  • Enterprise
  • Account
  • Obsidian
  • Overview
  • Sync
  • Publish
  • Canvas
  • Mobile
  • Web Clipper
  • CLI
  • Learn
  • Help
  • Developers
  • Changelog
  • About
  • Roadmap
  • Blog
  • Resources
  • System status
  • License overview
  • Terms of service
  • Privacy policy
  • Security
  • Community
  • Plugins
  • Themes
  • Discord
  • Forum / 中文论坛
  • Merch store
  • Brand guidelines
Follow us
DiscordTwitterBlueskyThreadsMastodonYouTubeGitHub
© 2026 Obsidian

Vim Multibyte Char Search

anselmwanganselmwang4k downloads

Search multibyte characters by the first character of corresponding ASCII encoding of input method. For example, for Chinese, search by the first character of Pinyin.

Add to Obsidian
  • Overview
  • Scorecard
  • Updates4

This is an obsidian plugin. It supports search multibyte characters in VIM easily. VIM is best to operate under english input mode, to search for multibyte characters like Chinese, users have to switch back and forth between input modes.

To simplify the process, this plugin allows users to search multibyte character by the first characters of corresponding input method encoding of the multibyte characters.

For example, in the Chinese pinyin input method, the encoding of "用来" is "yong lai", we can search such chinese words by "yl".

Installation

The plugin requires VIM mode being turned on in Obsidian. Then you can install this plugin by searching "Vim Multibyte Char Search" in Obsidian "Community Plugin" tab.

Usage

  • Run "Search Multibytes" command.
  • If you want to search for "用来", type "yl" and press Enter.
  • Press n to trigger search

Advanced Usage

To achieve the best experience, we'd better install "obsidian-vimrc-support" plugin and add following lines to the .obsidian.vimrc.

unmap <Space>
exmap enrich_vim_search_pattern obcommand obsidian-vim-multibyte-char-search:enrich-current-vim-search-pattern
exmap search_multibytes obcommand obsidian-vim-multibyte-char-search:search-multibytes
nmap <Space>n :enrich_vim_search_pattern
nmap <Space>/ :search_multibytes

Then we can trigger "Search Multibytes" command by <Space>/.

Search single byte pattern first then switch to multibyte pattern

Another way to use the plugin is the search single byte pattern first and then switch to multibyte pattern. Such way may introduce some inconvenience. For example, if you want to search "吃了", the pattern is "cl" and will match with english word "class" first.

  • Type "/yl" or "?yl"
  • Press <space> n n
    • The first part of the key sequence is <space> n. According to our above configuration in .obsidian.vimrc , this key sequence will trigger command "Enrich Current VIM Search Pattern". The command retrieves current search pattern "yl", and tries to rewrite it according to all chinese phrases in current editor whose input method encoding starts from "yl". In this example, there are 2 chinese phrases "用来" and "原来", so the search pattern is rewritten to regular expression 用来|原来.
    • Then the second n again to search using the new regular expression.
  • Continue type "n" or "N" to jump to previous or next match, just as normal vim search.

.

Onboard new language

The search capability is based on dictionary. "用来" is mapped to "yl" because following lines in pinyin_search.dict.txt.

用 y
来 l

The dictionary support multiple encoding for same character. For example, following lines mean "给" can start with either "g" or "j". so "给予" will match search pattern "gy" or "jy".

给 gj
予 y

To onboard any new language, just create a pinying_search.dict.txt for your language and replace the current one.

Acknowledgement

The plugin is an Obsidian ported version of GitHub - ppwwyyxx/vim-PinyinSearch: help vim search Chinese by Pinyin. ppwwyyxx generously allows me to use the same algorithm.

I learn how to work with CodeMirror editor from esm7's great plugin esm7/obsidian-vimrc-support: A plugin for the Obsidian.md note-taking software.

64%
HealthFair
ReviewCaution
About
Search multibyte characters in Vim mode without switching input methods by typing the initial letters of their input-method encoding (e.g., pinyin "yl" for "用来"). Run the Search Multibytes command to convert initials into multibyte search patterns and jump through matches.
VimSearchCommands
Details
Current version
1.0.3
Last updated
4 years ago
Created
4 years ago
Updates
4 releases
Downloads
4k
Compatible with
Obsidian 0.12.0+
Platforms
Desktop, Mobile
License
MIT
Report bugRequest featureReport plugin
Author
anselmwanganselmwang
github.com/anselmwang
GitHubanselmwang
  1. Community
  2. Plugins
  3. Vim
  4. Vim Multibyte Char Search

Related plugins

Quick Switcher++

Enhanced Quick Switcher, search open panels, and symbols.

Quiet Outline

Make outline quiet and more powerful, including no-auto-expand, rendering heading as Markdown, and search support.

Vimrc Support

Auto-load a startup file with Vim commands.

Omnisearch

Intelligent search for your notes, PDFs, and OCR for images.

Smart Connections

AI link discovery copilot. See related notes as you write. Lookup using semantic (vector) search across your vault. Zero-setup local model for embeddings, no API keys, private.

Commander

Customize your workspace by adding commands everywhere, create macros and supercharge your mobile toolbar.

Creases

Tools for effectively folding Markdown sections.

Simplified Chinese Word Splitting

Adds Simplified Chinese word splitting support for the editor and Vim mode.

Helix Keybindings

Use Helix key bindings when editing.

Note Toolbar

Add customizable toolbars to your notes.