Live data from Hacker News

Learn Vim (2021)

github.com

141–150 of 215 posts

Re: Learn Vim (2021)

#141
post #115
post #78

Earlier quoted context omitted.

I feel like at a certain point of efficiency there are diminishing returns. A good analogy is typing speed. You don't need to have 200 wpm to be productive. Everybody adapts to how efficient they need to be at what they do. Vim is not a requirement for being productive. If it was, it would be the most popular editor. I also don't think the person you are replying to is saying that it isn't important to "master" your…

You don't need to hit 200 wpm but I haven't seen too many programmers who hunt-and-pecks at the keyboard and can't touch type. Even on a Qwerty keyboard you should be able to get high double digits, if not hit/exceed 100 wpm. The two sites I like for practice are: https://monkeytype.com/ https://play.typeracer.com/

Touch typing seem like a useless skill to me. I use keyboard more for navigation than actual typing. I read many times more code than I write.

And when I write I just need to see the keyboard with the corner of my eye and my fingers just find the right keys as I'm pecking, purely through muscle memory that I've gained with zero effort just by years of experience.

Re: Learn Vim (2021)

#142
post #136

I dunno, I never sat down to learn vim, just used it every day for a couple years. I’m not one of those wizards who is, like, answering stack overflow questions or writing wiki articles, but I get the job done. Is it necessary to learn Vim? Seems like a chore. Is the text editor really a bottleneck for anyone? I find that no matter how slow I type, I need to spend more time thinking of what to type anyway, if I’m doi…

I tried it. It's good for editing system configs on a Linux system through SSH. That's about it. A lot of people are trying to fit a square peg into a round hole. People also want to appear hip and cool, "hackery". Boring and well known is like oil to the average programmers water.

I love editing configs and fiddling around with a system over SSH with vim. Then, I have to do the main part of my job and put the changes into a YAML file for Ansible automation, which I do in VSCode :)

Re: Learn Vim (2021)

#143

Earlier quoted context omitted.

I'd honestly point folks towards Helix[0] these days if they don't already have something keeping them on neovim/vim. There's very little in the ways of needing to configure Helix; it has built-in most functionality that you'd find with batteries-included vim "distributions" and it works out of the box with the installed LSP servers on your system. [0]: https://github.com/helix-editor/helix

Helix itself looks amazing, but the keybindings make me stay away from it. Even if they are better than the original, I don't want to learn another set of "non-standard" keybindings that I need to switch between only to use an editor.

It's the opposite for me, the keybindings are the best feature IMO. It's like all the niggling little things that didn't make sense back when learning the Vim keybindings, have all been removed and replaced with things that make more of a coherent whole.

I can't use it yet because of the lack of addons/an ecosystem, but I hope to one day either move to helix or bring as much of this sensible keybindings system over to neovim as possible.

Re: Learn Vim (2021)

#144
post #78

Earlier quoted context omitted.

I feel like at a certain point of efficiency there are diminishing returns. A good analogy is typing speed. You don't need to have 200 wpm to be productive. Everybody adapts to how efficient they need to be at what they do. Vim is not a requirement for being productive. If it was, it would be the most popular editor. I also don't think the person you are replying to is saying that it isn't important to "master" your…

VS Code with vim keybindings is extremely popular. If you don't know how to use vim, you just don't realize how much of a time/effort saver it is. I can't imagine not having wrist pain if I had to use the mouse every time I wanted to move my cursor around for more than a few characters/lines. Trying to not use vim feels like going back to the stone age whenever I can't use it. I like to use vim bindings even when I'm…

Electron makes it too slow neovim and sublime are snappier it's not even funny

Re: Learn Vim (2021)

#145
post #23

I've re-built my neovim config like 3 times this year as I have played with several 'distributions' and styles. SpaceVim, LunarVim, AstroVim, and NVChad to name a few. This last weekend I gave LazyVim a try and it is by far the most sane config setup I have used and I will now be sticking with it. There is a starter repo where you clone it, delete the .git directory and start customizing. https://github.com/LazyVim/L…

https://github.com/helix-editor/helix is the answer mate

What are the design goals of helix other than neovim in rust without all the original vi/neovim key bindings sans extension interface b

Re: Learn Vim (2021)

#146
post #115

Earlier quoted context omitted.

You don't need to hit 200 wpm but I haven't seen too many programmers who hunt-and-pecks at the keyboard and can't touch type. Even on a Qwerty keyboard you should be able to get high double digits, if not hit/exceed 100 wpm. The two sites I like for practice are: https://monkeytype.com/ https://play.typeracer.com/

Typing fast for sport is fun, that I understand. But it's really weird (to me at least) how most developers say that measuring lines of code as a performance metric is an awful idea, and then there are others that more or less kinda shame people for not being good or great typists. Am I crazy? Isn't it conflicting? Maybe those two groups don't overlap at all? Then do great typists believe measuring lines of code to b…

Sure typing speed utility drops off pretty quickly but if it is a bit lower or makes just a part of your brain stop coding and think about more physical matters that should be in muscle memory then I think it has an effect on your ability to write a flow of code. (I saw this a great deal with regional keyboard layouts.)

Its hard to say if what you program will ultimately be better or worse as being used to micro interruptions can mean more diligence as much as they can mean forgetting an important caveat. But generally I think it means you are progressing at a slower rate toward an integrated group of skills.

For editors and IDEs it can be quite similar for refactoring, debugging and analysis of the code base. The worse you are at using them or the more indirect your proximity to the exact code base of the version you are working with, the more you rely on building/maintaining mental models which has its benefits and dangers.

I think its very hard to say anything is right or wrong. I do think that the question of where you expect to be in terms of needing each skill as your mastery of others grows is the question.

Re: Learn Vim (2021)

#147
post #23

I've re-built my neovim config like 3 times this year as I have played with several 'distributions' and styles. SpaceVim, LunarVim, AstroVim, and NVChad to name a few. This last weekend I gave LazyVim a try and it is by far the most sane config setup I have used and I will now be sticking with it. There is a starter repo where you clone it, delete the .git directory and start customizing. https://github.com/LazyVim/L…

https://github.com/helix-editor/helix is the answer mate

Nah the keybindings don't work once you learn the vim ones

Re: Learn Vim (2021)

#148

Earlier quoted context omitted.

Yeah I think vim style modal editing is really useful, but honestly I get about 70% of the value from doing it "wrong"; using a fast key repeat and holding down hjkl, using visual mode a lot, etc. It really doesn't need to be this mystical uber-hacker thing to be useful.

I do the same and agree, though I’m trying to push myself to be a little more sophisticated. The beauty of doing it that way is that it takes no thought. I want to select from here to just after that letter P. With hjkl and visual mode I’m already halfway there. Whenever I try something clever I always find myself thinking “is that the end of a block? Or maybe I should cut directly to P but oh there’s another one on…

Yeah I guess the next like 25% of the value I get from vim comes from "df(" and "ct)" type commands.

Also "dd" and "p" a lot to move lines around and "J" to consolidate them.

So maybe I do use a pretty large amount of functionality pretty frequently :)

I've been thinking maybe that other comment nailed it and most of us who downplay how useful it is to really learn vim have just already done that and forgotten that it was really useful.

Re: Learn Vim (2021)

#149

I dunno, I never sat down to learn vim, just used it every day for a couple years. I’m not one of those wizards who is, like, answering stack overflow questions or writing wiki articles, but I get the job done. Is it necessary to learn Vim? Seems like a chore. Is the text editor really a bottleneck for anyone? I find that no matter how slow I type, I need to spend more time thinking of what to type anyway, if I’m doi…

I don't understand this attitude. It's clearly more conducive to solving problems to be able to move around our environment more quickly. It's extremely useful (compared to a beginner who only knows insert and write quit) to understand the different vim modalities as well as a few commands to jump around a file or to perform regex or to call an external command. When you're not proficient with the necessary tools, yo…

> It's clearly more conducive to solving problems to be able to move around our environment more quickly.

Then vim ain't it.

My "vim-empowered" colleagues spend significantly more time trying to find symbols, related configs and tests, function definitions and interface implementations than I do. Because their hodge-podge collection of vim plugins and extensions rarely amounts to anything more than a full-text search across the whole project.

But sure, you can count the number of lines where you need to go and then the number of characters/words you need to move in the line and code it in 3 characters. By the time you've done that I've clicked there with the mouse, found the definitions and done project-wide refactoring.

Re: Learn Vim (2021)

#150

I dunno, I never sat down to learn vim, just used it every day for a couple years. I’m not one of those wizards who is, like, answering stack overflow questions or writing wiki articles, but I get the job done. Is it necessary to learn Vim? Seems like a chore. Is the text editor really a bottleneck for anyone? I find that no matter how slow I type, I need to spend more time thinking of what to type anyway, if I’m doi…

> Is it necessary to learn Vim?

Though I no longer program, I am still a huge VIM enthusiast, but no it is not necessary to use VIM. I just love it because it made me more efficient, but at times I think that writing code really really fast might actually be a bug and not a feature.

For editing code it's amazing though. People looking over my shoulder used to think I was a wizard.

Post reply on HN