Skip to content

Instantly share code, notes, and snippets.

@bloodstiller
Last active January 31, 2026 08:45
Show Gist options
  • Select an option

  • Save bloodstiller/4dff1f91aab590ef78e2a6f4bc407e4f to your computer and use it in GitHub Desktop.

Select an option

Save bloodstiller/4dff1f91aab590ef78e2a6f4bc407e4f to your computer and use it in GitHub Desktop.
Obsidian vimrc closest approximation to doom emacs/vim

Obsidian Vimrc – Doom Emacs–Inspired Keybindings

This gist contains a custom .vimrc for Obsidian Vim mode, designed to mirror Doom Emacs / Evil style workflows as closely as possible.

The core idea is:

  • Use Space as a leader key
  • Group commands logically (buffers, windows, notes, search, toggles)
  • Optimise for fast navigation, capture, and refactoring inside Obsidian

Highlights

  • SPC w → window / pane management
  • SPC b → buffer & tab actions
  • SPC n → notes, links, daily notes, QuickAdd capture
  • SPC s → search (file-local & global via Omnisearch)
  • Doom-like quality-of-life bindings for renaming, backlinks, zen mode, and insertions

Requirements

Some mappings rely on Obsidian plugins:

  • Omnisearch
  • QuickAdd
  • Obsidian Admonitions
  • Simple Image Inserter
  • Obsidian Stille
  • Daily Notes

If a plugin isn’t installed, the related bindings can be safely removed.

Usage

Paste the contents into:

.obsidian.vimrc

Restart Obsidian (or reload Vim mode) for changes to take effect.


Built for people who miss Doom Emacs but live in Obsidian now.

" Yank to system clipboard
set clipboard=unnamed

" Space as pseudo-leader
unmap <Space>

" Open Settings
exmap oSettings obcommand app:open-settings
nmap <Space>. :oSettings<CR>

" --- Window / workspace pane commands ---

" Focus pane left / right
exmap paneLeft  obcommand editor:focus-left
nmap <Space>wh :paneLeft<CR>
exmap paneRight obcommand editor:focus-right
nmap <Space>wl :paneRight<CR>

" Close current pane
exmap paneClose obcommand workspace:close
nmap <Space>wc :paneClose<CR>

" Close all other tabs apart from focused one
exmap closeAll obcommand workspace:close-others
nmap <Space>bx :closeAll<CR>

" splits
exmap hsplit obcommand workspace:split-horizontal
nmap <Space>ws :hsplit<CR>
exmap vsplit obcommand workspace:split-vertical
nmap <Space>wv :vsplit<CR>

" Tabs
exmap nTab obcommand workspace:next-tab
nmap <Space>bp :nTab<CR>
exmap pTab obcommand workspace:previous-tab
nmap <Space>bn :pTab<CR>

" --- Notes / reference commands ---

" Insert Obsidian wiki link
nmap <Space>nri i[[ ]]<Esc>h

" Rename FIle Obsidian wiki link
exmap rFile obcommand workspace:edit-file-title
nmap <Space>rf :rFile<CR>

" --- Notes / navigation ---

" Backlinks
exmap backLinksOpen obcommand backlink:open
nmap <Space>blo :backLinksOpen<CR>

" New note
exmap newFile obcommand file-explorer:new-file
nmap <Space>nN :newFile<CR>

" New Empty Tab
exmap newTab obcommand workspace:new-tab
nmap <Space>wn :newTab<CR>

" --- Files ---

" Quick switcher
exmap quickSwitch obcommand switcher:open
nmap <Space>, :quickSwitch<CR>

" --- Search ---

" Search in current file
exmap searchFile obcommand omnisearch:show-modal-infile 
nmap <Space>sf :searchFile<CR>

" Omnisearch
exmap omniSearch obcommand omnisearch:show-modal
nmap <Space>nrf :omniSearch<CR>

" ---- UI --- 

" Toggle sidebars
exmap toggleLeft obcommand app:toggle-left-sidebar
nmap <Space>op :toggleLeft<CR>
exmap toggleRight obcommand app:toggle-right-sidebar
nmap <Space>tr :toggleRight<CR>

"----Zen/Stille
exmap toggleStille obcommand obsidian-stille:toggleStille
nmap <Space>msn :toggleStille<CR>

" Folding
"exmap foldUp obcommand editor:fold-more
"nmap <M-k> :foldUP<CR>
"exmap foldDown obcommand editor:fold-less
"nmap <M-h> :foldDown<CR>

"-----insertions
" Insert admonition
exmap iAD obcommand obsidian-admonition:insert-admonition
nmap <Space>ia :iAD<CR>

" Insert Codeblock
exmap iCode obcommand editor:insert-codeblock
nmap <Space>ic :iCode<CR>

" Insert image 
exmap iImage obcommand simple-image-inserter:image-insert 
nmap <Space>mi :iImage<CR>


"-----Quickadd Notes
" Add to inbox
exmap addInbox obcommand quickadd:choice:6a761e12-f181-4f4d-bdb7-756392956a23
nmap <Space>nni :addInbox<CR>

" Add Service
exmap addService obcommand quickadd:choice:108ce73f-9cea-44e4-91b6-518a89614e2e
nmap <Space>nns :addService<CR>

" Add Tool
exmap addTool obcommand quickadd:choice:4ba7b1ed-6d99-40ae-b3bd-b33c87f180ba
nmap <Space>nnt :addTool<CR>

" Add project
exmap addPro obcommand quickadd:choice:468c6ca0-582a-410a-9523-0d910604ed00
nmap <Space>nnp :addPro<CR>
"------ Diary/Reviews ---

" New Daily Note/Open Daily Note
exmap openDaily obcommand daily-notes
nmap <Space>nd :openDaily<CR>

" Weekly review
exmap addWeeklyReview obcommand quickadd:choice:69f298ec-f8f5-4adf-9c32-0fdffda078ac
nmap <Space>nnw :addWeeklyReview<CR>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment