Live data from Hacker News

Turning vim into an IDE through vim plugins

safaribooksonline.com

51–60 of 63 posts

Re: Turning vim into an IDE through vim plugins

#51

I'll add one more suggestion: https://github.com/airblade/vim-gitgutter "A Vim plugin which shows a git diff in the gutter (sign column) and stages/undoes hunks."

Thats a cool plugin but I had performance problems with it once a file gets above about 1k lines of code so I had to uninstall it :(

Re: Turning vim into an IDE through vim plugins

#52
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).

FZF is fantastic, but has anyone managed to make it work in MacVim? I just get weird display corruption and control characters in my search string when I use it.

Works great in the terminal and neovim.app etc.

Re: Turning vim into an IDE through vim plugins

#53
post #24
post #15

Earlier quoted context omitted.

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 differe…

I'm a longtime Emacs user, and I think you're generally right. But Emacs Lisp, SLIME, and CIDER are exceptions to these observations.

Re: Turning vim into an IDE through vim plugins

#54
post #40

Why not just use an IDE if that's what you need with a Vim mode plugin rather than shoe horning Vim into something it is not really meant to be. Virtually every major IDE has a Vim mode.

Speaking for myself:

* Vim mode in IDEs often only implement the most basic vim commands

* I'm able to work remotely over a slow/spotty connection

* I really hate waiting 10-30 seconds for my editor to start. Often I want to peek at code, then change my mind and want to edit it. I can remotely login and start my editor in less time than most IDEs take to load.

* I like dropping to my shell (not just a shell)

Who says what vim is meant to be? A lot of example vim setups I see are too much for me (too much to set up, too fickle to maintain, too slow in practice)...many of those apply to IDEs for me. But it's nice to see what's out there and how other people fit the pieces together.

Re: Turning vim into an IDE through vim plugins

#55

Earlier quoted context omitted.

> 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 di…

> Ctrl + X works on most 'gui text editors' Really? Even if you haven't selected the line? Because if you haven't selected the line then you'll have to use your mouse first or do the home + shift + end + Ctrl + X to delete the line. I remember Ctrl + D does this (without needing to select the line) in Eclipse. But it's still faster to type dd than Ctrl + D > How does "find references" work in vim? https://stackoverfl…

Ctrl + D is delete the line on some editors, duplicate the line on some editors. Prepare to be surprised when trying to to use it across environments.

Ctrl + X is the shortcut for cut (as in cut then paste). It cuts the current selection. It doesn't auto select the line if there is no selection.

Re: Turning vim into an IDE through vim plugins

#56
post #31

Earlier quoted context omitted.

> 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 di…

Depends on the language. For C/C++ there is rtags, which compiles your code with clang and extracts type info, after which it can find all usages of said method on the exact class you're searching for. I personally use ctags and rtags together for code browsing, to alleviate problems one or the other has. Rtags can be a bit unstable and slow-ish, while ctags is just for definitions and somewhat of a dumb text search.…

I think we can all agree that all C++ editors are a complete disaster. The language is too hard to parse and process, noone ever managed to make good tools.

Visual studio and Qt Creator are the least worst IDE. The first one only works on Windows obviously. They are both free so I am not sure why you'd mention pricing issues???

Visual Studio has the best debugger by far, I'd go as far as saying it's the only debugger in existence for C++. If you have money, there is a paid refactoring plugin called Visual Assist X that makes the C++ experience a lot better.

Re: Turning vim into an IDE through vim plugins

#57

Earlier quoted context omitted.

> Ctrl + X works on most 'gui text editors' Really? Even if you haven't selected the line? Because if you haven't selected the line then you'll have to use your mouse first or do the home + shift + end + Ctrl + X to delete the line. I remember Ctrl + D does this (without needing to select the line) in Eclipse. But it's still faster to type dd than Ctrl + D > How does "find references" work in vim? https://stackoverfl…

Ctrl + D is delete the line on some editors, duplicate the line on some editors. Prepare to be surprised when trying to to use it across environments. Ctrl + X is the shortcut for cut (as in cut then paste). It cuts the current selection. It doesn't auto select the line if there is no selection.

Well, if you want to be really pedantic:

Ctrl + Y is delete without copy (at least in IntelliJ IDEA).

Re: Turning vim into an IDE through vim plugins

#58
post #31

Earlier quoted context omitted.

Depends on the language. For C/C++ there is rtags, which compiles your code with clang and extracts type info, after which it can find all usages of said method on the exact class you're searching for. I personally use ctags and rtags together for code browsing, to alleviate problems one or the other has. Rtags can be a bit unstable and slow-ish, while ctags is just for definitions and somewhat of a dumb text search.…

I think we can all agree that all C++ editors are a complete disaster. The language is too hard to parse and process, noone ever managed to make good tools. Visual studio and Qt Creator are the least worst IDE. The first one only works on Windows obviously. They are both free so I am not sure why you'd mention pricing issues??? Visual Studio has the best debugger by far, I'd go as far as saying it's the only debugger…

JetBrains also released ReSharper C++ which is better than Visual Assist X in my experience.

Re: Turning vim into an IDE through vim plugins

#60
post #40

Why not just use an IDE if that's what you need with a Vim mode plugin rather than shoe horning Vim into something it is not really meant to be. Virtually every major IDE has a Vim mode.

I use IntelliJ with IdeaVim at work and I can vouch for it, but the truth is that even the better plugins for the more mainstream IDEs suffer from strange and annoying issues. For example:

    ysiw)j.
will not actually surround a word in parens (without a space at the edges) and then move down and do the same to the word on the line below. Surround commands cannot be repeated in IdeaVim. It's about as good a try as I've seen at emulating vim outside of Emacs, but it's certainly not complete at all.

What you said about shoehorning vim into being an IDE can be said about shoehorning IDEs into being decent editors. It's extremely hard to get both and depending on the language it's better to get the IDE with so-so editing or get the stellar editing with most of the productivity boons of nice integration.

Post reply on HN