Skip to content

Commit

Permalink
add .obsidian.vimrc
Browse files Browse the repository at this point in the history
  • Loading branch information
jiangyinzuo committed Mar 21, 2023
1 parent a33d44a commit 23d52e2
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .obsidian.vimrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
" Yank to system clipboard
set clipboard=unnamed

" Go back and forward with Ctrl+O and Ctrl+I
" (make sure to remove default Obsidian shortcuts for these to work)
exmap back obcommand app:go-back
nmap <C-o> :back
exmap forward obcommand app:go-forward
nmap <C-i> :forward
exmap vsp obcommand workspace:split-vertical
exmap tabnew obcommand workspace:new-tab
exmap q obcommand workspace:close
exmap qa obcommand workspace:close-window

" Emulate Folding https://vimhelp.org/fold.txt.html#fold-commands
exmap togglefold obcommand editor:toggle-fold
nmap zo :togglefold
nmap zc :togglefold
nmap za :togglefold
exmap unfoldall obcommand editor:unfold-all
nmap zR :unfoldall
exmap foldall obcommand editor:fold-all
nmap zM :foldall
" Emulate Tab Switching https://vimhelp.org/tabpage.txt.html#gt
" requires Cycle Through Panes Plugins https://obsidian.md/plugins?id=cycle-through-panes
exmap tabnext obcommand cycle-through-panes:cycle-through-panes
nmap gt :tabnext
exmap tabprev obcommand cycle-through-panes:cycle-through-panes-reverse
nmap gT :tabprev
exmap Vex obcommand file-explorer:open
exmap Find obcommand global-search:open

0 comments on commit 23d52e2

Please sign in to comment.