Grich Hiranyaphinant73 downloadsPrecise word deletion for Thai and Japanese — fixes Option+Backspace so it deletes one word at a time instead of the entire sentence.
An Obsidian plugin that fixes Option+Backspace (delete word) for Thai and Japanese text.
In English, Option+Backspace deletes one word at a time — stopping at spaces and punctuation. That works because English separates words with spaces.
Thai and Japanese don't. Words run together with no spaces between them, so Obsidian's default behaviour treats an entire sentence (up to the last space) as a single "word" and deletes all of it. One keypress, entire sentence gone.
Google Docs and Microsoft Word handle this correctly because they use language-aware word segmentation. Obsidian (built on CodeMirror) doesn't — so this plugin fixes it.
Word Scalpel intercepts Option+Backspace and, when the cursor is positioned after Thai or Japanese text, uses the browser's built-in Intl.Segmenter API to find the correct word boundary. One keypress deletes exactly one word.
For English and other space-delimited languages, the default Obsidian behaviour is unchanged.
| Script | Example |
|---|---|
| Thai | สวัสดี |
| Japanese Hiragana | こんにちは |
| Japanese Katakana | コンピュータ |
| Japanese Kanji | 日本語 |
main.js, manifest.json, and styles.css from the latest release.obsidian/plugins/word-scalpel/ in your vaultThe plugin registers a CodeMirror 6 extension that intercepts Alt-Backspace with the highest priority. When triggered:
Intl.Segmenter with the appropriate locale (th or ja) to find word boundaries in the current lineGrich Hiranyaphinant — GitHub
MIT