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 ofoldwithnewin 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 ofoldwithnewπ:nohβ Remove search highlight π«
yi"to yank text inside double quotes:%s/to search and replacectrl + rthen"to past yanked text/<text-to-replace-with>andenter