vim: add x for exemption key

This commit is contained in:
Le Tan 2018-08-31 20:22:42 +08:00
parent 72bb72477e
commit 68dd95591d
2 changed files with 8 additions and 1 deletions

View File

@ -187,7 +187,8 @@ enable_backup_file=true
; Skipped keys in Vim mode ; Skipped keys in Vim mode
; c: Ctrl+C ; c: Ctrl+C
; v: Ctrl+V ; v: Ctrl+V
vim_exemption_keys=cv ; x: Ctrl+X
vim_exemption_keys=cvx
; Path of the flash page, related to the configuration folder ; Path of the flash page, related to the configuration folder
; Could be absolute path ; Could be absolute path

View File

@ -1628,6 +1628,12 @@ bool VVim::handleKeyPressEvent(int key, int modifiers, int *p_autoIndentPos)
processCommand(m_tokens); processCommand(m_tokens);
setMode(VimMode::Normal); setMode(VimMode::Normal);
break; break;
} else if (VUtils::isControlModifierForVim(modifiers)) {
if (g_config->getVimExemptionKeys().contains('x')) {
// Let it be handled outside.
resetState();
goto exit;
}
} }
break; break;