Hello! And thank you for purchasing Vim for VSCode.
Each command has 5 exercises associated with it. There are 22 commands in total and they are divided into 4 sections. Here is a list for your convenience:
- Navigation
h
- move leftj
- move downk
- move upl
- move right
- Editing
i
- insert texta
- insert text after cursorI
- insert text at beginning of lineA
- append text at the end of linex
- ex-out textr
- replace a charactero
- insert line below current lineO
- insert a line above current line
- Moving
w
- move by worde
- move by end of wordb
- move backwards by word
- Advanced
d
- delete textc
- change texty
andp
- yank text and paste textv
- select tet in visual modef
- find textF
- find text backwardsctrl v
- enter multi-cursor mode
- Open up this folder inside VSCode.
- Install the recommended extensions.
- Go through exercises starting with 01-navigation.
- Have fun!
I'm going to assume you have VSCode installed. If not, go install it.
I am also assuming you know the basics of touch-typing. If you don't, that's fine, but you may have some difficulties!
Install Vim Extension
You'll need the Vim extension. VSCode should ask you to install the recommended extensions when you open this up, but if not, make sure you have it installed before you start.
Enable Key-Repeating
For Mac, enable key-repeating by executing the following in your Terminal:
# For VS Code
defaults write com.microsoft.VSCode ApplePressAndHoldEnabled -bool false
# For VSCode Insider
defaults write com.microsoft.VSCodeInsiders ApplePressAndHoldEnabled -bool false
# For VS Codium
defaults write com.visualstudio.code.oss ApplePressAndHoldEnabled -bool false
# If necessary, reset global default
defaults delete -g ApplePressAndHoldEnabled
Then restart VSCode.
If it still doesn't work, try restarting your computer.
For Windows, they say it should work. But if not, read the Window specific guide here.
Suggestion: Remap Caps Lock to Esc
When working with Vim, you'll find yourself wishing the esc
key were closer. Luckily you can make it so by remapping the caps lock key -> esc.
To do this, follow these steps:
- Open System Preferences.
- Navigate to Keyboard.
- Click "Modifier Keys".
- Change Caps Lock Key to Escape.
For Windows, you may want to check out an open source project called sharpkeys
here(thank you to @Arpan____ for the suggestion!). Note: please use at your own risk. I do not have Windows and have not tested.
If you want to be successful with this course, I suggest committing 10-15mins a day and slowly making the transition to using Vim inside VSCode in your daily editor. It will be painful at first, but with practice and commitment, it will work out :)
If you have feedback or questions, feel free to get in touch over Twitter @jsjoeio or by email [email protected].