4 ms·
I still don't really understand what Vim users see in it. They always seem to claim that you can edit faster... and sure you can if you're comparing with Notepa
by IshKebab 3y ago
I still don't really understand what Vim users see in it. They always seem to claim that you can edit faster... and sure you can if you're comparing with Notepad++. But modern editors have multiple cursors and tons of useful editing tools that let you be easily as fast with much less pain.
- ghostpepper 3y agocan you go a full 8 hour work day without touching the mouse? edit: can you easily pipe the entire file through grep or awk, or insert the contents of the output of curl or jq?
- qup 3y agoyou do that in vim? I do that in terminal (I'm a heavy vim user) vscode subs for vim, not for the CLI
- BreveDev 3y ago> can you go a full 8 hour work day without touching the mouse? What does this have to do with anything? If I felt the need to work this way, I absolutely could set up my Mac + any JetBrains IDE to do it, but to me it is an entirely unnecessary requirement. > can you easily pipe the entire file through grep or awk, or insert the contents of the output of curl or jq? Yes, and probably from within my IDE (if I cared to), which I probably won't do and don't need to because there exists other tools and plugins.
- IshKebab 3y ago> can you go a full 8 hour work day without touching the mouse? No but I don't want to because mice are a great invention that make lots of tasks faster. Why artificially limit yourself by banning a mouse? Do you really browse the web without a mouse? > can you easily pipe the entire file through grep or awk, or insert the contents of the output of curl or jq? Yes? cat file | ... curl ... | pbcopy Anyway those are super rare tasks! Why would I pick an editor based on being able to do things I want to do a couple of times a month at the absolute most?
- vunderba 3y agoI'm confused by this. Do you... not own a mouse? In my line of work, the actual editing of code is at most 10% of my time, and the remaining 90% is spent deliberately thinking through the actual algorithms and backend work. Piping to CLI tools is easily done through Jetbrains macros.
- skydhash 3y agoVim allows the editing to be thinking.
- smabie 3y agoI feel like using your mouse is actually pretty efficient in many cases though.
- Shorel 3y agoWhy would you want to keep your hands off the mouse? Why do you think the mouse is slow? Have you seen StarCraft players? They use the mouse and keyboard and perform an average of 200 actions per minute. In fact, to select a certain piece of text, to get precisely to the end of what I want, the mouse is, most of the time, the fastest option. I think the right idea is to use both, master them, and combine their strengths.
- enasterosophes 3y agoIt depends on what you're doing. This article is more about programming than other kinds of computery work. In the industry I work in (openstack devops/gitops, running a large fleet of ubuntu machines), using Vim isn't a flex, it's just taken for granted that you can and will use Vim at least some of the time. It's weird when I read threads like this and people treat using Vim as some kind of weird flex. It feels like I'm living on a different planet. Vim isn't a flex, it's a natural part of the broader Unix environment. It works seamlessly with Git, SSH, and the GNU ecosystem of bash, coreutils, gawk, gcc (which are all ubiquitous, too.) In such an environment, the more you learn about Vim, the more it pays off. Why? Vim is ubiquitous, (relatively) lightweight, extensible with a lot of plugins available, and stable/predictable in its behavior. Its ubiquity and history ensures there is a huge body of documentation about it on the web. Unlike some other editors, it doesn't leave hidden "artifacts" all over the place, just one hidden swp file at a time which vanishes as soon as you save and exit the editor. This politeness is attractive because you don't have to deal with stale or interfering hidden statefulness. Summary: Although you can edit quickly with Vim, and can keep getting faster the more you learn, it's not like I stick with Vim because "editing speed" is some metric that I really care about. And when assessing a candidate in an interview, it's not like I'm assessing them on their words-per-minute and tell them they need to switch to Vim to match our typing speed standards, lol. I use Vim, and I care about Vim, because it is polite and stable and integrates well with the broader Unix/GNU ecosystem I spend a lot of time working and playing in, and once you get muscle-memory for it, it feels really clunky to try using some other tool which doesn't have the same set of features.
- IshKebab 3y agoYou're not selling it to me. For simple admin tasks, Micro is totally fine. For actual programming where I really want the full power of an advanced editor, VSCode has all the properties you listed except arguably lightweight, though even there VSCode itself is pretty lightweight; it's just the heavy LSP servers that bog things down. I obviously don't see Vim as a flex. Maybe a misguided flex.
- skydhash 3y agoIt’s not VIM specifically, it’s the vim way, a language for editing texts. Actions are atomic and composable. And then you can add your own commands. You could probably use VIM inside VSCode but the latter does not expose the necessary API. What you got instead is a very simplified version. Emacs does and evil-mode is a very good vim.
- zaxomi 3y agoSome of the things I use in vim: * Mark a position in the file, so I easily can jump back. * Quick recording of a macro that to do the same type of edit multiple times (very handy when refactoring) * regular expression search and replace, very easy to limit the scope. * Easy to select, copy and paste lines or columns. Everything without touching a mouse.
- tincholio 3y agoHere, this will help: https://gist.github.com/nifl/1178878 https://gist.github.com/nifl/1178878 (Emacs user happily using Evil mode since 2011 or so)
- IshKebab 3y agoNot really. I already know that Vim can be used as a difficult-to-remember editing language. My point is that in practice the number of situations where that is better than normal editing with multiple cursors is so few that it doesn't get close to the threshold of being worth committing to memory. That gist is rather long and rambling so I only skimmed it, but it seems to list commands you can do in Vim rather than real life editing situations that they are especially good at.
- tincholio 3y agoThat's a clear case of the Blub paradox, man... Multiple cursors can be useful, but the Vim editing model goes way beyond that. If you're not interested, that's cool, but it's really your loss.
- mvdtnz 3y agoMy experience with vim faithfuls is that they have no idea what modern tools are capable of and convinced themselves 23 years ago they they had found the peak editing experience. Watching them struggle through intra team demos with their shitty editors is a highlight of my week.
- igiveup 3y ago> sure you can if you're comparing with Notepad++. But modern editors have multiple cursors Notepad++ has multiple cursors. Vim has "repeat last command", which is better.
- IshKebab 3y agoWhy is it better?
- igiveup 3y agoIt is not just typing in multiple places, but executing a vim command in multiple places. Which means, you can replace the insides of a parenthesis with something, then proceed to do the same action on a different-length parenthesis, without actually typing the whole command again. While not getting confused by other parentheses inside the first one, because the i( adverb handles that. Similar with quoted strings, words, sentences, paragraphs, etc. By "repeat last command", I meant repeating a single command with ., which can do simple things like pasting a string, deleting something, toggling case, incrementing an integer, and probably more stuff I don't use. Then there are macros which can repeat multiple commands, and are actually not much harder to use than the dot. Another thing I like about the repeating approach is that you don't have to find all the places beforehand. You can target some of them with a regex, then remember to do more of them with another regex, then the rest, one-by-one by hand. I used to think that typing in multiple places at once was cool, but now I wouldn't go back. Not even if other editors are catching up. Are they, by the way? I remember Notepad++ could not do much more than insert the same string in multiple places at once, but I confess, I have never used VS Code, Sublime, Atom, or really anything that popped up while I was in the vim rabbit hole. Am I missing out?