Welcome to my personal repository where I store all the most commonly used VS Code Vim commands. This is a collection of useful shortcuts and commands that enhance my productivity when using Vim inside VS Code.
These are some of the essential Vim commands I use frequently in VS Code:
:w
β Save the file πΎ:q
β Quit the editor β:wq
β Save and quit πΎβ:x
β Save and close if there are changes πΎπ:e <file>
β Open a file π
Text objects allow you to quickly select or manipulate parts of your text.
yi"
β Yank everything inside double quotes ("
) πya"
β Yank everything inside double quotes including the quotes πyi'
β Yank everything inside single quotes ('
) πya'
β Yank everything inside single quotes including the quotes πvi"
β Visually select everything inside double quotes π²va"
β Visually select everything inside double quotes including the quotes π²D
- Delete everything after cursor
Search and replace is made easy with Vim commands:
/text
β Search for the texttext
π:%s/old/new/g
β Replace all occurrences ofold
withnew
in the file π:noh
β Remove search highlight π«
Hereβs a list of all the commands Iβve stored in this repo:
yi"
β Yank everything inside double quotes πya"
β Yank everything inside double quotes including the quotes πyi'
β Yank everything inside single quotes πya'
β Yank everything inside single quotes including the quotes πvi"
β Select everything inside double quotes π²va"
β Select everything inside double quotes including the quotes π²:w
β Save the file πΎ:q
β Quit the editor β:wq
β Save and quit πΎβ:x
β Save and close if there are changes πΎπ:e <file>
β Open a file π/text
β Search for the texttext
π:%s/old/new/g
β Replace all occurrences ofold
withnew
π:noh
β Remove search highlight π«
yi"
to yank text inside double quotes:%s/
to search and replacectrl + r
then"
to past yanked text/<text-to-replace-with>
andenter