Skip to content

0.25.0

Choose a tag to compare

@github-actions github-actions released this 02 Jul 10:48
· 579 commits to master since this release
0.25.0
8ad43e0

Fixed

  • Vim engine settings changed via Settings UI not taking effect — changing clipboard, tabstop, shiftwidth, expandtab, insertmodeescape, insertmodeescapetimeout, or textwidth in Settings → Vim Motions → Vim engine only persisted the value to disk but did not push it to the vim engine via vim.setOption(). The setting appeared to save but had no effect until Obsidian was reloaded. The same settings worked correctly when set via .obsidian.vimrc because the vimrc loader explicitly calls vim.setOption(). Fixed by adding vim.setOption() calls to each vim engine setting's onChange handler in src/settings.ts. For clipboard and textwidth, the module-level state helpers (setClipboardOption, setTextwidth) are also called to match the vimrc loader's behavior. (#39)

Added

  • Style Settings integration — powerline status bar colors and jump label colors are now customizable via the Style Settings plugin. The styles.css file includes a /* @settings */ block exposing 12 color pickers with separate light/dark mode defaults: powerline background and text for each vim mode (normal, insert, visual, replace), EasyMotion label background/text, and hint mode label background/text. The plugin triggers parse-style-settings on load/unload so Style Settings discovers the configuration automatically. Users without Style Settings are unaffected — the existing CSS variable fallback chain (--vim-pl-*-bg → Obsidian theme variable → hardcoded fallback) continues to work identically. (#37)
  • Global workspace navigation — workspace keyboard commands (<C-w>h/j/k/l, gt/gT, H/L, :q, scroll keys, etc.) now work across ALL Obsidian views, not just markdown editors. When a non-editor view (PDF, graph, canvas, image, backlinks, etc.) is focused, a capture-phase keydown handler intercepts workspace-relevant keystrokes and dispatches them via Obsidian's command system. When a CodeMirror editor is focused, codemirror-vim handles everything as before — no regression. (#35)
    • Navigation: <C-w>h/j/k/l (focus pane), <C-w>v/s (split), <C-w>c/q (close), <C-w>o (close others), gt/gT (next/prev tab), Ngt (Nth tab), H/L (prev/next tab), Ctrl-o/Ctrl-i (history back/forward)
    • Scrolling: j/k (line scroll), gg/G (top/bottom), Ctrl-d/u (half page), Ctrl-f/b (full page), with count prefix support (5j = 5 lines)
    • Ex command line: : opens a standalone command modal with tab-completion for 34 globally-safe ex commands (:q, :wq, :e {file}, :sp, :vs, :ob {cmd}, etc.)
    • Chord display: pending keystrokes (<C-w>, g, 3) shown in status bar via setGlobalChord() on VimModeTracker
    • Sequence timeout: multi-key sequences reset after 1000ms (matches vim's timeoutlen)
    • Popout window support: handler installed on all windows via workspace.on('window-open')
    • Input suppression: keys not intercepted in text inputs, contentEditable, modals, command palette, or IME composition
    • Scroll target detection: DOM tree-walking finds the largest scrollable container in arbitrary views (same approach as obsidian-vim-keynav)
    • New file: src/workspace/global-key-handler.tsGlobalKeyHandler class with shouldIntercept(), SequenceStateMachine, scroll target detection
    • New file: src/ui/global-ex-command.tsGlobalExCommandModal extending Obsidian's SuggestModal
    • src/vim/mode-tracker.ts: added setGlobalChord(text) method for non-editor chord display
    • src/workspace/navigation.ts: exported executeCommand() for reuse by global handler
    • E2E test suite test/specs/global-nav.e2e.ts with 15 tests covering navigation, scrolling, ex commands, input suppression, sequence timeout, and no-regression
  • H/L tab switching in non-editor views — repurposes H/L (screen top/bottom in editors) for previous/next tab navigation when a non-editor view is focused, matching obsidian-vim-keynav conventions
  • Ctrl-o/Ctrl-i history navigation in non-editor views — maps to app:go-back / app:go-forward when no editor is focused (in editor context, codemirror-vim uses these for the within-file jumplist)
  • Custom vimrc file path — new setting to load vimrc from a custom vault path instead of the default .obsidian.vimrc. Useful when using Obsidian Sync, which skips dotfiles. The setting provides file-suggest autocompletion filtered to *.vimrc files in the vault. Leave empty to use the default .obsidian.vimrc. Changing the path triggers a full vimrc reload. (#34)
    • src/settings.ts: added vimrcPath: string to VimMotionsSettings interface and defaults, added vimrcPath to RELOAD_KEYS, added file-suggest text input below the "Load .obsidian.vimrc" toggle
    • src/ui/vimrc-file-suggest.ts: new file — VimrcFileSuggest extends Obsidian's AbstractInputSuggest<TFile> to autocomplete vault files ending in .vimrc
    • src/vimrc/loader.ts: getVimrcPath(), loadVimrc(), and resolveLeaderKey() accept optional customPath parameter
    • src/main.ts: passes settings.vimrcPath to loader functions
    • E2E test suite test/specs/vimrc-custom-path.e2e.ts with 7 tests covering custom path loading, default fallback, non-existent path resilience, and non-dotfile path for Sync compatibility

Changed

  • <C-w>o, :only, :qa, :xall now close ALL view types — previously filtered by getViewType() === 'markdown', leaving PDFs/images/etc. open. Now closes all tabs regardless of view type, matching Neovim behavior. Same change applied to g<C-t> (goto Nth tab) which now counts all leaves, not just markdown.

Documentation

  • KNOWN_LIMITATIONS.md: added "Global workspace navigation" section documenting Ctrl-d/f/b Obsidian hotkey prerequisite and scroll target limitations; updated "Vimrc hot-reload" section to note that vim engine settings now hot-reload via Settings UI
  • KNOWN_LIMITATIONS.md: updated "Vimrc hot-reload" section to document custom vimrc path behavior
  • README.md: updated workspace keyboard control section with global navigation commands, scrolling keys, and standalone ex command line; added hotkey unbinding note for Ctrl-d/f/b; updated Vim engine settings section to note immediate hot-reload
  • README.md: updated powerline status bar description to mention Style Settings support; updated label colors description to mention Style Settings
  • README.md: updated vimrc support section, settings list, and quality of life to document custom vimrc path setting
  • styles.css: added /* @settings */ block with Style Settings variable bindings; powerline CSS variables moved from local definitions to inline fallbacks for Style Settings compatibility

Full Changelog: 0.24.0...0.25.0