Vim shortcut (#279)

* Allow VIM navigation shortcuts without VIM mode enabled in Obsidian

* Default value for vim navigation keys

---------

Co-authored-by: Neil-Chen <v009008777@hotmail.com>
This commit is contained in:
Simon Cambier
2023-08-22 08:08:36 +02:00
committed by GitHub
parent a077b427eb
commit 6607dffa98
2 changed files with 18 additions and 2 deletions

View File

@@ -38,7 +38,7 @@ abstract class OmnisearchModal extends Modal {
] as const) {
for (const modifier of ['Ctrl', 'Mod'] as const) {
this.scope.register([modifier], key.k, _e => {
if (this.app.vault.getConfig('vimMode')) {
if (settings.vimLikeNavigationShortcut) {
// e.preventDefault()
eventBus.emit('arrow-' + key.dir)
}
@@ -53,7 +53,7 @@ abstract class OmnisearchModal extends Modal {
] as const) {
for (const modifier of ['Ctrl', 'Mod'] as const) {
this.scope.register([modifier], key.k, _e => {
if (this.app.vault.getConfig('vimMode')) {
if (settings.vimLikeNavigationShortcut) {
// e.preventDefault()
eventBus.emit('arrow-' + key.dir)
}