Live data from Hacker News

Ask HN: How to become good at Emacs/Vim?

news.ycombinator.com

51–60 of 84 posts

Re: Ask HN: How to become good at Emacs/Vim?

#51
post #40

Earlier quoted context omitted.

I mean, you're going to be programming for the rest of your life, right? I put a bunch of time into customizing vim... god, I think it was 15 years ago? Whenever this comes up, people make it sound like you are somehow going to be doing that every single day for the rest of your life or something... and then, awkwardly, I tend to see them screwing around constantly with some new IDE-of-the-week that crashes constantl…

And then there's the majority of devs, like me, who did not spend months forcing themselves to actually make vim/emacs into an IDE and, at the same time, who suffer from no negative effects with one of those "IDE-of-the-week" (JFYI, that's not a thing). Intellij, Pycharm, and VSCode are all stable and fast. I don't think I've had neither of those crash on me in the past three years. You're laying out a false dichotom…

I'm not laying out a false dichotomy, I'm laying down two stacked arguments, and you are welcome to disagree or agree with each of them separately (and it isn't even clear to me that you disagree with the first one--about how that supposedly-large cost is amortized over a lifetime of development--as you seem to have been so distracted by the second).

(And yes, IDE-of-the-week is definitely a thing. The shear number of different one-off text editors and IDEs for various language stacks I've seen people try to get me to use over the past 25 years is staggering.)

Re: Ask HN: How to become good at Emacs/Vim?

#52
> Even after 1-2 weeks

You should accept a longer trajectory -- say 1-2 years to learn it and 7 years to get good at it. But even then it means you need to review things you do, look for repeated patterns and wonder about/hunt down smarter ways of doing things.

A big help for me when starting was hanging out in the Vim IRC channel (Freenode, I think). This stackoverflow reply is a classic on how to learn Vim: https://stackoverflow.com/a/1220118/4751065

Bairui's blog has some good stuff, but sadly he left the IRC channel in 2015 then I guess: http://of-vim-and-vigor.blogspot.com/?m=1

Finally, of course, the koans: https://blog.sanctum.geek.nz/vim-koans/

Re: Ask HN: How to become good at Emacs/Vim?

#53
> Just using them doesn't really work because by myself I'd never discover most of the features and keybindings.

You could try thinking of which things feel tedious in Vim, and look up known ways to do it. It's rare that you come across a situation that can't be dealt with using a keybinding or plugin. But sometimes you just can't know beforehand what to look for, you likely won't learn features in the optimal order because there's just so much. Guides and tips on the internet come from people with very different workflows.

I'll just add a few things that might be useful to you, because they took me FAR too long to discover:

    - * and # search the word under the cursor
    - { and } lets you jump across paragraphs
    - set clipboard=unnamedplus makes y, d, c, p use the system clipboard
    - ci( to replace everything inside a pair of parentheses. Same works for [, {, 

Re: Ask HN: How to become good at Emacs/Vim?

#54
post #39

Earlier quoted context omitted.

Whether you call it over-engineering or procrastination, customizing an editor is a delicious waste of time.

I'm certainly not knocking it. I have enjoyed it in the past, particularly with emacs. But it's an activity which some enjoy for its own sake and some don't. It's just not a necessary condition for becoming a 'productive' developer. Those who do enjoy it to the point of writing some of the great open source plugins available, do the rest of us a terrific service.

Just as you, I certainly don't relate productivity and editor config.

My co fig now is really simple: I rely on other's work: I find powerline-10k + LunarVim to make for a more than good enough terminal environment.

Re: Ask HN: How to become good at Emacs/Vim?

#55
I converted to vim from TextMate, I dunno, something like 10-12 years ago? I've used neovim, specifically, for the last couple years.

I think the thing that originally hooked me were Drew Neil's Vimcasts[1].

I do agree with others here, though, that ~2 weeks is not enough time. You need to force yourself to live with it for longer than that, and any time you encounter a pain point or something that you feel should be less cumbersome, have the patience to Google for solutions.

Personally, I feel that time investment has been worth it, but YMMV.

I'd also probably recommend getting your vim/emacs/whatever setup working really well for one language at a time, rather than trying to make it work for a bunch of different things all at once. Getting e.g. LSP-based autocomplete to work is a very language-specific effort, and is far from plug-and-play.

If it's helpful at all, I publish and version control my vim config on GitHub[2]. I can't guarantee it'll work on anything but my machines, but feel free to send Pull Requests. :-)

[1]: http://vimcasts.org

[2]: https://github.com/codykrieger/dotvim

Re: Ask HN: How to become good at Emacs/Vim?

#56
post #40

Earlier quoted context omitted.

I mean, you're going to be programming for the rest of your life, right? I put a bunch of time into customizing vim... god, I think it was 15 years ago? Whenever this comes up, people make it sound like you are somehow going to be doing that every single day for the rest of your life or something... and then, awkwardly, I tend to see them screwing around constantly with some new IDE-of-the-week that crashes constantl…

> I tend to see them screwing around constantly with some new IDE-of-the-week that crashes constantly and slows them down at every turn gloating about how they "saved time" by not spending a small amount of time forever ago to figure out what the hell they actually wanted This is just as much a caricature as the one you're objecting to. People do good work using all of the available tools. Some use more than one! The…

I'm totally cool if you want to use IntelliJ. I'm somewhat less cool if you are telling me how awesome IntelliJ is this year after trying to get me to use Eclipse on your last project but are now looking at VSCode as an alternative because you are sick of switching between this stack and Xcode and PyCharm after you stopped just trying to use Sublime for everything... and I certainly lose all sympathy when these same people actively defend this insanity by saying they don't think it makes sense to "waste time" "over-engineering" their text editor setup.

Like, if you want to tell me "I use nothing but notepad, and I'm a god at it" I'm going to be "holy hell yeah, I want to feast my eyes upon this marvel"... but, first off, I'm betting at that point you are going to have gotten really good at using notepad, along with all of the little warts of how it interacts with Explorer... and second off, the people who are coming out always to bash on the people who bother to learn and optimize their tools to prepare for a lifetime of software development generally aren't people who simply chose a different tool.

Re: Ask HN: How to become good at Emacs/Vim?

#57
> when I watch proficient people using these editors I'm always amazed at what they can do

Maybe provide a few examples? Might help to understand what kind of productivity gains you are trying to achieve (and help with giving you better learning material for vim/emacs).

I've been using vim for ~15y, and it's been my exclusive editor for the past 10y. But I also have a lot of experience with Eclipse (and love it!).

When it comes to editors/tools, I don't think about productivity, but the amount of irritation. IMO, it's not about increasing the output/speed, but removing the things that irritate you (cause friction) so you can keep longer focus and do fewer context switches. If there's no friction, the tool you are using is already good choice.

What I noticed when using vim:

- In the beginning, it was difficult to get used to the modal mode. It took me quite some time and effort.

- Setting up vim from scratch is pain. Having a config to bootstrap from is great help.

- The startup time is amazing! This was one of the sources of irritation when working with the other editors.

- Using mouse causes context switch. Another irritation.

- I love vim macros. They are uncomplicated, almost friction free. And make repetitive and dull task easy and less boring (less irritation).

- Vim UI for searching, replacing, jumping to a specific line is distraction free. No context loss due to a pop up like in the classic editors (have no idea what's this like in vscode). I realized this is an irritation only after using vim for years and then having to do find/replace in a word processor.

- Simple extensibility removes a lot of irritation. Instead of having to write a complex plugin, a small script is enough (e.g. I use Fzf inside Vim a lot, or calling other small scripts from vim). Having to adjust to UX of a specific plugin (and be ready for its brakeage upon every editor update) was significant source of irritation.

Does anything from above resonate with you? I'll be happy to provide more context or pointers.

BTW. the best short text about Vim on the whole Internet is the answer at https://stackoverflow.com/questions/1218390/what-is-your-mos...

Re: Ask HN: How to become good at Emacs/Vim?

#58

> Just using them doesn't really work because by myself I'd never discover most of the features and keybindings. You could try thinking of which things feel tedious in Vim, and look up known ways to do it. It's rare that you come across a situation that can't be dealt with using a keybinding or plugin. But sometimes you just can't know beforehand what to look for, you likely won't learn features in the optimal order…

thanks, started using vim full time and I had no idea about # or *

was always searching with / and "n"

Re: Ask HN: How to become good at Emacs/Vim?

#59
post #37

when I watch proficient people using these editors I'm always amazed at what they can do, and they appear more productive than I am with VSCode Editing text efficiently is not the same as being a productive developer. The bottleneck is rarely how fast you can type or edit the code; it's how fast you can reason about the code. When you watch a prerecorded video most of the time all the thinking has already happened, a…

> The bottleneck is rarely how fast you can type or edit the code; it's how fast you can reason about the code. That's the reason why I have been not learning to touch type for the last decade or so. I just have this strong feeling that it's my brain, not my fingers that is the bottleneck. At the same time, I somehow acknowledge that being able to touch type could in some still undefined way to me increase my product…

I would recommend learning to touch type. The benefits are many. I can look at the screen or something else while typing. Typing requires essentially no conscious attention. I can just think more easily while typing.

I also got a job from it once, when the company boss saw me coding away and was impressed by my typing speed! Silly I know, but it did happen :)

Really doesn't take that long to learn, a few weeks or months of a small amount of daily practice would get you to enough proficiency to use it for real. I used Mavis Beacon I think, but that was a long time ago.

Re: Ask HN: How to become good at Emacs/Vim?

#60
Tired of the bloat, overhead and friction of using everything else, gui, I realize what really endures for me.

Keeping it simple and staying in the terminal (tmux, vim, fzf, rg, etc) slowly and incrementally over 18 yrs it just makes sense. It is not about good, but about what's comfortable and known, like learning a language; there's always something new and fun to incorporate. Despite years with emacs-nox, Orgmode, EvilMode and DoomEmacs, I kept returning and staying in vim. Old habits, die hard.

Post reply on HN