Vim Motions provides Neovim-style window management that works across all Obsidian views. This includes a global key handler that intercepts keystrokes even when no editor is focused, allowing you to control the entire workspace with your keyboard.
Pane and split navigation
Manage your workspace layout using standard Vim window commands. The plugin supports splitting panes, navigating between them, and closing tabs using the <C-w> prefix.
Workspace navigation
Navigate Obsidian panes, tabs, and history following Neovim conventions.
Link to original
Keybinding Description Global <C-w>h/j/k/lFocus pane left/down/up/right Yes <C-w>vSplit vertical Yes <C-w>sSplit horizontal Yes <C-w>c/<C-w>qClose current tab Yes <C-w>oClose all other tabs Yes gt/gTNext/previous tab Yes NgtGo to Nth tab (e.g., 3gtgoes to tab 3)Yes g<C-t>Go to tab by number (e.g., 3g<C-t>goes to tab 3)— H/LPrevious/next tab (non-editor views only) Yes Ctrl-o/Ctrl-iNavigate back/forward in history (non-editor views) Yes gdGo to definition — open the link under the cursor — gDOpen link under cursor in a new tab — <C-w>gdOpen link under cursor in a horizontal split — <C-w>gDOpen link under cursor in a vertical split — gxOpen URL under cursor in browser — gfOpen file switcher (quick open) — grnRename current note — grrShow backlinks to current note — graShow context-aware actions for cursor position — gOOpen document outline (searchable heading list) — g<C-g>Show document statistics (words, lines, characters) — gp/gPPaste and move cursor past pasted text — gaShow character info under cursor (codepoint, hex) — g;/g,Jump to older/newer change position — zaToggle fold at cursor — zc/zoFold / unfold at cursor — zO/zC/zARecursive fold open/close/toggle — zM/zRFold all / unfold all —
The <C-w> prefix allows for intuitive movement between splits. Use <C-w>h, <C-w>j, <C-w>k, and <C-w>l to move focus to the left, bottom, top, or right pane respectively.
Control-W Conflict
Obsidian’s default Close current tab hotkey is bound to
Ctrl+W. You must unbind it in Settings → Hotkeys (search for “Close current tab”) for the<C-w>prefix commands to work. Once unbound, you can close tabs using:q,:quit,<C-w>c, or<C-w>q.
Go-to-definition
Navigate your notes by following links with Vim commands. These commands use Obsidian’s internal link resolver to find the target file.
gd: Follow the link under the cursor in the current pane.gD: Open the link under the cursor in a new tab.<C-w>gd: Open the link under the cursor in a horizontal split.<C-w>gD: Open the link under the cursor in a vertical split.
Document commands
Vim Motions adds several document-level commands for quick access to Obsidian features:
gO: Open the document outline (symbols).g<C-g>: Show document statistics (word count, character count).ga: Show information about the character under the cursor.gpandgP: Paste and move cursor past pasted text.grn: Rename the current file.grr: Show backlinks for the current file.gra: Show context actions (code actions).
Folds
Control Markdown folding with standard Vim fold commands:
za: Toggle the fold at the current line.zc: Close the fold at the current line.zo: Open the fold at the current line.zO,zC,zA: Functionally equivalent to their non-recursive counterparts in Obsidian’s flat heading structure.zM: Close all folds in the document.zR: Open all folds in the document.
Non-editor view support
The global key handler extends Vim control to non-editor views like PDFs, the graph view, canvas, and the file explorer.
Global Key Handler
When no editor is focused, the global key handler intercepts workspace-relevant keystrokes. If an editor is focused, events propagate to the Vim engine normally.
Scrolling
You can scroll through any scrollable view using standard Vim keys:
jandk: Scroll down or up by a few lines.ggandG: Jump to the top or bottom of the view.Ctrl-uandCtrl-d: Scroll up or down by half a page.Ctrl-bandCtrl-f: Scroll up or down by a full page.
Scrolling Hotkey Conflicts
Obsidian’s default hotkeys for
Ctrl-d(delete paragraph),Ctrl-f(search), andCtrl-b(toggle bold/sidebar) intercept these keys before the plugin can see them. To use these for scrolling, you must unbind the conflicting hotkeys in Settings → Hotkeys.
Standalone Ex Command Line
Pressing : in a non-editor view opens a standalone command modal. This modal supports globally-safe Ex commands like :q, :wq, :e, and :sp.
Non-editor view bindings
Navigate and interact with non-editor views like PDFs, graphs, and canvases.
Keybinding Description fShow hint labels, activate target (click/focus/navigate) FShow hint labels, open target in new pane yfShow hint labels, yank target URL or text to clipboard dfShow hint labels, close target tab or pane NfActivate N targets sequentially (e.g., 3factivates 3)j/kScroll down/up one line Nj/NkScroll N lines (e.g., 5jscrolls 5 lines down)ggScroll to top GScroll to bottom Ctrl-d/Ctrl-uScroll half page down/up Ctrl-f/Ctrl-bScroll full page down/up All non-editor bindings can be customized via
Link to originalgmap,gnoremap, andgunmapin your.obsidian.vimrc. Use:gmapto list all active global bindings. See vimrc > Global key mappings for syntax.
Customizing global bindings
All non-editor key bindings can be customized via .obsidian.init.lua or .obsidian.vimrc. These commands define, override, or remove key bindings that work outside the editor.
-- Add a new binding in Lua
vim.keymap.set("n", "<leader>f", ":obcommand switcher:open", { desc = "Open file" })" Or via vimrc:
gmap <leader>f :obcommand switcher:open
" Override a default binding
gmap H :obcommand app:go-back
" Remove a default binding entirely
gunmap LThe right-hand side supports :obcommand <id> for Obsidian commands and :<ex-command> for global ex commands (:sidebar, :split, :grep, etc.).
Use :gmap in the ex command line to list all active global bindings with their source (default or user).
The non-editor which-key overlay shows available completions when a partial key sequence is pending (e.g., pressing <C-w> shows all window commands). Label your bindings with the desc option in Lua or gwhichkeylabel and gwhichkeygroup in vimrc. See lua-config or vimrc > Global key mappings for full syntax.
Configuration
Workspace navigation is enabled by default. You can toggle it or configure it through the following methods:
- Settings: Toggle via Settings → Vim Motions → Workspace navigation.
- Lua: Add
vim.opt.workspacenav = trueto your.obsidian.init.lua. - Vimrc: Add
set workspacenavto your.obsidian.vimrc.
See known-limitations > Workspace & hint mode for detailed technical limitations.