Live data from Hacker News

Turning vim into an IDE through vim plugins

safaribooksonline.com

21–30 of 63 posts

Re: Turning vim into an IDE through vim plugins

#21
post #17

I tried very hard to get used to Vim. I just feel compared to something like Visual Studio Code it's still very clunky. I can understand why people who have used it for a decade prefer Vim over other text editors. They already know how to use it and how to integrate it into their workflow. For a newcomer this task, it seems, is nigh insurmountable. Are there people who recently got into it and think it's the superior…

What I found about Vim is that it requires a bit of mind shift, compared to other IDEs. I came to the game very late, but yeah, I've been editing with Vim for the past 6-7 years. My primary motivation when moving to Vim, was that I didn't like using mouse and then running back to the keyboard to write text. Now, it might not seem like much time is wasted during this shift, but imagine doing this many time during work day and it adds up. Furthermore, I did a lot of editing on remote systems, which were headless, so you didn't get graphical editors.

When learning Vim it's not wise to learn about everything at once. start slow at first, lear a few commands, then when you find you are doing something many times, try to find way to optimize it. Try not to use mouse for highlighting, use different visual modes instead (visual line, visual block are great).

Here is article be the Vim author which can give you some hints on how to edit files: http://moolenaar.net/habits.html

And as he mentions there, it can be applied to making your editing more efficient with other editors as well, so it's not a waste of time :)

Re: Turning vim into an IDE through vim plugins

#23
post #17

I tried very hard to get used to Vim. I just feel compared to something like Visual Studio Code it's still very clunky. I can understand why people who have used it for a decade prefer Vim over other text editors. They already know how to use it and how to integrate it into their workflow. For a newcomer this task, it seems, is nigh insurmountable. Are there people who recently got into it and think it's the superior…

> Are there people who recently got into it and think it's the superior way to code and why?

I started coding with Visual Studio, and then later Eclipse. I like both IDEs. I only learned about vi/vim about a year after I started programming, and it looked intimidating.

2 years after that, I decided, fuck it, let's see if I can do this. It took me one day to learn how to comfortably navigate with the hjkl keys, as well as how to copy/paste and save/exit. Which was all I needed at first. Over the next two weeks I learned a few more things that you could do, and I never looked back.

It wasn't difficult at all to learn vim. The only thing that I can think of that would make it difficult to learn, is if you don't know how to touch type.

As for why I think it is superior:

The . (repeat) action is so insanely useful and saves you so much time.

Most actions are blazingly fast compared to a gui text editor. e.g. To delete a whole line just press dd instead of home + shift + end + delete

Memorizing all these shortcuts is easy, becuase they are based on a 'grammar' that makes new command combinaitons easy to guess.

There hasn't been one feature that and IDE has that I used, which can't be achieved in vim (or via a plugin)

vim doesn't take up crazy resources, and is installed on most systems by default anyway. And the startup time is almost instant.

Re: Turning vim into an IDE through vim plugins

#24
post #15
post #10

While I would never sell it as "turning vim into an IDE", I use most of these plugins. ctrl-P is great, but I would probably switch to fzf if I was bothering to update my vimrc and plugins lately. Fundamentally, I think people trying to sell emacs/vim with plugins as "turn X into an IDE" are sort of not getting what people see and get from IDEs, though. There's quite a bit more integration that goes into IDEs and wha…

I don’t disagree on principle, but a highly-configured Emacs can easily reach levels of integration that I think is worthy of the “Integrated Development Environment” label. For vim, I suspect it’s more like “as close to IDE level as a dedicated vim user is likely to want”. (Fwiw, I use Emacs a lot, vim a little, and my hardcore IDE usage is several years back, so maybe that’s just my biases showing.)

> a highly-configured Emacs can easily reach levels of integration that I think is worthy of the “Integrated Development Environment” label

I disagree. I've _never_ seen an integration into emacs that comes close to a _good_ integrated debugging experience. Similarly, the navigation/refactoring integrations tend to feel bolted on, rather than integrated. (you're using projectile and irony mode? They both have different representations of what your "project" is, so you have to keep both up to date). Again, actually "building" from emacs is something I've never seen done well. You've inevitably got the compile command which you have to write yourself, but my IDE can parse its own project file, generate a list of targets and configurations (predefined compiler flags for optimisation/definitions) and build those in one keystroke. I've also never seen any integration of any autocomplete that works with configurations either.

Re: Turning vim into an IDE through vim plugins

#27
post #17

I tried very hard to get used to Vim. I just feel compared to something like Visual Studio Code it's still very clunky. I can understand why people who have used it for a decade prefer Vim over other text editors. They already know how to use it and how to integrate it into their workflow. For a newcomer this task, it seems, is nigh insurmountable. Are there people who recently got into it and think it's the superior…

> Are there people who recently got into it and think it's the superior way to code and why? I started coding with Visual Studio, and then later Eclipse. I like both IDEs. I only learned about vi/vim about a year after I started programming, and it looked intimidating. 2 years after that, I decided, fuck it, let's see if I can do this. It took me one day to learn how to comfortably navigate with the hjkl keys, as wel…

> Most actions are blazingly fast compared to a gui text editor. e.g. To delete a whole line just press dd instead of home + shift + end + delete

Ctrl + X works on most 'gui text editors'

> There hasn't been one feature that and IDE has that I used, which can't be achieved in vim (or via a plugin)

How does "find references" work in vim? If i want to find all usages of a method called "getName", does it know how to differentiate between calls on an object of the class I'm searching from, or usages from all classes that have a "getName" method (aka dumb text search)?

Re: Turning vim into an IDE through vim plugins

#28
post #10

While I would never sell it as "turning vim into an IDE", I use most of these plugins. ctrl-P is great, but I would probably switch to fzf if I was bothering to update my vimrc and plugins lately. Fundamentally, I think people trying to sell emacs/vim with plugins as "turn X into an IDE" are sort of not getting what people see and get from IDEs, though. There's quite a bit more integration that goes into IDEs and wha…

I find that proper IDE (intellij for example) is way better for statically typed languages, not so much for dynamic ones

Re: Turning vim into an IDE through vim plugins

#29
post #17

I tried very hard to get used to Vim. I just feel compared to something like Visual Studio Code it's still very clunky. I can understand why people who have used it for a decade prefer Vim over other text editors. They already know how to use it and how to integrate it into their workflow. For a newcomer this task, it seems, is nigh insurmountable. Are there people who recently got into it and think it's the superior…

> Are there people who recently got into it and think it's the superior way to code and why? I started coding with Visual Studio, and then later Eclipse. I like both IDEs. I only learned about vi/vim about a year after I started programming, and it looked intimidating. 2 years after that, I decided, fuck it, let's see if I can do this. It took me one day to learn how to comfortably navigate with the hjkl keys, as wel…

Have you found a plug-in that handlea autocompletion/find references/go to definition as well as SlickEdit or Eclipse?

I tried ctags and a few others for autocompletion, etc. They were super complicated to install and use. Also they do not find references properly, having a bunch of misses or false positives.

I like Vi style editing, but I found it better to use a real IDE and find a Vi plug-in for it.

Re: Turning vim into an IDE through vim plugins

#30
post #4
post #2

Having seen this article when I first started using vim seriously, I'd recommend fzf.vim in place of ctrl-p and ALE in place of Syntastic. The former I find is much more performant, and the latter takes advantage of Vim8 / neovim's asynchronous features. Plus, fzf.vim comes with Ag, which effectively replaces Ack.vim (albeit, with a little bit of tweaking).

That is the reason I chose neomake, because syntastic was dragging vim down. I'm curious, how does ALE compare to neomake?

Using ALE right now. By design: Syntastic runs synchronously on save, Neomake runs asynchronously on save, ALE runs asynchronously as you type. Neomake is good but I see no reason to go back from ALE which works brilliantly.
Post reply on HN