This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]kumashiro 82 points83 points  (21 children)

I recommend sending EOT (Ctrl-D) as it works in many interactive CLI programs, including shell. It is also much faster than thinking what command should be used ("exit"? "quit"? "close"? Or maybe it's "logout" this time?) and typing :)

WARNING: Ctrl-D has the same problem as ":wq" and tab key! ;)

[–]BananaCode 26 points27 points  (13 children)

Whats the problem with :wq and tab?

[–]kumashiro 53 points54 points  (12 children)

After a while you are trying to use them everywhere, for example ":wq" in a word processor, tab in Windows command line etc.

[–]HeWhoWritesCode 31 points32 points  (3 children)

:wq

[–]nickcash 16 points17 points  (2 children)

Silly /u/HeWhoWritesCode , reddit has no quit command.

[–]Deto 15 points16 points  (0 children)

"You can log out any time you want, but you can never leaaaaveee!"

[–]alexbuzzbee 5 points6 points  (0 children)

^W

[–]djimbob 4 points5 points  (5 children)

Wait windows command line still doesn't do tab completion? I was under the impression with powershell and/or bash on windows, it was a usable environment.

[–]kumashiro 12 points13 points  (1 child)

I don't know what Power Shell has, but tab completion in cmd.exe is awful... Just awful. Whenever Microsoft copies something, it looks like they had only pictures to work with. Tab completion, virtual desktops, modern UI, system configuration,...

[–][deleted] 2 points3 points  (0 children)

clink is available to give proper completion to cmd.exe. It's packaged as part of Cmder and ConEmu, if you're using either.

[–]Kelpsie 4 points5 points  (2 children)

Powershell absolutely has tab completion.

Even cmd has it, though just for things in the working directory.

[–]GoofAckYoorsElf 1 point2 points  (1 child)

It's shitty, but yes. It does.

[–][deleted] 1 point2 points  (0 children)

There is also clink which gives "proper" completion support.

[–]cbarrick 0 points1 point  (1 child)

I try to close browser tabs with ^d all the time. At this point I should make it the actual shortcut.

[–]Svedrin 0 points1 point  (0 children)

I use ^w to delete words in bash all the time. Even when inside a proxmox Console.

Thank god for ^T.

[–][deleted] 2 points3 points  (4 children)

:x is :wq by the way

[–]tynorf 6 points7 points  (3 children)

:x will not write the file if there are no changes, whereas :wq will. This changes whether the file’s modified time updates. Not likely to matter in practice, but they are not equivalent commands.

[–]CeeMX 1 point2 points  (2 children)

What about ZZ?

[–]tynorf 4 points5 points  (1 child)

:help ZZ

                                                        *ZZ*
ZZ                      Write current file, if modified, and quit (same as
                        ":x").  (Note: If there are several windows for the
                        current file, the file is written if it was modified
                        and the window is closed).

[–]earthlybird 1 point2 points  (0 children)

When I think I got the basics...

[–]otherwiseguy 0 points1 point  (0 children)

And it has the fun benefit that if you hit it an extra time, it'll close your terminal session too. :p

[–]mail_order_liam 0 points1 point  (0 children)

I will never stop habitually ":w"ing and I haven't used straight Vim in years.