Written by Chris Gregg and Dominique Yahyavi, with modifications by Peter Johnston, Nick Troccoli, and Lisa Yan Show
Click here for a walkthrough video.
Overview
Opening vimTo open a file in
If Saving and Quitting vim
Navigating A FileArrow keys work in both modes to navigate as you would expect. The preferred mode in
There are also several additional keyboard shortcuts to navigate within a file.
SearchingSearch is another great way to move your cursor.
Editing Text
Entering INSERT ModeWhen you are ready to enter text, you should switch to INSERT mode. There are a few ways to do this:
Then, just type as normal to enter text. You can use the arrow keys to navigate, or switch back to COMMAND mode and use the shortcuts mentioned earlier. Undo/Redo
Highlighting textIf you want to highlight multiple lines or particular words in a line, you can do so in VISUAL mode. There are three different visual modes:
Once you enter these modes by typing these in COMMAND mode, you can use the keyboard navigation (e.g., VISUAL mode is also useful for adjusting indent to a batch of text. For example, if you wanted to reduce the indent of a set of lines, you can
enter block-wise visual mode ( More ResourcesThe best way to get
familiar with
There is also a fun online Frequently Asked QuestionsWhen I do |