Live data from Hacker News

Vim Anti-Patterns That Cause Beginners To:Quit

paweldu.dev

31–40 of 135 posts

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

#31
> Don’t go all-in

That's how I got over the learning cliff though..

I had a rudimentary understanding of vim for a few years, but what really made me prolific at it was a point where I decided to forego productivity for a month and use it full time (not vim binding in IDE, just full vim, with vim plugins and whatnot).

It coincided with a new job, and I only had to slightly wean myself off vim by conceding Java to intellij (but with vim binding). I still edit all other languages in vim directly, when there are many packages and distracting threads, vim is fast because it skips setup process and works everywhere in the same way.

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

#32
I’ve used vi(m) since 1989. I still use it lots.

A while ago though, I made an interesting realization/admission (at least for me).

Vim is great for small files (because it’s ingress is so quick and fluid and universal) and pretty good at editing/tweaking existing content.

But I have found it painful for original authoring of large original content. So if I need to rough out the first go at a python/elixir/c code base of anything that’s gonna be larger than two screens of text, I’ll pull out a “real” editor and build it up.

As I switch back into tweaking mode past the original splurge of content creation I often go back to Vi(m). It’s ability to navigate/modify existing code is unparalleled. That’s been my experience at least.

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

#33
I honestly can't stand editing large amounts of text without vim after learning it six years ago. Writing social media comments in a is one thing, but anything I actually intend on seriously editing? Can't live without (neo)vim. My brain now cringes at the thought of reaching for my mouse, pointing, clicking, then dragging, and moving my fingers in weird, uncomfortable positions to do things like copy and paste.

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

#34
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…

People say things like this, as if other text editors don't have the same functions. The alternative is not "notepad.exe", it's Textpad, VS Code, or IntelliJ IDEA. Delete an entire line: CTRL-Shift-K in VS Code. Or just look at the end of the file: Ctrl-End in most editors. Etc...

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 movements (like indenting a block), I know sublime does too.

It's all just too much hassle, and obviously that doesn't translate to being ssh'd into a server and needing to move some text around, which is harder than it ought to be in Nano. (but you only feel that after you've learned vim.. so.. that's weird, there has to be a universal law about that somewhere)

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

#35

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.

This is why I use nano. forgot one of the important keybinds? its right there on the footer.

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

#36
post #33

I honestly can't stand editing large amounts of text without vim after learning it six years ago. Writing social media comments in a is one thing, but anything I actually intend on seriously editing? Can't live without (neo)vim. My brain now cringes at the thought of reaching for my mouse, pointing, clicking, then dragging, and moving my fingers in weird, uncomfortable positions to do things like copy and paste.

i have taken to vscode because of the nice that is all the extensions. that said it can have neovim as a backing editor so that's what i use and it's not amazing but pretty great overall

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

#37

Earlier quoted context omitted.

Does sublime support vim keys?

A lot of vim/vi plug-ins are buggy and support just enough to really drive you crazy

fwiw i've also thought that and moved to vscode with neovim as the backing editor for normal mode and it's generally fantastic. some rough edges but not that many... it's still neovim and vim in the background

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

#38
post #11

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. Imho there are strictly better options than vim for this nowadays for people who are not already invested in vim. Sublime text is easier for people that prefer GUIs. For CLI, Kakoune has better discoverability, better thought/more consistent commands, and actually usable colorschemes…

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. And Sublime is vim with a user-friendly-ish GUI wrapped around it.

>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, just o use EDITOR=nano command to get a simple editor, I don't need a powerful editor for config files.

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

#39

I’ve used vi(m) since 1989. I still use it lots. A while ago though, I made an interesting realization/admission (at least for me). Vim is great for small files (because it’s ingress is so quick and fluid and universal) and pretty good at editing/tweaking existing content. But I have found it painful for original authoring of large original content. So if I need to rough out the first go at a python/elixir/c code bas…

> But I have found it painful for original authoring of large original content, .... anything larger than two screens of text.

I guess the balance is in how much you're writing compared to editing; I'd hazard a guess to say that most programmers are editing code mainly, with only short bouts of creation.

Whenever I'm creating, I always need to modify as I go; spelling errors, re-order thoughts, delete entire words, etc. and I find the vim keybindings too mnemonic to not use anywhere else.

Even when I'm writing research papers on sharelatex.org, I still try to turn on vim mode, because I find myself trying to type ":w" and "ciw" all over the place.

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

#40
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…

To be a bit snarky:

  sed 's/vim/nano/g'
If you care about quick edits in a user friendly environment, you might as well use software that's simple to use and doesn't have a steep learning curve, instead providing user friendly shortcuts.

In my eyes, Vim is better suited for more advanced text processing and more macro heavy edits, where you need to do lots of repeated actions. Of course, if you are used to Vim, might as well use it for everything, however if you don't that suggestion is possibly a suboptimal one.

Though there's definitely a space that's also occupied by regular text editors (like Notepad++ or the *nix equivalents) if you're in a graphical environment where you even have the possibility of opening an IDE.

Post reply on HN