Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for escaping insert mode with Ctrl+C #24

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions addons/godot-vim/godot-vim.gd
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,8 @@ var command_keys_white_list : Dictionary = {
"Ctrl+D": 1,
"Ctrl+O": 1,
"Ctrl+I": 1,
"Ctrl+R": 1
"Ctrl+R": 1,
"Ctrl+C": 1
}


Expand Down Expand Up @@ -1420,7 +1421,7 @@ class CommandDispatcher:

vim.macro_manager.push_key(key)

if key_code == "Escape":
if key_code == "Escape" or key_code == "Ctrl+C":
input_state.clear()
vim.macro_manager.on_command_processed({}, vim.current.insert_mode) # From insert mode to normal mode, this marks the end of an edit command
vim.current.enter_normal_mode()
Expand Down