Last active
September 29, 2023 21:48
-
-
Save megamaddu/20e4c87c076d1c5b87dc64dd5dbc4a8e to your computer and use it in GitHub Desktop.
.obsidian.vimrc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Have j and k navigate visual lines rather than logical ones | |
nmap j gj | |
nmap k gk | |
vmap j gj | |
vmap k gk | |
exmap 0 goLineLeftSmart | |
exmap $ goLineRight | |
" I like using H and L for beginning/end of line | |
nmap H ^ | |
nmap L $ | |
" Quickly remove search highlights | |
nmap <F9> :nohl | |
" 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 | |
" Fix o ignoring cursor context | |
" nunmap o | |
" nmap o A |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment