Skip to content

Commit

Permalink
fest: Jumping cursor loc. enters insert mode (#884) (#886)
Browse files Browse the repository at this point in the history
if vim mode is enabled, change to insert mode.
  • Loading branch information
chrisgrieser authored Oct 29, 2022
1 parent fc08873 commit ff52d32
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/editor/CursorJumper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,15 @@ export class CursorJumper {
await app.vault.modify(active_file, new_content as string);
this.set_cursor_location(positions);
}

// enter insert mode for vim users
if (app.vault.getConfig("vimMode")) {
// @ts-ignore
const cm = active_view.editor.cm.cm
// @ts-ignore
window.CodeMirrorAdapter.Vim.handleKey(cm, "i", "mapping")
}

}

get_editor_position_from_index(
Expand Down

0 comments on commit ff52d32

Please sign in to comment.