VSCodeVim / VSCodeVim/Vim

imswitcher: add an initial im config for the first time switching to insert mode

Open
#4,603 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
15.2k
Forks
1.5k
Avg merge
3d 18h
Merged PRs (30d)
6

Description

Is your feature request related to a problem? Please describe.
There are two input modes in a Chinese IM typically, English mode and Chinese mode, which can be switch between by Shift. This is more convenient than switching IM by Win+Space on Windows 10.
In vscode, with imswitcher enabled and my own configs, it switches to English IM when ESC pressed. If I open another file, and press i entering insert mode, the IM is English, I have to press Win+Space to switch, before which several Shifts are pressed unconsciously.

Describe the solution you'd like
I think it is caused by the code this.savedIMKey = '' in constructor. If add a config, e.g. autoSwitchInputMethod.insertmodeInitialIM, and let this.savedIMKey = autoSwitchInputMethod.insertmodeInitialIM in constructor, the problem solved, without side effect.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate the imswitcher implementation and inspect the constructor where this.savedIMKey is initialized. Trace how autoSwitchInputMethod configuration is read and how insert-mode switching uses the saved input method. Done means an initial insert-mode input method can be configured and is used when entering insert mode in a new file.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.