Basics, Opening, Closing & Saving

Vim Text Editor Quick Reference

1 min read

Published Jul 6 2025


11
0
0
0

LinuxText Editor

Opening files

From the terminal:

vim filename

From within Vim:

KeyDescription
:edit

:edit filename will open the file

:e

or alternatively you can use the short form of :e filename

:split

To open another file while in Vim to a split window, you can use :split otherfilename

:sp

or use the short form sp: otherfilename to also open in a split window

:vs

To open another file in a vertical split window use :vs otherfilename


Saving & exiting

KeyDescription
:w

Save the current file, you can specify a new filename by adding :w newfilename

:q

Close the current file

:wq

Save and quit

:x

Save and quit alternative

ZZ

Save and quit alternative

:wqa

Save and quit all open files

:q!

Force quit with no save

ZQ

Force quit alternative

:qa

Close all files

:qa!

Force quit all files


Products from our shop

Vim Cheat Sheet Mouse Mat

Vim Cheat Sheet Mouse Mat

Vim Cheat Sheet Travel Mug

Vim Cheat Sheet Travel Mug

Vim Cheat Sheet Mug

Vim Cheat Sheet Mug

SimpleSteps.guide branded Travel Mug

SimpleSteps.guide branded Travel Mug

Developer Excuse Javascript - Travel Mug

Developer Excuse Javascript - Travel Mug

Developer Excuse Javascript Embroidered T-Shirt - Dark

Developer Excuse Javascript Embroidered T-Shirt - Dark

Developer Excuse Javascript Embroidered T-Shirt - Light

Developer Excuse Javascript Embroidered T-Shirt - Light

Developer Excuse Javascript Mug - White

Developer Excuse Javascript Mug - White

Developer Excuse Javascript Mug - Black

Developer Excuse Javascript Mug - Black

SimpleSteps.guide branded stainless steel water bottle

SimpleSteps.guide branded stainless steel water bottle

Developer Excuse Javascript Hoodie - Light

Developer Excuse Javascript Hoodie - Light

Developer Excuse Javascript Hoodie - Dark

Developer Excuse Javascript Hoodie - Dark

© 2025 SimpleSteps.guide
AboutFAQPoliciesContact