life is too short for a diary




Cribsheet for Vim

Tags: vim

Author
Written by: Tushar Sharma
Featured image for Cribsheet for Vim

vim is a text editor that is a clone of the vi editor.

Overview

vim has two "modes": COMMAND mode and INSERT mode. In COMMAND mode, you execute commands (like undo, redo, find and replace, quit, etc.). In INSERT mode, you type text. There is a third mode, VISUAL mode, that is used to highlight and edit text in bulk. To go into INSERT mode from COMMAND mode, you type i. To go back to COMMAND mode, you type the esc key. vim starts out in COMMAND mode.

Reloading a file

If a file has been changed on disk, you can reload it in Vim without closing and reopening it.

:e

Useful set commands


comments powered by Disqus