From fcaea157689e443cf27d3caf88bd619e3d7e37f5 Mon Sep 17 00:00:00 2001 From: five-hundred-eleven Date: Thu, 17 Apr 2025 21:04:31 -0400 Subject: [PATCH] Add vim bindings for vscode and obsidian --- .obsidian.vimrc | 12 ++++++++++++ settings.json | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 .obsidian.vimrc create mode 100644 settings.json diff --git a/.obsidian.vimrc b/.obsidian.vimrc new file mode 100644 index 0000000..bc4c12e --- /dev/null +++ b/.obsidian.vimrc @@ -0,0 +1,12 @@ +exmap quickswitchplus obcommand darlal-switcher-plus:switcher-plus:open +nmap \f :quickswitchplus +exmap back obcommand app:go-back +nmap gb :back +exmap forward obcommand app:go-forward +nmap gn :forward +exmap followlink obcommand editor:open-link-in-new-leaf +nmap gd :followlink +exmap tableft obcommand workspace:previous-tab +nmap gth tableft +exmap tabright obcommand workspace:next-tab +nmap gtl tabright diff --git a/settings.json b/settings.json new file mode 100644 index 0000000..c45a7c8 --- /dev/null +++ b/settings.json @@ -0,0 +1,48 @@ +{ + "vim.easymotion": true, + "vim.incsearch": true, + "vim.smartcase": true, + "vim.useSystemClipboard": true, + "vim.useCtrlKeys": false, + "vim.hlsearch": true, + "vim.normalModeKeyBindingsNonRecursive": [ + { + "before": ["g", "b"], + "commands": ["workbench.action.navigateBack"], + "silent": false + }, + { + "before": ["g", "n"], + "commands": ["workbench.action.navigateForward"], + "silent": false + }, + { + "before": ["", "g"], + "commands": ["workbench.action.findInFiles"], + "silent": false + }, + { + "before": ["", "f"], + "commands": ["workbench.action.quickOpen"], + "silent": false + }, + { + "before": ["", "c"], + "commands": ["workbench.action.gotoSymbol"] + }, + { + "before": ["", "r"], + "commands": ["references-view.findReferences"], + "silent": false + }, + { + "before": ["g", "d"], + "commands": ["editor.action.revealDefinition"], + "silent": false + }, + { + "before": ["g", "t", "l"], + "commands": ["workbench.action.focusActiveEditorGroup"] + } + ] +}