I actually learned how to use vi like 30 years ago and I had all the commands memorized. Then, nano came along. All the commands are at the bottom of the screen to remind you. It was just too tempting to pass up. However, I can’t help but suspect that somewhere out there I might have left a vi session open because maybe I mistyped. I might have accidentally typed ;q! instead of :q! or something.
I get stressed out every time I need to jump into a server and check something and the only editor is vi. If I can I install nano straight away. Btw, :q! does nothing without pressing ESC first! Hehehe
Yeah, that’s part of the joke. I probably didn’t press ESC first. LOL
I’m feeling old now… I’ve been using vi for 35y now and was happy when I got vi.exe on a dos box, as I hated edit. I still don’t like ‘simple’ editors like nano/joe.
I used kill to get out of emacs when trying it agter 7y of vi usage, so I get the need to get mideval on editors users aren’t used off. ;)
vi has always been my bane because I’m a sloppy typist. I can’t count the number of files i had to fix because they ended with :q i like nano because the commands are ctrl + whatever. i don’t make a mess.
All the commands are at the bottom of the screen to remind you. It was just too tempting to pass up.
But you already had the Vi commands memorized. Did you forget them in the meantime?
You can :q! any time you want, but you can never leave.
Insert Mode tho
It’s really easy, just unplug your computer.
-
Esc
× 2CTRL-]
× 2CTRL-\
CTRL-N
× 2
-
:q
:qa
:wq
:wq!
:wqa
:x
ZZ
:q!
ZQ
:q!
:cq
-
Nano is pretty good if you’re in a terminal. Used to use vim for ssh related stuff but since nano added syntax highlights I didn’t go back.
Nano’s only appeal is that is begiinner-friendly, but you already know Vim, so why switch?
It’s the hotel California of text editors >:)
That’s how you learn Linux and Google: how to kill vim? kill -9 vim.
“vim” isn’t a valid PID. I think you meant
killall -9 vim
Pssh, come on, it’s just :q or :q! - couldn’t be simpler or more intuitive!
:q does the trick
vimtutor
Now do
ed
…!killall vim
I know how to get out. But I still like nano a lot more.
it’s funny because as much as I hate gnome desktop, I feel like gnu really does makes the best Linux software. disks utility, nano editor, I’d even argue gnu paint without the ability to undo is more intuitive and superior to most of the closed source commercial stuff of similar purpose you can find out there.
actually, some of the best looking desktops I’ve seen are heavily customized versions of gnome (pop os, nobara official) so maybe I’m wrong on that too.
ctrl+z seems to work
Remember to actually kill the process though, since that will only background/suspend it in most cases.
(Be sure to save the file though first, Vim creates a “swap” / recovery file but its best to not rely on that, use
fg
to re-open, then press escape and type:wq
)Followed by
kill -9 %1
to actually kill the process, otherwise your terminal might complain or freeze up when you try to close it