SolvedVim <C-[> not work when in insert mode and macOS Chinese Simplified IM

Describe the bug
When in the Chinese Simplified IM and the insert mode, using key C-[ (features are similar to ESC) cannot back to normal mode. Maybe this is caused by im-select because Japanese Hiragana doesn't have that unexpected behavior.

To Reproduce
Steps to reproduce the behavior:

  1. Set following configs in Environment

  2. Go to insert mode in any text editing area

  3. Switch to Chinese Simplified Input Method

  4. Press <C-[> in order to back to normal mode

Expected behavior
VSCodeVim backed to normal mode just like pressing ESC

Screenshots doesn't help

Environment (please complete the following information):

using im-select to switch input method (following readme)


"vim.autoSwitchInputMethod.enable": true,
"vim.autoSwitchInputMethod.defaultIM": "",
"vim.autoSwitchInputMethod.obtainIMCmd": "/usr/local/bin/im-select",
"vim.autoSwitchInputMethod.switchIMCmd": "/usr/local/bin/im-select {im}"
  • Extension Version: 1.4.0
  • OS Version: Darwin x64 18.5.0 macOS Mojave 10.14.4 (18E226)
  • VSCode version: 1.33.1

Simplified Chinese:
Japanese Hiragana:

Additional context

15 Answers

✔️Accepted Answer

I think that might be the issue, your keyboard is not sending that key combination as a ctrl+[ when you are on zh_CN. Try to see if there is any other key that when pressing with zh_CN makes [ light up.

I think you should try to open up an issue on vscode for this to see they can help you, but to be honest this might be expected behavior, since when changing input methods it is normal for keys to have a different meaning. For instance, for me to able to get [ in en_US or zh_CN I'm actually pressing my + key.

As a workaround you can try to add the following to your "keybindings.json":

        "key": "ctrl+[BracketLeft]",
        "command": "vim.remap",
        "when": "editorTextFocus && && !inDebugRepl && vim.mode == 'Insert'",
        "args": {
            "after": ["<C-[>"],

Related Issues:

Vim Unable to close windows in normal mode with ctrl-w
Please add the following to your settings.json to delegate the keystroke BACK to vscode since Ctrl+w...
Vim Ctrl-D and Ctrl-U do not update cursor correctly
If you think ctrl-d and ctrl-u have gotten WORSE as compared to before this specific bug was introdu...
Vim Feedback about Multi-Cursor Mode
@jdshaeffer html.mirrorCursorOnMatchingTag - added in VSCode 1.41 This is a thread for feedback abou...
Vim Add a setting to toggle whether <Esc> closes autocomplete in insert mode.
I believe the API has changed a bit so what @zyujs suggested didn't work for me ...
Vim Chinese characters were inserted to the right of the cursor on Ubuntu
I have the same issue: VSCode Version:1.7.1 VscodeVim Version:0.4.1 OS:Ubuntu 16.04 ...
Vim <C-[> not work when in insert mode and macOS Chinese Simplified IM
I think that might be the issue your keyboard is not sending that key combination as a ctrl+[ when y...
TypeScript Quick fix for 'unions can't be used in index signatures, use a mapped object type instead'
You can do this: Though Bar has no index signature (i.e. you can't then do (obj as Bar)[value as Foo...
angular Angular5.x lazyLoad problem, undefined is not a function
For others that find this issue via Google as i did: I had the same problem when trying to lazy load...
react starter kit How to call child component method from parent?
For example you can use Refs to Components approach like so: Demo:
desktop The user name or passphrase you entered is not correct.
It sure looks like something's screwy with Keychain Try opening Keychain ...
ant design How to set 100% of height layout
This works for me: <Layout style={{height:100vh}}> I am a newbie I base on Meteor JS How to set 100%...
ant design Each record in table should have a unique key prop,or set rowKey to an unique primary key.
@ahmetkuslular The error message is pretty explicit your data set must contain items with a key prop...
material ui Module not found: Can't resolve 'material-ui-icons/Menu' Martial Next
For anyone else experiencing this issue: npm install @material-ui/icons
desktop Could not resolve host:
Check this out as well it helped me. Description I create a new repository in my local and complete ...
angular Cyclic dependency error with HttpInterceptor
I resolved simply not setting authService in constructor but getting in the intercept function. ...
desktop It keeps saying The user name or passphrase you entered is not correct.
@tom10271 we think this is related to Keychain access due to some sort of macOS update: Try opening ...
DefinitelyTyped [@types/react] RefObject.current should no longer be readonly
It's not It'a intentionally left readonly to ensure correct usage even if it's not frozen ...
ts node Custom typings not working with ts-node 8.0.2
When using with ts-node you have to add --files flag After updating to ts-node version 8.0.2 the cus...
ngx admin No PostCSS Config found with build:prod
Or you can create a file named postcss.config.js in root directory Just leave it empty or write the ...
angular cli Issue: Cannot read property 'thisCompilation' of undefined
Here is the answer from issues #9793 : npm remove webpack npm install webpack@3.11.0 ...
react native template typescript can not run npx react-native init MyApp --template react-native-template-typescript
Just remember to npm uninstall -g react-native-cli and yarn global add @react-native-community/cli s...
angular Uncaught Error: Can't resolve all parameters for ...
You are missing an @Injectable() annotation on your ApiService Support requests like these should li...
angular Force reload/refresh current route with RouteReuseStrategy
Hi If you really need to trick the Router into reloading the component on each routerLink click ...
angular Misleading error message "Cannot find a differ supporting object '[object Object]'"
I just ran into the same issue I'm not sure if the recommended solution will work for my case ...
angular cli Error | Could not find plugin "proposal-numeric-separator" | Generating ES5 bundles for differential loading
Try to install @babel/compat-data: ~7.8.0 to devDependencies This is the only workaround which helpe...
react hook form How to submit the form outside the form
For those who come across this issue like I did and found it didn't quite address the question ...
apollo client Store error: the application attempted to write an object with no provided id but the store already contains an id of...
Hey @hinok 👋 This error only should occur when you have made a query with an id field for a portion...
angular cli Using invalid environment causes error in build (was "ERROR in Cannot read property 'length' of undefined")
Probably not the same cause but we had the same error (Cannot read property 'length' of undefined) w...
angular cli ng serve method ip not open in another machines
The solution is simple Just bind to the correct interface address via ng serve --host= ...
angular cli Incorrect JS paths when ng build -prod is deployed in a subfolder
When you're deploying to non-root path within a domain you'll need to manually update the <base href...
angular update 2 to 4 has problem [ts] Property 'map' does not exist on type 'Observable<Response>'.
I met the same problem with the angular cli 6.0.0 and rxjs 6.1.0 And I solved the problem by replaci...
desktop A lock file already exists in the repository, which blocks this operation from completing.
@simhox thank you for updating the issue body and uploading the log file! Here's the related error: ...
angular cli Installation error: permission denied for node-sas
sudo npm install -g --unsafe-perm --verbose @angular/cli Installation error (node-sass) with: node v...
vscode cpptools can't stop at the breakpoint
@Sendoushi @andychen2016 Please confirm when you are compiling that you are compiling with the -g fl...
angular cli ng build -prod Module not found: Error: Can't resolve './$$_gendir/app/app.module.ngfactory'
Instead of use ng build --prod use ng build --env=prod UPDATE As many of us (thx) have mention this ...
vscode restclient Header name must be a valid HTTP token ["{"]
OK looks like the error is: where as this is OK: I had a previous simple test file that was working ...
vscode macOS Mojave: font rendering is blurry or has changed
So.. Mojave is out The font rendering looks awful on both 1x displays and Retina displays I'm really...
vuetify [Bug Report] Could not find a declaration file for module 'vuetify/lib'
@KaelWD Thank you for the link More specifically this comment helped me out to properly update my ts...
TypeScript "Ignore this error message" code fix in JSX results in rendering // @ts-ignore
(unless we really think something like is OK?) TypeScript Version: 3.2.0-dev.20181004 Search Terms: ...
storybook Webpack 4 support?
I'm getting the below error when running Storybook with a project using Webpack 4; This is preventin...
angular cli Property 'controls' does not exist on type 'AbstractControl'.
Got it! Looked at the docs - FormArray The FormArray class contains the controls property ...
TypeScript Suggestion: Add abstract static methods in classes and static methods in interfaces
I want to force implementation of static deserialize method in Serializable's subclasses Is there an...
apollo client Catching Network error: Converting circular structure to JSON
To anyone else coming here I ran into this doing Ran into the issue because the onClick event object...
ts jest Jest encountered an unexpected token
@mohsinulhaq I was able to fix the error similiar to yours by changing jsx property of tsconfig.json...
TypeScript Creating types from values in array
in ts@3.x and above solve it like this TypeScript Version: 3.0.3 Search Terms: Type based on values ...
angular Angular2 AoT Compiler Errors
pls try /cc @chuckjaz When I try to compile my project with ngc it throws the below error: Error: Er...
react hook form Ability to disable submit button until valid form
Add formState api then in your button Is your feature request related to a problem? Please describe ...
angular cli [Bug] cli needs to be reloaded when a lazy loaded module is added in routes (FIXED)
I recomended change { path: 'user-panel' loadChildren: './user-panel/user-panel.module#UserPanelModu...
prettier Change HTML/JSX formatting to have one attribute/prop per line
The point I am trying to make is that the vertical space matters Wasting it (too much) has negative ...