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
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.
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.
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.
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
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?
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.
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)
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.
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.
If you open vim the first thing you will see it's a text describing how to close it. Not saying other things are easier for a new user but closing is pretty simple. EDIT: if press ctrl - c vim will show you what you should press instead
Nano is the MS notepad of Linux. No more, no less. You don't have the initial cost of learning vim with nano but in the end you're working more. I really don't understand how people can be productive without things like complex regexps, global commands, piping from the editor, etc.
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.