Live data from Hacker News

History and Effective Use of Vim

begriffs.com

221–226 of 226 posts

Re: History and Effective Use of Vim

#221

Earlier quoted context omitted.

> After years of a love/hate relationship with Vim (I love what it does, but have configuring it), I had an epiphany: by sticking with the defaults, whether they are my preferred choices or not, I can instantly understand how to use Vim in any environment. Which I've never found much important. If you know Vim basics (modes, basic commands, movements, etc), then you can use vim in any environment that you SSH to or h…

> But why wouldn't you want the Vim on your main driver laptop, which you use every day to not have a nice custom setup, and some good third party plugins (e.g. file search, linting, etc)? There are two assumptions I think you're making here: Assumption 1: You can do better than the defaults enough to justify the costs of optimizing. I use a pretty much default vim configuration as my primary development environment,…

> The power of vim is that it lowers a lot of more complex edits to the subconscious level: swapping two lines is three keystrokes, so it's a simple enough process that I don't have to think about it.

But it's not. In a modern editor, swapping two lines is ctrl-shift-up for swapping up, or ctrl-shift-down for swapping down.

Vim isn't that much more powerful any more compared to modern code editors, it's just weirder.

> I've known Notepad++ users who were faster Ruby programmers than me--I could certainly edit faster with vim

So were you a faster typer? How was it faster?

I find there's two points that get me speed in a code editor: Language specific shortcuts (like go to definition) and multi-cursor editing for editing formulas and the like.

But I'm not sure if Notepad++ has multi-cursor.

I'm not sure if vim does, either? I know you can do stuff whose result is very similar to as if you were multi-cursor editing, but do you actually get intuitive methods to place multiple cursors in various ways and then interactively edit what's there while seeing it change?

Because that's no longer a "nice to have". There's a huge difference between formulating an incantation in your head firing, and seeing if the result is right--that gets really complex with multiple edit points--and doing it interactively. You actually see a block of code grow and unfold interactively as you edit it. And it doesnt involve regular expressions :) (which are cool, but almost never fail to take my mind completely off the problem at hand, I only benefit if it operates on a pretty large chunk of text)

Re: History and Effective Use of Vim

#222

Earlier quoted context omitted.

> But why wouldn't you want the Vim on your main driver laptop, which you use every day to not have a nice custom setup, and some good third party plugins (e.g. file search, linting, etc)? There are two assumptions I think you're making here: Assumption 1: You can do better than the defaults enough to justify the costs of optimizing. I use a pretty much default vim configuration as my primary development environment,…

> The power of vim is that it lowers a lot of more complex edits to the subconscious level: swapping two lines is three keystrokes, so it's a simple enough process that I don't have to think about it. But it's not. In a modern editor, swapping two lines is ctrl-shift-up for swapping up, or ctrl-shift-down for swapping down. Vim isn't that much more powerful any more compared to modern code editors, it's just weirder.…

You won’t ever catch me saying that vanilla vim is the best editor out there but it’s sufficient, as are all of the others you named. At some point, the bottleneck becomes thinking up the correct solution and not the data entry. In my opinion, we passed that point at least a decade ago; even if you reduced the amount of data entry effort to zero, it’ll make little difference in my overall efficiency as a programmer.

Re: History and Effective Use of Vim

#223

Earlier quoted context omitted.

Not to be unkind but have you tried actual Vim or adding any functionality to an ide?

Not OP but I’ve been using ideaVim for many years now and I can say that it’s quite good. It even uses my main .vimrc file and handles most of the things very well.

https://github.com/JetBrains/ideavim for any readers interested.

It IS much better than when I tried it. It parses your vimrc with and matches simple patterns to support the subset of features it does support but it doesn't really have an interpreter although one was discussed

https://youtrack.jetbrains.com/issue/VIM-669

Which means no plugins for example or complex viml. Presumably this would simply be ignored not broken.

Another approach for a different environment that seems more interesting https://github.com/lunixbochs/ActualVim I don't use sublime so I can't report on how optimal it is the idea of using an embedded vim instance is certainly interesting.

Re: History and Effective Use of Vim

#224

Earlier quoted context omitted.

> But why wouldn't you want the Vim on your main driver laptop, which you use every day to not have a nice custom setup, and some good third party plugins (e.g. file search, linting, etc)? There are two assumptions I think you're making here: Assumption 1: You can do better than the defaults enough to justify the costs of optimizing. I use a pretty much default vim configuration as my primary development environment,…

> The power of vim is that it lowers a lot of more complex edits to the subconscious level: swapping two lines is three keystrokes, so it's a simple enough process that I don't have to think about it. But it's not. In a modern editor, swapping two lines is ctrl-shift-up for swapping up, or ctrl-shift-down for swapping down. Vim isn't that much more powerful any more compared to modern code editors, it's just weirder.…

> But it's not. In a modern editor, swapping two lines is ctrl-shift-up for swapping up, or ctrl-shift-down for swapping down.

Sure, if you really hate your hands. ;)

> So were you a faster typer? How was it faster?

Maybe I just was a faster typist. I don't know. It doesn't really matter to the point: if your text editor gets out of the way enough that text editing isn't your bottleneck, then all time spent optimizing your text editor usage is completely wasted. My argument isn't "vim is better than Notepad++", my argument is "vim in the default configuration is good enough to not be a bottleneck". Notepad++ may be good enough to not be a bottleneck either--I haven't used it enough to have an opinion.

> Language specific shortcuts (like go to definition)

I would argue that this is more of an IDE feature than a text editor feature.

> multi-cursor editing for editing formulas and the like.

I'm not sure what you mean here. There's two things I do in vim which might be what you're talking about: splits so I can be in two parts of the same file at once, or splits where I have a REPL open and am editing fragments in one half of the screen while running them in the other half of the screen. But if you're talking about something else, I'd like to understand it so I can learn how to do it in vim. ;)

Re: History and Effective Use of Vim

#225
post #222

Earlier quoted context omitted.

> The power of vim is that it lowers a lot of more complex edits to the subconscious level: swapping two lines is three keystrokes, so it's a simple enough process that I don't have to think about it. But it's not. In a modern editor, swapping two lines is ctrl-shift-up for swapping up, or ctrl-shift-down for swapping down. Vim isn't that much more powerful any more compared to modern code editors, it's just weirder.…

You won’t ever catch me saying that vanilla vim is the best editor out there but it’s sufficient , as are all of the others you named. At some point, the bottleneck becomes thinking up the correct solution and not the data entry. In my opinion, we passed that point at least a decade ago; even if you reduced the amount of data entry effort to zero, it’ll make little difference in my overall efficiency as a programmer.

Exactly, you said it better than I did.

Re: History and Effective Use of Vim

#226

Earlier quoted context omitted.

You can install IdeaVim in PyCharm. I've been using IdeaVim with IntelliJ for 6 years and could never go back to non-vim style editing. This plugin provides the best of both worlds.

Not to be unkind but have you tried actual Vim or adding any functionality to an ide?

Yes I have used plain Vim as a text editor for many years. It's a great text editor. I know it was also used for writing code back in the old days. For working on large modern JVM codebases, however, Vim is a toy in comparison to IDEA. Vim is for manipulating syntax. IDEA has advanced semantic features that will remain far outside of Vim's domain.
Post reply on HN