Almost had me believing, but I couldn’t understand this sentence and it’s all over
"In this case, yank is the verb and the second y is a synonym for y_. "
Huh? What the hell is y_?
At least not an operating system like a certain “text editor”.
The command chest sheet in that article is wrong. gg is first line of the document, not H
“Why are we running from the police, Daddy?”
“Because we use Emacs, son. They use vim.”
–old Slashdot T-shirt
Seems like one loves vim or one does not. I learned vi back in the mid 80s, hated it then, probablty not going back. These days I thankfully use Geany or nano. Learning vim seems like a right of passage or something.
Learning vim seems like a right of passage or something.
Yes, I think every developer is dropped into vim unexpectedly at some point (eg. git)… “What is this? How do I close it!!!”
I use neovim btw
Beginner’s Command Cheatsheet
:q!
After a decade of using the bare minimum vi modes I just yesterday discovered I could use visual mode to jointly indent multiple lines.
I will still prefer pycharm every day of the week over vim, but yesterday I needed to modify code on a server and rebuild some docker containers. I couldn’t be arsed setting up my local env, making a merge request etc and was pretty impressed that a combination of screen, vim, docker compose and git - all available via SSH, was a complete toolset for getting an emergency change deployed and an app running again.
Using an ide to bigger things, and then just nano to edit or creat simple things. … and bat to view. I cant really see why i should make the effort to learn vim or its like
I saw the video by noBoilerplate. How useful is knowing and using Vim-Shortcuts when writing a letter or an email? Does it only make sense to learn it if you write or code all day or is it useful enough for moderate tech users or office workers?
That would be Emacs.
Emacs is like an operating system bringing various tools into the same editing interface, including email. Emacs is very adaptive, you can get VIm like bindings through evil-mode.
I would Emacs, but my pinky can’t.
The best way I’ve heard it described is that learning all of the motions, shortcuts, commands, etc is the best way to remove all of the possible friction between you having a thought and you putting that thought into text.
It’s like using Word and learning that CTRL+B toggles Bold. You don’t NEED to know that, you can click the bold icon. The extra 2 seconds that it took to grab the mouse and click the icon and then move your hand back to the keyboard seems trivial, but if you’re doing a lot of writing that can add up to a lot.
In addition, having to stop your train of thought in order to fiddle with a GUI can cause lapses in concentration. Constantly having to stop typing in order to fiddle with a GUI is annoying and requires you to switch context from what you were typing to looking for the icon or menu that you need to click.
Multiply that by everything else you need to do in editing text (moving the cursor to different places, selecting text, finding text, opening and saving documents, etc. That’s a lot of time that you’re spending messing around with a mouse and GUI annoyances.
Also, if you’re using Linux, a lot of tools use vim keys as their interface. So learning the basics (mostly hjkl for moving, / for searching, etc) can help you in a lot of programs.
For example, I’m using vimium in Firefox, so I can operate the entire browser without using the mouse. Press f and all of the links and form fields on the page are tagged with a 2 letter combination, pressing those two letters is like clicking the link/field. I can access shortcuts, open bookmarks, etc all without needing my mouse. In addition, the browser has hotkeys for tab manipulation (ctrl t for new tab, ctrl f4 to close tab, ctrl shift t to re-open/undo last closed tab, etcetc).
I try to have all of my programs be keyboard driven (and use a lot of terminal applications where possible). Vim keys and motions, in all of the various programs that use them, along with the shortcuts from the window manager (everyone knows alt + tab, but there are many more) and even individual applications make that possible (except for Freetube, which requires the mouse :/).
Overall, I would say that it’s not a requirement, but if you’re willing to spend a week or two learning (and moving very slow as you force yourself to learn and use the keys) then I think you’ll have a better time in Linux.
Also, it feels pretty ‘90s hacker movie hacker’ to just flail on the keyboard and have things happen on your PC.
I’ve switched to vim on a whim few months ago, and it still is a pretty fun and satisfying experience. I couldn’t get LazyVim to properly work on our Unity project, since the LSP can’t handle the hundreds of projects it generates, but IdeaVim in Rider works pretty much the same, as far as the movements are considered.
However, the important thing is that I said fun and satisfying, not faster and efficient. I still make mistakes, I have to look into a keybind reference sheet every time I want to do something I’m sure has to have a special keybind but I’ve forgotten which one it is, but once you do that it feels good.
Slowly but surely learning new stuff, getting the hang of some motions you use often, not having to reach for your mouse, all of that feels good. It’s still no way near the speed or efficiency of me just clicking the damn mouse, instead of fumbling around with VIM modes, undoing random actions because I missed one important key and now half of my text is gone, or just remembering that your clipboards get overridden by almost any action unless you do it differently.
So, if you want to get efficient and quicker in your programming, I highly recommend checking the keybind section of your IDE, and learning the few important keybinds it has, such as jump to next function/next parameter, search symbols, and the like. That will make you more efficient.
If, on the other hand, you want your editing to be a skill you can slowly continue mastering, eventually (after years of use) min-maxing, but always having some cool new things to learn that will feel good, them vim is pretty nice for that.
Just don’t expect it will make you faster or more efficient.
Just don’t expect it will make you faster or more efficient.
It will, but it requires you spend a lot of time dealing with being slow and wanting to give up and reach for the mouse.
I swapped keyboard layouts (to a 52 key split layout) and it took me around 2-3 weeks of typing slow, hitting the wrong keys, and keeping several printed sheets (for all of the keyboard layers) on my desk in order to learn the layout. It was frustrating and it would have been a lot easier to just grab a standard keyboard but, in the end, it was worth it.
Learning vimkeys/application hotkeys does take a while and it is much easier to avoid it for any given task. Just grab the mouse and avoid the frustration of having to try to remember the hotkey (or, even worse, look it up). But if you can avoid that and force yourself through the uncomfortable frustration. You’ll find that the time investment is worth it.