-
Notifications
You must be signed in to change notification settings - Fork 1
/
obsidian.vimrc
50 lines (39 loc) · 1.27 KB
/
obsidian.vimrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
exmap surround_wiki surround [[ ]]
exmap surround_double_quotes surround " "
exmap surround_single_quotes surround ' '
exmap surround_backticks surround ` `
exmap surround_brackets surround ( )
exmap surround_square_brackets surround [ ]
exmap surround_curly_brackets surround { }
" NOTE: must use 'map' and not 'nmap'
map [[ :surround_wiki
nunmap s
vunmap s
map s" :surround_double_quotes
map s' :surround_single_quotes
map s` :surround_backticks
map sb :surround_brackets
map s( :surround_brackets
map s) :surround_brackets
map s[ :surround_square_brackets
map s[ :surround_square_brackets
map s{ :surround_curly_brackets
map s} :surround_curly_brackets
set clipboard=unnamed
" Emulate Folding https://vimhelp.org/fold.txt.html#fold-commands
exmap unfoldall obcommand editor:unfold-all
nmap zR :unfoldall
exmap foldall obcommand editor:fold-all
nmap zM :foldall
exmap currentdate obcommand insert-current-date
map \cd :currentdate
exmap currenttime obcommand insert-current-time
map \ct :currenttime
exmap themedark obcommand theme:use-dark
map \td :themedark
exmap themelight obcommand theme:use-light
map \tl :themelight
exmap blockquote obcommand editor:toggle-blockquote
map \bq :blockquote
exmap runblocks obcommand execute-code:run-all-code-blocks-in-file
map \ex :runblocks