Vim Motions provides 100+ ex commands accessible via : in Normal mode. Commands cover file operations, buffer management, window splits, table manipulation, navigation actions, oil explorer, and Obsidian-specific integration.
Command reference
Ex commands
Execute commands via the
:command line, grouped by function.File and buffer
Command Description :w/:writeSave current file :update/:upSave current file (alias for :w):q/:quitClose current tab :wqSave and close :x/:xitWrite if modified and close :xa/:xallWrite if modified all and close all :e {file}/:edit {file}Open file by name in vault :e!/:edit!Revert current file to saved version :enewCreate new untitled note :saveas {file}Save current buffer as new file :find {file}/:finFind and open file by partial name match :read {file}/:rInsert file contents at cursor position :bn/:bpNext / previous tab :b {name}/:buffer {name}Switch to tab matching name :bf/:bfirstGo to first tab :bl/:blastGo to last tab :bd/:bcClose current tab :bw/:bwipeoutClose current tab :onlyClose all other tabs :qaClose all tabs :wa/:wallSave all open files Editing
Command Description :[range]m {addr}/:moveMove lines in range to target address :[range]t {addr}/:copy/:coCopy lines in range to target address :[range]norm {keys}/:normalExecute normal-mode keys from ex line :[range]normal! {keys}Execute normal-mode keys without remaps Window and tab
Command Description :sp/:splitHorizontal split :vs/:vsplitVertical split :newHorizontal split with new note :vnewVertical split with new note :tabnew/:tabeditOpen new tab (optionally with file) :tabclose/:tabcClose current tab :tabonly/:taboClose all other tabs :tabfirst/:tabrewindGo to first tab :tablast/:tablGo to last tab :tabmoveNo-op (Obsidian has no tab reorder) Table
Command Description :tableinsertInsert table :tablerowafter/:tablerowbeforeAdd row below / above :tablerowup/:tablerowdownMove row up / down :tablerowdeleteDelete row :tablecolafter/:tablecolbeforeAdd column right / left :tablecolleft/:tablecolrightMove column left / right :tablecoldeleteDelete column :tablealignleft/:tablealigncenter/:tablealignrightSet column alignment :tablerealignRealign table columns to uniform widths Navigation and search
Command Short Description :explorerReveal active file in file explorer :filesFind files by name :buffers:bufSwitch between open buffers :lsAlias for :buffers:headingsSearch all headings across vault :outlineJump to heading in current file :backlinks:backlShow files linking to current file :tagsBrowse vault tags (opens sub-picker) :recentRecently opened files :marksJump to vim marks (grouped by buffer/global) :grep {query}:greSearch vault content (pre-computed results) :livegrep:livegReal-time vault content search :resume:resReopen last picker with same query :jumpsDisplay the jump list :Picker:PickOpen meta-picker listing all sources :snippetsSearch and insert snippets :snippet name:snipInsert a snippet by name :Picker {src}Open a named picker source directly :backNavigate back in history :forwardNavigate forward in history :changesShow change list in modal Harpoon
Command Short Description :HarpoonAdd:HarpoonAPin current file to next slot :HarpoonRemove:HarpoonRRemove current file (or :HarpoonRemove Nfor slot N):HarpoonOpen harpoon picker :HarpoonSelect N:HarpoonSJump to pin slot N :HarpoonNext:HarpoonNNext pin :HarpoonPrev:HarpoonPPrevious pin Input method
Command Short Description :IMToggle:IMTToggle input method switching on/off :IMStatus:IMSShow current input method identifier Utility
Link to original
Command Description :ob {command-id}Execute any Obsidian command by ID :obList all available command IDs :commandsSearch and execute Obsidian commands :sidebar left/:sidebar rightToggle left/right sidebar :reg/:registersBrowse vim registers (paste on select) :delmarks {marks}Delete specified marks :version/:veShow plugin version :violations/:violShow runtime invariant violations :violations!/:viol!Clear invariant violation log :gmapList all active global bindings
Editing commands
:m / :move — move lines
Move the current line or a range to a target address. The address can be an
absolute line number (42), a relative offset (+2, -1), the start of the
file (0), or the end of the file ($). Example: :3,5move $ moves lines 3–5
to the end of the file.
:t / :copy / :co — copy lines
Copy the current line or a range to a target address. Address syntax matches
:move, so :10,12t 0 copies lines 10–12 to the top of the file.
:norm / :normal / :normal! — execute normal-mode keys
Run a normal-mode key sequence from the ex command line. Use :normal to honor
user mappings, or :normal! to ignore remaps. Example: :g/TODO/normal A ✅.
Obsidian integration
:ob / :obcommand — execute Obsidian commands
:ob {command-id} (or :obcommand {command-id}) executes any Obsidian command by its internal ID. Both commands are identical — obcommand is provided for compatibility with obsidian-vimrc-support. Run either command without arguments to list all available command IDs in a modal (or open the command picker when enabled).
This is the bridge between Vim’s ex command line and Obsidian’s command palette. Use it to create custom key bindings for any Obsidian command:
vim.api.nvim_create_user_command("ToggleDarkMode", function()
vim.obsidian.run_command("theme:use-dark")
end, {})
vim.keymap.set("n", "<leader>d", ":ToggleDarkMode<CR>", { desc = "Toggle dark mode" })" Or via vimrc:
exmap toggleDarkMode obcommand theme:use-dark
nmap <leader>d :toggleDarkMode<CR>Picker commands
The unified fuzzy picker provides telescope.nvim-style search across vault content. The picker uses a terminal-inspired visual presentation with monospace fonts, compact item density, and floating border titles showing the source name (e.g. “Files”), “Results”, and “Preview” on each section’s top border. All colors use Obsidian CSS variables for full theme compatibility. All picker commands are available in both editor and non-editor views.
| Command | Short | Description |
|---|---|---|
:files | Find files by name | |
:buffers | :buf | Switch between open buffers |
:commands | Search and execute Obsidian commands | |
:headings | Search all headings across vault | |
:outline | Jump to heading in current file | |
:backlinks | :backl | Show files linking to current file |
:tags | Browse vault tags (opens sub-picker with files) | |
:recent | Recently opened files | |
:marks | Jump to vim marks (editor context only) | |
:registers | :reg | Browse vim registers (paste on select) |
:grep <query> | :gre | Search vault content (pre-computed results) |
:livegrep | :liveg | Real-time vault content search |
:resume | :res | Reopen last picker with same query |
:Picker | :Pick | Open meta-picker listing all sources |
:Picker {src} | Open a named picker source directly | |
:snippets | Search and insert snippets via picker | |
:snippet name | :snip | Insert a snippet by name at cursor |
When Omnisearch, Obsidian Tasks, or Dataview is installed, additional sources are registered automatically: :Picker omnisearch, :Picker tasks, :Picker dataview. These can be disabled in Settings → Vim Motions → Picker.
Keyboard shortcuts inside picker
| Key | Action | Remappable via |
|---|---|---|
<C-n> / <C-j> | Navigate down | vim.obsidian.pick_keymap |
<C-p> / <C-k> | Navigate up | vim.obsidian.pick_keymap |
<Up> / <Down> | Navigate down/up | vim.obsidian.pick_keymap |
<Enter> | Select item | vim.obsidian.pick_keymap |
<Escape> / <C-c> | Close picker | vim.obsidian.pick_keymap |
<C-x> | Open in horizontal split | vim.obsidian.pick_keymap |
<C-v> | Open in vertical split | vim.obsidian.pick_keymap |
<C-t> | Open in new tab | vim.obsidian.pick_keymap |
<C-d> / <C-u> | Scroll preview down/up | vim.obsidian.pick_keymap |
Picker keybindings can be customized via Lua:
vim.obsidian.pick_keymap({
move_down = { 'ArrowDown', 'C-n' },
move_up = { 'ArrowUp', 'C-p' },
confirm = { 'Enter' },
split_h = { 'C-s' }, -- changed from C-x
split_v = { 'C-v' },
open_tab = { 'C-t' },
scroll_down = { 'C-d' },
scroll_up = { 'C-u' },
close = { 'Escape', 'C-c' },
})Key format: ArrowDown, ArrowUp, Enter, Escape for special keys; C-x for Ctrl+x combinations. Only specified fields are updated — omitted fields keep their defaults.
Lua API
vim.obsidian.pick('files')
vim.obsidian.pick('livegrep')
vim.obsidian.pick('grep', { query = 'search term' })
vim.obsidian.pick('resume')Leader mappings
When pickerLeaderMappings is enabled (default: on), the following bindings are registered under <leader>f:
| Key | Picker |
|---|---|
<leader>ff | Files |
<leader>fg | Live grep |
<leader>fb | Buffers |
<leader>fh | Headings |
<leader>fo | Outline |
<leader>fk | Backlinks |
<leader>ft | Tags |
<leader>fr | Recent |
<leader>fm | Marks |
<leader>fR | Registers |
<leader>fp | Resume |
:sidebar — toggle sidebars
:sidebar left and :sidebar right toggle the left and right sidebars respectively.
:explorer — reveal in file explorer
:explorer reveals the active file in the file explorer sidebar.
:grep — vault search
:grep {pattern} searches the vault for text and shows results in a modal.
:backlinks — show backlinks
:backlinks shows all backlinks to the current note in a modal.
:files — find files
:files opens the fuzzy picker for vault files.
:commands — run commands
:commands opens the fuzzy picker for Obsidian commands. Use :ob for a raw command list by ID.
:resume — resume last picker
:resume reopens the most recent picker session with the same source and query.
Navigation and action commands
Every navigation motion and workspace action has an ex command alias, enabling user remapping via :nmap key :excommand<CR> in vimrc or vim.keymap.set('n', 'key', ':excommand<CR>') in Lua.
Structural navigation
| Command | Default key | Description |
|---|---|---|
:nextheading | ]h | Jump to next heading |
:prevheading | [h | Jump to previous heading |
:nextheading1–6 | ]1–]6 | Jump to next H1–H6 |
:prevheading1–6 | [1–[6 | Jump to previous H1–H6 |
:nextlistitem | ]l | Jump to next list item |
:prevlistitem | [l | Jump to previous list item |
:nextlink | ]n | Jump to next link |
:prevlink | [n | Jump to previous link |
:nextbuffer | ]b | Switch to next buffer |
:prevbuffer | [b | Switch to previous buffer |
Table navigation
| Command | Default key | Description |
|---|---|---|
:tablenextcell | ]c | Jump to next table cell |
:tableprevcell | [c | Jump to previous cell |
:tablenextrow | ]r | Jump to next table row |
:tableprevrow | [r | Jump to previous row |
Workspace navigation
| Command | Default key | Description |
|---|---|---|
:focuspaneleft | <C-w>h | Focus left pane |
:focuspanedown | <C-w>j | Focus pane below |
:focuspaneup | <C-w>k | Focus pane above |
:focuspaneright | <C-w>l | Focus right pane |
:splitvertical | <C-w>v | Split vertically |
:splithorizontal | <C-w>s | Split horizontally |
:closetab | <C-w>c | Close current tab |
:closeothertabs | <C-w>o | Close all other tabs |
:nexttab | gt | Next tab |
:prevtab | gT | Previous tab |
:gototab | g<C-t> | Go to Nth tab |
:gotodefinition | gd | Follow link under cursor |
:gotodefinitionnewtab | gD | Follow link in new tab |
:gotodefinitionsplith | <C-w>gd | Follow link in horizontal split |
:gotodefinitionsplitv | <C-w>gD | Follow link in vertical split |
:foldclose | zc | Close fold |
:foldopen | zo | Open fold |
:foldtoggle | za | Toggle fold |
:foldall | zM | Close all folds |
:unfoldall | zR | Open all folds |
:folddelete | zd | Delete fold at cursor |
:foldeliminate | zE | Eliminate all folds |
:foldmore | zm | Fold one more heading level |
:foldless | zr | Fold one less heading level |
:documentoutline | gO | Open document outline |
:openurl | gx | Open URL under cursor |
:docstats | g<C-g> | Show document statistics |
:renamenote | <leader>rn | Rename current note |
:showbacklinks | <leader>rb | Show backlinks |
:opengotofile | gf | Open file switcher |
:contextactions | <leader>ra | Show context actions |
:charinfo | ga | Show character info |
Undo tree
| Command | Default key | Description |
|---|---|---|
:earlier N | — | Navigate N changes back |
:later N | — | Navigate N changes forward |
:earlier Ns/Nm/Nh/Nd | — | Navigate back by time |
:earlier Nf | — | Navigate to Nth save point |
:undolist | — | Show undo tree modal |
:UndoTreeToggle | — | Toggle undo tree sidebar |
:UndoTreeShow | — | Open undo tree sidebar |
:UndoTreeHide | — | Close undo tree sidebar |
Hint mode
| Command | Description |
|---|---|
:hintactivate | Activate hint labels |
:hintopennew | Hint: open in new pane |
:hintyank | Hint: yank link or text |
:hintclose | Hint: close tab or pane |
:hintcontextmenu | Hint: open context menu |
Oil explorer
| Command | Default key | Description |
|---|---|---|
:oilopen | <CR> | Open file / enter directory |
:oilopentab | <C-t> | Open file in new tab |
:oilopensv | <C-s> | Open file in vertical split |
:oilopensh | <C-h> | Open file in horizontal split |
:oilparent | - | Navigate to parent directory |
:oilroot | ~ | Navigate to vault root |
:oilrefresh | <C-l> | Refresh directory listing |
:oilclose | q, <C-c> | Close oil buffer |
:oiltogglehidden | g. | Toggle hidden files |
:oilcyclesort | gs | Cycle sort order |
:oilyankpath | y. | Yank file path to clipboard |
:oilreveal | gf | Reveal in file explorer |
:oilopenexternal | gx | Open in default app |
Global mapping commands
| Command | Description |
|---|---|
:gmap key :command | Add a global (non-editor) keybinding |
:gunmap key | Remove a global keybinding |
:gmaps | List all active global keybindings |
:gmap binds a key sequence to an ex command or Obsidian command in non-editor views (graph, PDF, canvas, etc.):
:gmap H :files
:gmap <C-w>p :obcommand workspace:previous-tab
:gunmap LThe rhs must start with : — either :command (ex command) or :obcommand command-id (Obsidian command). These commands work from both the editor : command line and the standalone non-editor : modal.
See vimrc > Global key mappings for configuring global mappings in .obsidian.vimrc, or lua-config > Global keymaps for Lua configuration via vim.obsidian.keymap.set.
Debug commands
| Command | Short | Description |
|---|---|---|
:violations | :viol | Show accumulated runtime invariant violations |
:violations! | :viol! | Clear all recorded violations |
:version | :ve | Show plugin name and version |
:violations displays the last 20 invariant violations with timestamps. These are recorded when runtime state checks detect unexpected conditions (e.g., invalid vim mode, leaked managers after unload). In normal operation, this list should be empty. Non-empty results indicate a potential bug worth reporting.
Non-editor ex command line
Pressing : in a non-editor view (PDF, graph, canvas, etc.) opens a standalone command modal with tab-completion. Only globally-safe commands are available from this modal — commands that require an active editor (:e!, :saveas, :read, :marks) show a notice when invoked.
Tab completion
Ex commands support tab-completion as you type in the : command line, matching available commands by prefix.
Configuration
Ex commands are always enabled — there is no toggle setting. The :ob command is registered independently from obsidian-vimrc-support, so both plugins can coexist.
See known-limitations > Platform for Neovim ex commands that are not applicable in Obsidian.