English Word Boundaries

approvedunreviewed

by Adi Ron

Treat apostrophes inside words (can't, won't) as part of the word when deleting or moving by word.

↓ 22 downloadsUpdated 18d ago0BSD

English Word Boundaries

By default, Obsidian will treat punctuation as word boundaries, including apostrophes (often used as single quotes) in the middle of words. However as the English language has some apostrophes in the middle of words (can't, won't) which means that if you're navigating by word or deleting an "entire word", these would count as three words, rather than one.

This is a plugin which fixes this.

  • Delete word (Option+Backspace on macOS, Ctrl+Backspace elsewhere) removes "can't" in one keypress instead of three.
  • Move by word (Option+Left/Right on macOS, Ctrl+Left/Right elsewhere, plus Shift to select) moves over can't without stopping at the apostrophe.

Both straight (') and curly (’) apostrophes are handled. When no apostrophe is involved, Obsidian's own word deletion and motion run unchanged.

One known limitation: apostrophes at the edge of a word (e.g. the dogs' breakfast) cannot be easily distinguished from a single quote, so they are exempt from this and will count as two words instead. This applies to the beginning of a word as well but is not a big problem for the English language (unless you type 'Nduja or 's Gravenhage a lot I suppose)

Development

The usual:

npm install
npm run dev     # watch build
npm test
npm run lint
npm run build   # production main.js

Manual install

Copy main.js and manifest.json to <Vault>/.obsidian/plugins/english-word-boundaries/ and enable the plugin in Community Plugins. You may need to refresh the list or restart Obsidian.

For plugin developers

Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.