What is this death trap?
What is this death trap?
What is this death trap?
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. ;)
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
It's the hotel California of text editors >:)
You can ZZ any time you like, but you can never leave.
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 it's beginner-friendly, but you already know Vim, so why switch?
@glibg10b @GreenMario Why question it? Nano fits their workflow better than vim. Same for me.
Don't get it neither, vim is hard to start but once you're a bit familiar with it it's kind of time saving imo
I'm not even close to master it (just basics editing) and still find it quite better
Micro exists. It's Nano with Lua plugins. Very robust and minimalist. No magic incantations. I actually use it to code simple stuff that I just don't want to wait a minute for VSCode to spin its wheels.
I know how to get out. But I still like nano a lot more.
WTF. Why? I could maybe see someone preferring emacs over vim, but not nano. Maybe there are nano features I don't know about, but it just seems like Windows Notepad to me.
I normally just use VS Code with a VIM extension. Unless I'm ssh-ing into something, then I use vim.
Well, you kind of got it but also didn't I guess. If I want to quickly edit a none critial config file or similar a terminal version of Notepad is perfectly fine and for more complex stuff I prefer a GUI anyway.
I edit in Micro. Which is Nano with Lua plugins. Come at me.
vimtutor
or if you are rich there this game
You exit vim by unplugging the pc.
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
Now do ed
...
Pssh, come on, it's just :q or :q! - couldn't be simpler or more intuitive!
My main problem with vim is that they use hjkl instead of jkl; , it doesn't make sense to me why they'd do that.
And my second problem is that I use my own custom keyboard layout instead of qwerty, so I'd have to remap all the keys. Why spend hours learning and then rebinding all the keys when I can instead play some Dota? /s
Been a vim user for decades but never used hjkl. Probably strongly correlated with the fact I'm non QWERTY as well (Dvorak). I just use the arrow keys combined with the jumps to start/end of lines/words or to characters.
You don't need to remap anything aside from hjkl as the keybindings are mostly mnemonic and not location based.
On Dvorak at least, ^C is so easy to press that it's great for switching modes, I never use Esc.
I find the more time you've spent in non-graphical shells, especially on low spec devices or laggy connections, the more you appreciate vim. Instead of pressing Del a bunch of times and having it overrun you can ct" to swap out that string. I even use vim keys in vscode, as my hands are so used to them.
My biggest complaint is logging into some legacy device that only has vi and not vim, when shortcuts like "dap" or "caw" don't work
Huh, I thought most keybindings where tied to the position of the keys, being vim "motions", as in how you move your fingers or something like that.
Maybe there are vim layouts for dvorak that I can use? Because I think I'd prefer to have the keybindings in the same place.
I use a dvorak-based layout personally, but spanish QWERTY at work. Some time ago I learned EMACS with qwerty, so when I switched to dvorak my muscle memory was ruined, even if I knew the keybindings. I wonder if it's worth it learning 2 keybindings to be able to switch layouts
My main problem with vim is that they use hjkl instead of jkl; , it doesn't make sense to me why they'd do that.
With qwerty you can be sure of layout of the letters and numbers across languages.
Makes sense. Spanish keyboards have Ñ instead of semicolon, so it'd break. But I'm sure other things break in France, where they use AZERTY. So it's not that universal.
That makes me wonder, is there a way to get a keypress based on the position of the key, rather than the keycode? Would that be useful? Would assuming everyone is using a normal keyboard with letters in the same place even make sense? How would that interop with things like QMK?
:q does the trick
I took the vim pill a few years ago and spent tons of time learning its shortcuts, trying out plugins, and forming strong opinions about my relationship with my text editor. It's a great tool, but I personally lost the plot somewhere down the line. I'm not sure that passion actually served me.
Speaking of losing the plot lol
!killall vim
Init 6
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
Vim is crap. If a fucking text editor is hard to master, it's just a bad text editor.
That's a paddlin'
It may seem that way because it's a complete paradigm shift of how you interact with an editor. Once you understand that, then it becomes a very valuable tool that will make you more efficient. It is a big time investment but the payoff is worth it.
I still need to use IDEs for software development at work but I have to have some sort of Vim emulation on top of them.
tools with a high learning curve generally have a high payoff
I respectfully disagree. Vim is an excellent editor and is the centerpiece of my dev tools. Counting out the newer features in Neovim like language server and treesitter support, traditional Vim is still a powerful modal text editor with robust features like text objects, macros, sed-like search and replace, rich syntax highlighting, code folding, online help, endless customizability through scripting, and multiple ways to exit. It is an acquired taste though, and I understand it's not for everyone.
Exactly, you wouldn't say that to your grandma ! only to other sysadmin sect members.
I like how this is so controversial, 12 upvotes 12 downvotes
ESC ESC ESC ESC ESC ESC ESC ESC ESC :q! Or alternatively ESC :q!
just use windows plebs it just works durr durr
Closing nano is more complicated imo
No it isn't, it respect's ctrl+c, SIGINT and gives useful feedback for new users. Many shortcuts are immediately shown on screen.
Nano is overrated. I tell everyone who needs to edit from the terminal to use vimtutor. You'll never go back to Nano.
Ah, "good" old non-funny "can't exit Vim" "jokes" that never go out of style. Let's just all agree you should go back to using browser to write your code up to limited size due to JS limitations and leave the rest of us to "suffer" with out archaic tool that does what it's told without trying to be a smartass.
I don't think the joke is meant to be an attack on Vim. It's just making light of a relatable experience