5 ms·
For what it's worth: I really don't care to tell people what editor to use. But I do think that everyone should think about spending some time with vimtutor. No
by mumblemumble 6y ago
For what it's worth: I really don't care to tell people what editor to use. But I do think that everyone should think about spending some time with vimtutor. Not because it will turn you into a 10x developer, or because vim has the best keybindings ever, or anything like that. I've never bought it. But I do believe that it is very likely to make your life easier, even if you don't actually use vim.
Let me explain: I've been an emacs person for decades now. I was never super committed to it, though. In practice, I'll use whatever editor has the best plugin for the language I'm working in. Which means that, for the longest time, I had to try and keep track of 4 or 5 different sets of editor keyboard commands. Which is too damn much for one brain, so I found that, over time, I stopped being as efficient in any editor as I was in emacs 25 years ago.
So why vim? Because every editor worth its salt has an option to use vim keybindings. So you don't have to learn 4, 5, 6 different sets of editor commands. You can learn one, and learn it well.
- davidrupp 6y agoI find that the editors I use most —- TextMate and the JetBrains suite —- also have the option to use Emacs bindings. I try to maintain functional literacy with vi(m), because it tends to be more available by default, but I’ll use Emacs where possible.
- mumblemumble 6y agoA fair point, and, though I'm not personally sad about making the switch, I definitely don't want to imply that other emacs users should drop everything and switch to evil mode. But, at the risk of branding myself a traitor, I would suggest that anyone who doesn't already have emacs shortcuts burned into their muscle memory should choose to learn the vim ones, because they're somewhat more widely supported. (And to use doom emacs to do it.)
- davidrupp 6y agoI’ve found value in knowing both. And I’ve decided that I prefer Emacs because the mode I care about most —- which I informally call “just type stuff mode” —- is the default “mode” in Emacs.
- freedomben 6y agoI actually learned "vim" on Qt Creator's Vim mode and although I do most of my development now in "real vim" I very much agree with your post. Nearly every editor support vim keybindings which drastically reduces the different shortcuts you have to remember. Even among JetBrains products I find it helps a lot with consistency.
- wombat-man 6y agodang that's... a good point actually.
- JoshTriplett 6y agoThere's also https://vim-adventures.com/ https://vim-adventures.com/ , which is a fun way to learn the basics.
- wahern 6y ago> Because every editor worth its salt has an option to use vim keybindings. Including the Unix shell line editor, which typically supports both vi and emacs key bindings, and nothing else. Yet for some reason the default always seems to be emacs rather than vi, even on BSD (e.g. OpenBSD), and even though POSIX only mandates vi mode because "[t]he author of emacs requested that the POSIX emacs mode either be deleted or have a significant number of unspecified conditions."[1] Emacs line editing mode is more confusing for me as I use Joe (WordStar clone) which has emacs-like key combinations but with slightly different assignments. And because of this default I've never made a habit of using line editing commands; there's no way I can unlearn my Joe muscle memory, and over the years I've gotten into the habit of avoiding shell personalizations, to my detriment in this case. [1] https://pubs.opengroup.org/onlinepubs/9699919799/utilities/sh.html https://pubs.opengroup.org/onlinepubs/9699919799/utilities/s...
- WWLink 6y agoMacOS uses ctrl+a/ctrl+e EVERYWHERE (but it doesn't work well in Microsoft products, if it works at all). I like my emacs line editing mode :D
- 27182818284 6y agoThis is one of my favorite things about macOS. I love that control+a and command+a have different functions. I use control+k and control+a all the time while writing comments on websites, etc. Especially since I've been mapping caps-lock to control for more than a decade.
- WWLink 6y agoIt also means you can use the usual cmd+c in a terminal window. That alone makes Macs my favorite console machine lol. I mean at least Linux has ctrl+shift+c too. Windows: shift+insert? REALLY?! WTF? lol. :D
- mixmastamyk 6y agoAgreed yes, and you could use CUA keybindings and be comfortable everywhere, working cross-desktop, cross-terminal, cross-platform. Only a minor variant on the Mac with Cmd instead of Ctrl. Some good options: - Geany - Sublime Text - VS Code - Notepad++ - micro - ne On top of these I usually memorize Ctrl-A and Ctrl-E for the command-line, and "i… :wq" for vim, although haven't needed the latter in a decade.
- grativo 6y agoSublime Text has a vintage mode which has vim controls, which is very nice. It does not have an advanced set of commands that perhaps other editors might have, but it has the core commands. https://www.sublimetext.com/docs/3/vintage.html https://www.sublimetext.com/docs/3/vintage.html
- aqme28 6y agoAgreed. I don't use vim for day-to-day use, but if I have to ssh into a server it's nice to know that I can still get by.
- pkulak 6y agoAnd this means that you can go between systems, not just editors. Before I learned vim bindings, using Linux was so punishing because I was used to using command/ctrl/shift/arrow keys and whatnot to select words, navigate to the beginning and end of the line, etc. After I moved to vim bindings for all my editors, switching to Linux was so easy that it's now where I spend almost all of my time. However, if I do need to use a Mac, I no longer have to fight muscle memory (except for that infernal super key copy/paste).
- yodsanklai 6y ago> Because every editor worth its salt has an option to use vim keybindings. I'm not sure about this. For instance, I'm typing this message in a text box in my browser and I don't have access to vim keybindings. There are many cases where this happens (other example: google docs). I do use vim whenever I can, but I'd say the most useful keybindings that one can learn are the ones from the OS.
- jbpnoy6fifty 6y agoI believe he meant code editors. Examples of which I have used Vim bindings - google chrome - sql server management studio - jupyter notebook - jupyter lab - visual studio code - ms visual studio - dbeaver - eclipse - sublime text 2 - hackerank, iirc
- justinator 6y agoBoth Chrome and FF have plugins to add vim key bindings - at least for navigating around the UI and the page. Which would support the argument to learn them. I guess your argument would be stronger if there were other $editor_of_choice key bindings for browser textboxes?
- oblio 6y agoThere are key bindings for other editors, they're called CUA :-) I can Ctrl-C/Ctrl-X/Ctrl-V to copy/cut/paste, Ctrl-arrows to move around one word at a time, Ctrl-shift-arrows to select words, Home and End to go to the start and end of the line, etc, Ctrl-Home/Ctrl-End to move to the start and end of the text input, etc.
- vmladenov 6y agoOn macOS a majority of UI text fields support readline bindings (^A, ^E, etc) which is really nice
- yodsanklai 6y agoI have a big issue with these bindings: there is no "right" ctrl on my MBP keyboard. If you touch type, I find ^A very cumbersome to type. I find it easier to use mac os default (cmd + arrow) which also opens variants such as option + arrow, shift + option + arrow. The only readline binding I do use is ^K (not as bad as ^A because k is on the right side of the keyboard, and there is no alternative anyway).
- outworlder 6y agoAt that point, you can use Spacemacs.
- deleted 6y ago[deleted]
- lazyant 6y ago> every editor worth its salt has an option to use vim keybindings Also a lot of inputs use Emacs binding or a subset of it: Bash and other shells, Cisco routers, heck, even in Slack you can Crtl-a or Crtl-k.
- _virtu 6y ago> I really don't care to tell people what editor to use. Yeah, this is weird to me. I've seen some people list it on their resume. Why should I care what editor you use?