Xcode 13 adds Vim mode
developer.apple.com
developer.apple.com
Then you can enable Vim mode at Preferences → Text Editing → Editing → Enable Vim key bindings.
It feels fast! (Although not feature-complete just yet. Command mode and Visual Line mode are absent at the moment.)
As in Vim Mode or Xcode in General? Is it VSCode Fast or Sublime Fast?
It feels natural and native — more like the Sublime/Emacs/IntelliJ Vim emulators than the Visual Studio Code one, speed-wise.
The features they have implemented are easily discoverable because there are as-you-type hints in the new “bottom bar” (which also shows the mode).
Some things that don't appear in the hints are also working, including 'o' in Visual mode (which skips to the “other” end of highlighted text to jump from start to finish or vice-versa).
These are things that vim modes often get wrong and that I find myself missing when I use them.
Even if you do get it to work, you usually have to wait for the keypress timeout to detect the command. The sequence is something like:
- Enter insert mode.
- Press "j"
- Nothing appears until 40 ms later, when keypress timeout passes and the logic falls back to insert a "j" character.
I think Vim and Emacs use a fancier undo-mechanism, where they always insert the "j" and then delete the "j" if a command completes before the timeout in order to hide the latency.
inoremap jk <esc>
I just did an experiment, if I type "j" and pause, I can see "j" appearing and then almost immediately disappears, slight pause and then appear again. Is that the problem you are facing? But if I type fast (e.g "joking"), it doesn't seem to cause a visible delay.
XVim2 is getting more unstable for each new iteration of XCode. I am putting my trust in Apple for this one.