Live data from Hacker News

Vim Anti-Patterns That Cause Beginners To:Quit

paweldu.dev

61–70 of 135 posts

Re: Vim Anti-Patterns That Cause Beginners To:Quit

#61
post #9

I just don't buy the premise that I will profit from spending a lot of time optimally customizing a text editor to my supposedly very unique and special needs. Seems more like a weird para-work hobby than an actual productivity hack.

Then don't. Just learn the basics. Learn how to use insert mode, edit some files, ignore anything not directly relevant. Eventually you'll come across a particular use case where opening a full blown IDE doesn't feel worth the effort, so you'll open vim. You'll learn a few shortcuts, because it would be nice to delete an entire line, or just look at the end of the file. What do you know `dd`, and `G` respectively do…

> Eventually you'll come across a particular use case where opening a full blown IDE doesn't feel worth the effort, so you'll open vim.

I'm not sure that's still relevant, given the popularity of VSCode

> You'll learn a few shortcuts, because it would be nice to delete an entire line, or just look at the end of the file. What do you know `dd`, and `G` respectively do that for you.

That might be just me, but 99% of my navigation is a ctrl+f (a search) or a ctrl+click (go to definition). Most of my "complex" editing needs are served well by the multi cursor and ctrl+left/right arrow (go over a "whole" word). I know that vim is a generalisation of that, and instead of having a specific thing like this you have a whole language to compose things, but I just don't see the point.

I wonder if it's one of those thing that appear universal, but is in fact very personal, and "vim people" are different from "emacs people" and from "VSCode people" and from other people in a fundamental way that can't really change, and that is visible mostly through the editor choice.

Re: Vim Anti-Patterns That Cause Beginners To:Quit

#62

There's been a number of "anti-vim, use a real ide(TM)" posts coming into my feed lately and I don't get why. Do people really get buttmad about this? I switched from vscode to vim as I found it to be largely much faster in getting around when I started my new job, some people find the opposite. A ok. Why do people try to force us into these largely closed solutions? ( Mainly it's vscode, which has a real EEE threat)

I've never gone for vi(m), even after roughly 25 years of using Linux now. I'm not trying to force you into anything, certainly not anything closed. I used NEdit until its lack of utf-8 and ancient GUI library started causing trouble. Then I used Slava Pestov's JEdit, which was wonderfully extensible and portable. Now I use vscode, which is just so outrageously well made that even electron and Microsoft can't scare m…

If you followed through with your analogy, you'd have to concede that non-modal editors are like cars without gearboxes.

Either way, what's distracting context switching for one, is essential functionality that enables effortless work for another.

(Edit: I mostly use VSCode with the Neovim extension myself)

Re: Vim Anti-Patterns That Cause Beginners To:Quit

#63

There's been a number of "anti-vim, use a real ide(TM)" posts coming into my feed lately and I don't get why. Do people really get buttmad about this? I switched from vscode to vim as I found it to be largely much faster in getting around when I started my new job, some people find the opposite. A ok. Why do people try to force us into these largely closed solutions? ( Mainly it's vscode, which has a real EEE threat)

I’ve went through various editors and IDEs in past years. 2 years ago, I started using vim for exact same reason as yours.

Nowadays, I use both vscode and neovim but mostly neovim as it’s faster for me.

The problems I see are -

- not everyone is comfortable with customizing their editor.

- the meaning of bare-minimum features is different for everyone.

- some of us try hard to learn vim and then give up, declaring it unfit.

- some of us go too far in customizing it and end up thinking that we are overdoing it.

So, some of this hate may be genuine, but generally, people don’t hate vim.

They just hate the way they know/use it. At least I did.

Re: Vim Anti-Patterns That Cause Beginners To:Quit

#64
post #61
post #9

Earlier quoted context omitted.

Then don't. Just learn the basics. Learn how to use insert mode, edit some files, ignore anything not directly relevant. Eventually you'll come across a particular use case where opening a full blown IDE doesn't feel worth the effort, so you'll open vim. You'll learn a few shortcuts, because it would be nice to delete an entire line, or just look at the end of the file. What do you know `dd`, and `G` respectively do…

> Eventually you'll come across a particular use case where opening a full blown IDE doesn't feel worth the effort, so you'll open vim. I'm not sure that's still relevant, given the popularity of VSCode > You'll learn a few shortcuts, because it would be nice to delete an entire line, or just look at the end of the file. What do you know `dd`, and `G` respectively do that for you. That might be just me, but 99% of my…

> VSCode

It's not even good! This has to be the strangest cargo-cult following of all options you could have. If you're going to use a proprietary closed editor anyway, use something like a jetbrains IDE. At least then you will have a lot of very complete and well-integrated features.

Re: Vim Anti-Patterns That Cause Beginners To:Quit

#65
post #15

Earlier quoted context omitted.

I spend all days writing code in my editor, and will probably do so for many decades to come. Even small improvements will add up to to large differences over time.

My speed of writing code (or anything else really apart from commenting on random websites) is limited mainly to my thought process about the logic I'm about to write. If you can code so fast that fractions of a second make a difference then more power to you but most people probably can't.

And I spend even more time reading and refactoring code than writing it. Vim has many improvements for both of these, and all these seconds here and there really adds up in the end.

Re: Vim Anti-Patterns That Cause Beginners To:Quit

#66
post #64
post #61

Earlier quoted context omitted.

> Eventually you'll come across a particular use case where opening a full blown IDE doesn't feel worth the effort, so you'll open vim. I'm not sure that's still relevant, given the popularity of VSCode > You'll learn a few shortcuts, because it would be nice to delete an entire line, or just look at the end of the file. What do you know `dd`, and `G` respectively do that for you. That might be just me, but 99% of my…

> VSCode It's not even good! This has to be the strangest cargo-cult following of all options you could have. If you're going to use a proprietary closed editor anyway, use something like a jetbrains IDE. At least then you will have a lot of very complete and well-integrated features.

> It's not even good! This has to be the strangest cargo-cult following of all options you could have.

I don't think that's true. It's lighter and faster than big IDEs while being way more accessible than them and vim/emacs. It handles most of what you throw at it, has lots of very good extensions, and you can easily use your shell. If you don't understand what's good about it, that's a failure on your part.

> If you're going to use a proprietary closed editor anyway

It's open source though.

> use something like a jetbrains IDE

My experience with jetbrains has been mostly terrible. That doesn't mean that their IDE isn't good, but it means that they are worse than VSCode for me.

> At least then you will have a lot of very complete and well-integrated features.

I already have that.

Re: Vim Anti-Patterns That Cause Beginners To:Quit

#67
post #60
post #34

Earlier quoted context omitted.

I can only speak to my experience, and I might be mistaken: but the reason I tend to reach for vim bindings is not because I already know them- it's because, mostly, it's consistent where as IDE key binds change depending on the platform and IDE. IntelliJ has programmable keys and they prompt you on first run which ones you'd like to use "Original?", "MacOS", "Linux". VSCode has it's own key binds for various movemen…

> VSCode has it's own key binds for various movements (like indenting a block) Like tab or is something more elaborate?

Sorry, I wasn’t clear; I meant multi line indentation.

In vim and vim emulators you select multiple lines with visual mode and press >

Or you do “10>>” and it will indent the next 10 lines.

This is how you do it in vscode:

https://code.visualstudio.com/docs/editor/codebasics#_multip...

This is how you do it in IntelliJ:

https://www.jetbrains.com/webstorm/guide/tips/multi-cursor/

Re: Vim Anti-Patterns That Cause Beginners To:Quit

#69

Earlier quoted context omitted.

>The great thing about vi(m) is that it's always there. SSH'd into some random server and need to edit some random config? vim I hate that, I ssh in, then maybe I want to edit cron and I am hit with vim(someone changed the simple nano with it), in the past you had no choice then google how to quit vim but now it will tell you how to do it(I ssh and change config files 1 or 2 times a year). I never learned how to quit…

A lot of times it's easier to just learn the tools of the trade instead of fighting a never-ending battle. I don't need or like awk, but I learned it because it's in use and it was very helpful to do so.

vim - is not my tool of trade, I am developer so I prefer IDEs like Intellij for coding and for config files I will use kate for local and for remote nano will do the job.

It makes no sense to learn vim because I am hit with it once a year, I better learn tools like "tail" and "grep" this ones are useful for what I do.

But sure if you are a sysadmin or ssh daily and edit big complex config files the sure learn vim if you really want that.

Re: Vim Anti-Patterns That Cause Beginners To:Quit

#70
post #55

Earlier quoted context omitted.

I've never gone for vi(m), even after roughly 25 years of using Linux now. I'm not trying to force you into anything, certainly not anything closed. I used NEdit until its lack of utf-8 and ancient GUI library started causing trouble. Then I used Slava Pestov's JEdit, which was wonderfully extensible and portable. Now I use vscode, which is just so outrageously well made that even electron and Microsoft can't scare m…

stick shift That is an unfair comparison on the edge of a strawman. In vim, you see your mode right at the cursor shape (bar in insert, block in normal, selection in visual). It’s like saying that DEs are bad because switching active windows is modal. Why not send input to the first window in the taskbar by holding ctrl and to the second by holding ctrl-shift then? Does that sound absurd? Even when you make a modal m…

Yes, visual feedback reduces the chance of errors with mode switching. I believe (correct me if I'm wrong) it's one of the improvements vim has on old vi. Unlimited undo is another one vi certainly didn't have from the start.

I did say the stakes are much lower. But shouldn't we make less critical interfaces with the same care we make more critical ones?

And yes, many things we still have in UIs are arguably mode switching and bad, it's just we haven't figured out better ways to deal with it. With editing we did, long ago.

Post reply on HN