vim ctrl-[ should behave exactly as esc
This commit is contained in:
parent
c1f194f8bd
commit
b9c26bcd78
1 changed files with 4 additions and 5 deletions
|
|
@ -88,7 +88,9 @@ exports.handler = {
|
||||||
if (hashId == 1)
|
if (hashId == 1)
|
||||||
key = "ctrl-" + key;
|
key = "ctrl-" + key;
|
||||||
|
|
||||||
if (data.state == "start") {
|
if ((key == "esc" && hashId == 0) || key == "ctrl-[") {
|
||||||
|
return {command: coreCommands.stop};
|
||||||
|
} else if (data.state == "start") {
|
||||||
if (useragent.isMac && this.handleMacRepeat(data, hashId, key)) {
|
if (useragent.isMac && this.handleMacRepeat(data, hashId, key)) {
|
||||||
hashId = -1;
|
hashId = -1;
|
||||||
key = data.inputChar;
|
key = data.inputChar;
|
||||||
|
|
@ -109,10 +111,7 @@ exports.handler = {
|
||||||
return {command: coreCommands.stop};
|
return {command: coreCommands.stop};
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (key == "esc" || key == "ctrl-[") {
|
if (key == "ctrl-w") {
|
||||||
data.state = "start";
|
|
||||||
return {command: coreCommands.stop};
|
|
||||||
} else if (key == "ctrl-w") {
|
|
||||||
return {command: "removewordleft"};
|
return {command: "removewordleft"};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue