phpc.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
A server for PHP programmers & friends. Join us for discussions on the PHP programming language, frameworks, packages, tools, open source, tech, life, and more.

Administered by:

Server stats:

833
active users

Andrew Woods

It’ll save you more than keystrokes. It’ll save you time wondering if you even changed the file.

For an un-edited file, you can just use :q to close the file. For an edited file though, it needs to be written before it can be quit so you can do :w then :q or you can do :wq

:x will check for un-saved changes, and save them if need be. Then close the file for you.

Bonus tip — Use :xa to save and close *all* your files!


fosstodon.org/@vimtips/1139050

FosstodonVim Tips (@vimtips@fosstodon.org)Do you type :wq like a pleb to save your files and quit vim? No more! Use :x today and save yourself the extra keystroke!

@awoodsnet @vimtips and don’t forget if you try to quit and it tells you to save your changes and you don’t remember making any, :q! Is your friend.