Posts Tagged ‘vim keyboard shortcuts’

Useful vim commands

Now that you’ve typed some random stuff in, escape to the command mode. Now try pressing ‘:w’ i.e. (shift+;)w. W is for “write”. This saves the file and leaves you still in the editor. If you want to get out of the editor, you type in one more command ‘q’ so it becomes ‘:wq’. In case you want to get out of it without saving, use ‘:q!’. The other way to save and quit is to go to the command mode and hit shift+z+z.