summaryrefslogtreecommitdiff
path: root/SI/.obsidian.vimrc
diff options
context:
space:
mode:
authorTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2024-04-29 22:06:12 -0400
committerTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2024-04-29 22:06:12 -0400
commit4d53fa14ee0cd615444aca6f6ba176e0ccc1b5be (patch)
tree4d9f0527d9e6db4f92736ead0aa9bb3f840a0f89 /SI/.obsidian.vimrc
init
Diffstat (limited to 'SI/.obsidian.vimrc')
-rw-r--r--SI/.obsidian.vimrc150
1 files changed, 150 insertions, 0 deletions
diff --git a/SI/.obsidian.vimrc b/SI/.obsidian.vimrc
new file mode 100644
index 0000000..ec3ee43
--- /dev/null
+++ b/SI/.obsidian.vimrc
@@ -0,0 +1,150 @@
+""" Default """
+" Indentation using spaces "
+" set tabstop=4
+" set softtabstop=4
+" set textwidth=79
+
+" Yank to system clipboard
+set clipboard=unnamed
+
+" Key Bindings
+unmap <Space>
+" insert mode
+inoremap jk <Esc>
+inoremap <C-h> <Left>
+inoremap <C-j> <Down>
+inoremap <C-k> <Up>
+inoremap <C-l> <Right>
+inoremap <C-i> <Esc>^i
+inoremap <C-a> <Esc>$a
+
+" normal mode
+nnoremap <C-c> :
+nnoremap <C-d> <C-d>zz
+nnoremap <C-u> <C-u>zz
+nnoremap J mzJ`z
+nnoremap n nzzzv
+nnoremap N Nzzzv
+nnoremap Q <nop>
+" nnoremap <Space>s [[:%s/\<<C-r><C-w>\>/<C-r><C-w>/gI<Left><Left><Left>]]
+
+" visual mode
+vnoremap ; :
+" vnoremap <C-j> :m '>+1<CR>gv=gv
+" vnoremap <C-k> :m '<-2<CR>gv=gv
+" noremap y [["+y]]
+" xvoremap p [["_dP]]
+
+" Surround
+nunmap s
+vunmap s
+exmap surround_wiki surround [[ ]]
+map [[ :surround_wiki
+exmap surround_double_quotes surround " "
+map s" :surround_double_quotes
+exmap surround_single_quotes surround ' '
+map s' :surround_single_quotes
+exmap surround_backticks surround ` `
+map s` :surround_backticks
+exmap surround_brackets surround ( )
+map sb :surround_brackets
+map s( :surround_brackets
+map s) :surround_brackets
+exmap surround_square_brackets surround [ ]
+map s] :surround_square_brackets
+map s[ :surround_square_brackets
+exmap surround_curly_brackets surround { }
+map s{ :surround_curly_brackets
+map s} :surround_curly_brackets
+
+" Split
+exmap split_vertical obcommand workspace:split-vertical
+nmap <Space>v :split_vertical
+exmap split_horizontal obcommand workspace:split-horizontal
+nmap <Space>v :split_horizontal
+
+" Navigation
+nmap j gj
+nmap k gk
+exmap back obcommand app:go-back
+nmap <C-o> :back
+exmap forward obcommand app:go-forward
+nmap <C-i> :forward
+exmap focus_top obcommand editor:focus-top
+nmap <C-k> :focus_top
+exmap focus_bottom obcommand editor:focus-bottom
+nmap <C-j> :focus_bottom
+exmap focus_left obcommand editor:focus-left
+nmap <C-h> :focus_left
+exmap focus_right obcommand editor:focus-right
+nmap <C-l> :focus_right
+exmap focus obcommand editor:focus
+nmap <Space>fc :focus
+exmap last_tab obcommand workspace:goto-last-tab
+nmap <Space>lt :last_tab
+
+" File Explorer
+exmap file_explorer obcommand file-explorer:open
+nmap <Space>e :file_explorer
+exmap right_sidebar obcommand app:toggle-right-sidebar
+nmap <Space>rs :right_sidebar
+
+""" Plugin Commands """
+" Anki
+exmap anki_scan_vault obcommand obsidian-to-anki-plugin:anki-scan-vault
+nmap <Space>as :anki_scan_vault
+
+" Check list
+" mark done
+nnoremap <Space>cm ^f[lrx
+exmap checklist obcommand editor:toggle-checklist-status
+nmap <Space>cl :checklist
+exmap checklist_view obcommand obsidian-checklist-plugin:show-checklist-view
+nmap <Space>cv :checklist_view
+
+" File Search/Open
+exmap find_files obcommand darlal-switcher-plus:switcher-plus:open
+nmap <Space>ff :find_files
+exmap find_old_files obcommand recent-files-obsidian:recent-files-open
+nmap <Space>fo :find_old_files
+
+" Fold
+exmap fold_properties obcommand editor:toggle-fold-properties
+nmap <Space>fp :fold_properties
+exmap toggle_fold obcommand editor:toggle-fold
+nmap <Space>fd :toggle_fold
+exmap fold_all obcommand editor:fold-all
+nmap <Space>fa :fold_all
+exmap unfold_all obcommand editor:unfold-all
+nmap <Space>ufa :unfold_all
+
+" Move notes
+exmap move_note obcommand file-explorer:move-file
+nmap <Space>nm :move_note
+exmap auto_move_note obcommand auto-note-mover:Move-the-note
+nmap <Space>na :auto_move_note
+
+" New Notes
+exmap new_note obcommand obsidian-advanced-new-file:advanced-new-file-new-pane
+nmap <Space>nb :new_note
+
+" Reload
+exmap reload obcommand app:reload
+nmap <Space>so :reload
+
+" Templatre
+exmap insert_templater obcommand templater-obsidian:insert-templater
+nmap <Space>ti :insert_templater
+exmap replace_templater obcommand templater-obsidian:replace-in-file-templater
+nmap <Space>tr :replace_templater
+
+" Text Generator
+exmap text_generate obcommand obsidian-textgenerator-plugin:generate-text
+nmap <Space>tg :text_generate
+exmap text_metadata_generate obcommand obsidian-textgenerator-plugin:generate-text-with-metadata
+nmap <Space>tmg :text_metadata_generate
+
+" Text Snippets
+exmap text_snippets obcommand text-snippets-obsidian:text-snippets
+nmap <Space>sp :text_snippets
+