Is vim as an IDE a meme?

Hey guys,

I have been using vim as my editor of choice for the last 6 month or so. I am trying to learn C++ over the summer and I tried to switch to netbeans last week, but really missed the key-bindings of vim. I have seen some people say they use Vim as an IDE. How would I go about turning vim into an IDE like editor? It is actually practical to do so, not just for C++ but for other languages as well? Things like auto-complete and syntax help. If not is there any IDE that has plug-ins for vim like bindings?

You need to get plugins and linters.

I know VSCode has plugins for vim syntax bindings and linters, but I’ve never used them so I can’t personally speak on how well they work.

Any suggestions on what plugins or where to look for them, so far i have only used one.

I can recommend some plugins I use:

  • PATHOGEN - makes it super easy to install plugins for Vim.

  • NERDTREE - file system explorer for Vim.

  • grep.vim - plugin to integrate various grep like search tools with Vim. You will be able to use “normal” grep commands not the weird vimgrep thing and scroll it’s results very easy.

  • CTRLP - very nice file finder.

  • FUGITIVE - very nice git wrapper. To use git features directly from vim.

  • AIRLINE - very good looking status/tabline for vim. (for ex. different colors in different modes - insert, visual, normal, it can show you active git branch on status line with fugitive etc.)

  • CTAGS - for C/C++ tags generation. The tags will allow you to jump to definition of the class, functions etc. It is also needed for omnicpp auto-completion, Tagbar and own types/functions syntax coloring.

  • OmniCppComplete - for C/C++ auto-completion based on Ctags.

  • Tagbar - It gives you nice overview of the file (listed classes, functions, etc.) and helps you to navigate in big files (jumping to definitions of clases, functions etc.) - also based on generated Ctags.

  • TAGHIGHLIGHT - for tags coloring in your code (own types, variables, functions etc.).

  • YouCompleteMe - This one will transform your vim into real IDE. I didn’t use it myself since it has many dependencies and it is not so lightweight and not so easy to configure especially for huge projects, but it has many features like real-time diagnostic display, automatically fix certain errors etc. so it’s worth to give it a try.

There are also many things you can configure in your .vimrc file like own shortcuts, colorschemes, macros etc. So with all these (or maybe some others) plugins you can create your own configurable, lightweight, fast and feature-rich IDE running in your terminal. You can find more information about these plugins and their configuration options on Vim Tips Wiki.

4 Likes

I use all of the above except Pathogen. I use Vundle instead.

Still prefer JetBrains, but when I get a bug I fire up Vim

There is a meme about Vim taking more time to configure than the time you save, I’ve found this to be somewhat true… the thing with Vim is, it grows with you. You may start out really simple but then build it into the something you want to work in.

You can turn Vim into something more IDE-like using plug-in’s like the ones listed above and add functionality to your terminal by using Tmux. It really comes down to what you need, I’d say, use the best tools for the job.

The biggest selling point for me is that I can use Vim via SSH straight from the terminal, I have my configs in a Github repo and can have the same familiar environment anywhere. I use it for a lot of things; notes, config files, git commits and most development. But I do some work in Qt and for that I use QtCreator, because it has a lot of good built-in’s; UI Designer, code completion, code navigation, etc.

BUT if I had to use only one IDE or Text Editor for the rest of my life, it would be Vim without a doubt.

Vim as an IDE is not a meme at all. It’s a pretty good editor used by a lot of people, and it’s free and open source. Personally, I prefer using emacs. Good package management system and all the various goodies that come with emacs. Both vim and emacs require some set up for them to really start shining (for any given individual), but you can always take your vimrc and emacs configurations with you as you migrate to new machines.

Why not use sshfs?

I have been using vim-plug for a manager ( only for pywal color scheme) switched to vundle, but will look into pathogen. NerdTree I have tried It seems like what I was trying to do with ranger, but it actually works how I want, so thanks for that one. grep.vim I have installed, but have not used it often. CTAGS I am starting to use, but I am also just starting to use C++. I have a omnicppcomplete/youcompleteme alternative. Called VimCompletesMe, I found the install for YouCompleteMe confusing so I did not get it to work. The git-hub install instructions were confusing to me. I just moved to Gentoo and am still learning, it seems people on Gentoo have some issues with the install of YouCompleteMe and kind of gave up after trying some fixes already posted in the issues section.

I have been using Vundle It seems the most popular so i went with it for now.

So I came over from Windows a year-ish ago and started with Arch and i3 so I started to learn vim and use the keybinding everywhere now. It just feels wrong to use thing without vim like keybindings. Would Tmux still be useful in a tilting window manager?

Ok So I do not want to start a flame war because I know some people really like one or the other vim vs emacs, but what is the advantage of emacs? or is it a workflow thing?

To be honest, many of the features I use the most in emacs are also easily accessible in vim, or at least achievable. String searching, regular expression replacement (kind of like an advanced find and replace), macros (series of commands that are bound to another command to allow easy repetition), having multiple panes to look at either multiple sections of the same file or multiple files. They both have scripting, but elisp is really powerful. It allows you to change the behavior of emacs, creating major modes for particular kinds of files: you can see the power of this system in AUCTeX (for writing LaTeX). You can even go so far as to emulate vi/vim with your choice of package… which brings me to another point: package manamgeent. With emacs, you access repos using emacs itself. You can add repos and everything’s easy-peasy. Straying a bit from the IDE focus, emacs also has org mode, which is its own beast.

The thing is, when it comes to writing code, you can set up whatever kind of system works for you. Some guys claim that vi/vim is the unix way (although I would suggest to them that ed is the true unix way). At any rate vim is much more minimalistic and lightweight, but still extensible and highly customizable. If you don’t like to live in your text editor or IDE, vim is better. You’ve already been using it for 6 months anyway so I’d suggest you just focus on getting better with it since you’ve already invested this much time.

I think a lot of the appeal for emacs is in tinkering with, built in documentation, examples and tutorials. You make something work the way you want it to then you refine it to work better and the more you change things the better understaning you have of the tool you are using. When your not sure how to change something you can usually find a good post that you can copy into your init and refactor to your taste, and if you are paying attention you can apply a lot of what you find into refining your own configurations. ViM is more grounded as an editor to get things done while not getting in your way while I see emacs as more of an interactive lisp environment that you use as an editor. Ultimately you can set either up to have equivalent functionality. You get more native functionality with emacs but a higher initial learning curve as well. One advantage right out of the box with Emacs is hippie-expand, you can use it as auto complete, it can be used across buffers on different files, can be used to find paths to files for including things like headers. You can add that functionality to ViM as well but when you have 10-200 buffers in emacs open it becomes really usefull. Also useful when practicing new languages as you can have a bunch of practice files open and yank what ever you want strait out of them into what you are working on.

I knew this was going to come up, that’s why I wrote “from the terminal”. The whole point is that I’m using my terminal for almost everything, sshfs offers no benefits to me.

I use i3 at work, I think of it as solving a different problem. i3 vs. Tmux is a bit like tabs in your web browser, rather than having multiple instances running in stacked/tabbed mode in i3 you use the built-in tabs of the browser. You can get pretty much the same functionality with i3, but the question is, does it make sense for you to do it? Might take some time to configure though, so you have to decide if it’s worth it, for me it was. Noteworthy is that Tmux works over SSH and can start up in a way that you have configured it to.

I see so it is more of a work flow an preference thing with some different philosophical ideas. I know that nothing is best just about what works and gets work done, and making sure it dosen’t become work it’s self (all software). Some times with Linux I have gotten a bit lost and forgotten that. It is just everything it so much fun to play with and tinker with. I am going to try emacs myself and see if i like it or at least look up some videos of people using it. I may just skip either as a IDE for now and focus on programming. Thank you for the information and for the help.

I see, emacs is and vim are both very similar, but they both shine when someone knows how to acually use them and with the learning curve so sharp for each it only makes since to use one, that and they do the same job mostly. I may play with emacs some and see what I think, but because I am out of school and have a good bit of free time. so thanks for the information and the more native functionality seems like a huge plus with vim feels pretty bare without plugins now that I have been using them for a few days, it always has felt bare, but not I see how little is built in especial for someone still learning to configure it correctly.

Ahhh, that makes a lot of since, I have been looking at tmux completely wrongly. I am going to play with it and I did not know that it would work over ssh that seems super useful. I have a little raspberry pi that would be super useful for. I am going to read more into it. I always thought it was not worth the time to look into because i thought it did same thing that I3 did thanks for clearing that up for me.