DEV Community

Discussion on: Who said that VIM cannot compete with IDEs?

Collapse
 
erebos-manannan profile image
Erebos Manannán

You forgot project-wide refactoring, quick navigation (e.g. CTRL+click on a function call to jump to source), code extraction, automatic reformatting, version control integration (to e.g. highlight which bits you've changed since last commit), file history management (to see the different stages between now and your last commit), code structure views, and the crazy amounts of other features you find in modern IDEs that even I don't use (automatic deployments over SSH/FTP, DB clients, shells, etc.)

And better yet, all this comes in a relatively easy to understand package in an IDE, instead of one of those glorified text editors. Please stop comparing text editors with syntax highlighting and a few other simple features based mostly on external scripts with IDEs. IDEs used to be heavy, now you should have at least 16GB of RAM on any old laptop, as well as an SSD and a decent CPU, and suddenly these convenience features come with practically no latency penalty.

Sublime text is not an IDE. Vim is not an IDE. EMACS is not an IDE. They are text editors. Very good at their jobs, but not IDE replacements.

Collapse
 
gnu profile image
Gnu's Not Unix • Edited

You are talking from the ignorance. First of all, you put at the same level Vim and Emacs with Sublime Text. Sublime Text is just a text editor, and you are right with it. However, Vim and Emacs are much more. Actually, Vim and Emacs are better than any IDE, and I'm gonna demonstrate you that with arguments.

Vim and Emacs are just a core, and you need to extend their functionalities using plugins and, why not, functions written by yourself using VimL or eLisp.

Now I'm gonna talk about Vim (as a Vim user), with three years of experience, and more than 20 years programming using a lot of IDEs from Windows and GNU/Linux. Sorry for the 'ad hominem' fallacy, but I know what I'm talking about. :D

You say he forgot about...

'project-wide refactoring'. There are a lot of plugins that do it really good. However, it depends on the language, of course. It's possible that there is not a refactoring plugin for a specific language. And if you compare Vim to all the JetBrains IDEs, of course JetBrains wins. You are falsifying the debate! Can NetBeans refactor Python, C# or Perl? No! It's an IDE? So what?

By the way, IDEs refactor code in a very simple way, and if you have to do it recursively, you can do a specific function in VimL to do that. It's easy. If you have to do complex refactoring, you better do it by hand. An IDE will not program for you.

'Ctrl+click to navigate to a function'. It's so easy: just type 'gd' (go to local definition), or type 'gD' (go to global definitioin), or press Ctrl+] if you have a tags file. I don't need to get the mouse and press Ctrl+click, hahaha. Actually, I rarely use 'gd' because I programmed a GrepWrapper which tells me all the lines containing a text or a REGEX. Then I can jump to it. I can decide if it's for the current buffer, opened buffers or full project. It's not the same, I know, it requieres one more step, but it's better because I like to see more information. There are tens of plugins to go to a definition in any language, for example, for ctags, cscope...

'code extraction'. It's refactoring. As I said before, there are a lot of plugins do it very efficiently. Vim-refactor can extract Function, Variable, Type, Getter and Setter from C, C++, Java, Pascal and VimL. Just a plugin. There are more plugins.

'automatic reformatting'. This can be done as well with a lot of plugins and a lot of tools. For example, to reformat SQL sentences I use an external tool (Unix) called sqlparse. To reformat Python, JavaScript or C++ I use other plugins. I normally don't need it. You can reformat everything on Vim, though. I can minify and unminify every JavaScript code.

'control version integration'. Of course Vim has it. The plugin GitGutter will show the lines modified, the lines removed and the lines added. You can configure it with a lot of settings that your IDE don't let you change.

Then, vim-fugitive is a very nice tool to operate in git into Vim. Most of the times I prefer to use the terminal CLI, though. Using vim-fugitive I can compare the current version of the buffer with the staged version, and I can compare it with the last commit. I can compare it in a vertical or horitzontal way. Your IDE can't do that.

Also, I can jump between GitGutter hunks very easily and very fast with shortcuts. You IDE can't do that.

I also can preview the changes of a hunk between current buffer and staged area, with Ctrl+g (toggles the preview). You IDE can't do that.

With the plugin GV I even can navigate between old commits with all the benefits of Vim. It's so easy and comfortable! And your IDE does it in a ugly an unefficient way, using the mouse and don't having the Vim mechanisms to make your life easier (grep into it, for example; search using REGEX into it, for example, and so on).

'code structure views'. Of course, Tagbar does it very good. I open it with Ctrl+t and I close it with the same shortcut.

My Vim does everything your IDE does, 100 times better; but your IDE does an 1% of what my Vim does, honestly.

I'm using Vim with 65 plugins and 1500 lines of configuration. It loads in less than a second, and I don't need a 16 GB of RAM. Every second spent on it worth it. My productivity is really high. I have this configuration in github, so I can clone it into a new machine and I can edit my programs in an instant.

Navigation in Vim is so fast and so good.

  • Can your IDE search and replace text using REGEX?
  • Can your IDE search a REGEX into an open file, all opened files or all files of a directory, recursively?
  • Can your IDE search a REGEX to the history of old commits? :)
  • Can your IDE combine the powerful of tools like grep, sed and awk into the editor? :)
  • Can your IDE combine all Unix tools into the editor? For example, sort, to sort alfabetically a selected text :D
  • Can your IDE visualize all the changes you did in a document, even when changes are in a different branch, normally lost? Haha :)
  • Can your IDE comment a block of text in any language, in several formats and allowing you to configure every language?
  • Can your IDE run/execute a selection of code? :)
  • Can your IDE execute a script into a new tmux window? Of course not. Vim can use tens of windows and splits to show information about everything you need, through a multiplexer!
  • Can your IDE align hundreds of lines with a single command, indicating from what character do you want the alignment?
  • Can your IDE wrap and unwrap in several lines a list or a dict? Well, in this case, I think your IDE does it as well.
  • Can your IDE preview a markdown in real-time, as you type, in your browser?
  • Can your IDE preview LaTeX in real-time, as you type, and export it to PDF directly? :)
  • Can your IDE reselect the last selection?
  • Can your IDE go back to last cursor position? And the other last?
  • Can your IDE save cursor positions as marks and navigate between them easily?
  • Can your IDE show relative numbers?
  • Can your IDE navigate without having to move the scrollbar? :D
  • Can your IDE search the selected text?
  • Can your IDE correct your spelling in any language? Vim can do that without plugins.
  • Can your IDE switch lower-case to UPPER-CASE to Camel-Case any selection?

Since you have to use the mouse for every shit you do, then you are not productive at all, you are losing time.

Moreover:

  • Vim has a terminal and I even don't need it because I'm using tmux.
  • Vim can also debug using plugins: Conque-GDB, vimpdb, and so on.
  • Vim can also lint code in real time, using the plugin ALE.
  • Vim can also insert snippets of code, autocomplete any language, etc.
  • Vim can also navigate very fast between documents of a project, there are a lot of plugins for it, like FZF, CtrlP, etc.
  • Vim can also rename files, change file permissions, etc.

Actually Vim can do everything you would do in a Unix terminal, thanks to the pipeing. Only with that, Vim wins any comparison.

So please stop talking from the ignorance. Thanks.

IDEs are good, however, Vim and Emacs are better.

Have you ever heard of the art of Unix programming? :)

Collapse
 
erebos-manannan profile image
Erebos Manannán

I'm too lazy to read past your first few lines as you're obviously ignorant on the subject. Sublime Text is not a text editor, it's exactly like Vim and Emacs with a rich ecosystem full of extensions, which is even better than those alternatives.

packagecontrol.io/

Also in the future you should refrain from trying to "raise hell" 8 months after everyone else stopped commenting on the whole subject.

Thread Thread
 
gnu profile image
Gnu's Not Unix

You say you are «too lazy» because you don't have arguments to answer me. That's good. Others will read you had the oportunity to answer me and you decided to use fallacies to avoid the subject. Nice :)

Sublime Text is not better than Vim and Emacs at all. I already know packagecontrol, and actually I published a plugin for Sublime Text 3 (11k installs). So I'm not so ignorant as you thought, my dear.

There are a lot code editors with a plugins ecosystem, and this does not mean they are similar to Vim an Emacs. Atom also has plugins. VSCode also has plugins. Even IDEs have plugins. The possibility of adding new features through plugins is really extended, and that does not convert all editors to an identical tool, right? That's Logical Thinking I.

I commented here since it's possible to comment here. It's not a forum, it's a post in a blog format. I'm not breaking any social convention; and of course you are nobody to say others what they have to do.

Lessons, not even one. ;)

PS: BTW, there's only one case I would use an IDE instead of Vim: Java. Then I would go for JetBrains IDE or I would use the combo Eclipse+eclim. Anyway, you are not interested on this subject, I'm explaining it to complement my old post.

Thread Thread
 
redsofaforeveryone profile image
RedSofaForEveryone • Edited

You crushed him, Gerard.

Registered just to say that. Thank you.

Thread Thread
 
erebos-manannan profile image
Erebos Manannán

Hardly. There's simply a point where an argument becomes pointless.

Thread Thread
 
gnu profile image
Gnu's Not Unix

Good morning, Duke Lietu.

If you had an argument, you would explain it.

As I can see, you think that an IDE has some "magic" or secret algorithms, and you think these algorithms are not allowed to be implemented into any other program/plugin. It's ridiculous.

That said, if you need an IDE to do refactoring and extraction to fix «stupid shit that you just shouldn't be doing» (I'm quoting you, here), then you should get more experience into programming, because these actions are implemented to help new programmers without experience or to fix code written by programmers without experience. And if you need to change text recursively in the full project, with grep, sed, awk, ag (Unix tools) you should have enough, because they are better, and you can use them into the terminal, into Vim, into Emacs. But not into Sublime Text 3, not into Atom, not into any IDE.

In essence, Vim is a Unix tool and you can use all the Unix tools into Vim.

An IDE has tools to debug, tools to check syntax and tools to build software fast and quickly. Most of the times, these tools are subjective implementations by the IDE developers, so these tools are not the official ones.

For example, you can check the Perl syntax using the command "perl -c " from the terminal, using the official package, or into Vim using the command ":!perl -c %". Why would you use an IDE with its own Perl syntax implementation, just because it has unified tools organized into drop-down menus? It's ridiculous.

You can debug a project using the gdb package from any Unix terminal, or into Vim using the command ":!gdb", or using one of dozens of plugins that integrate gdb in Vim with added features, like conque-gdb, lldb, pygdb, clewn, pyclewn, vim-debug or vimgdb to step through the source code. There are dozens of tools to do one thing, you can choose the best to fits your needs or even you can modify them because they are open source. Try to do this in an IDE.

You can compile C/C++ using gcc from the terminal using the command "gcc ", or you can use it into Vim with the command ":!gcc %". Moreover, you build fast and quickly customizing a Makefile, then you would use the command ":make", or simply configure a shortcut to build faster, for example "nnoremap ii :make". Then you can compile faster after editing the code by pressing «,ii» (sic), without needing to get the mouse and point&click.

I can do things in Vim that you can not even imagine.

You said before, the following text:

«JetBrains alone makes IDEs for C/C++, C#, F#, Go, Groovy, Java, JavaScript, TypeScript, Kotlin, Objective-C, PHP, Python, Ruby, Scala, and Swift. They also support all the companion languages like HTML, CSS, SASS, SQL, JSX, BASH, YAML, JSON, etc. that you frequently use when developing your applications.»

You can use all of these languages in Vim (excepting proprietary languages, such C#), using the official tools to check syntax, compile, build, etc, from a Unix environment; it's better than using subjective implementations. To program in C#, use Visual Studio or VSCode. Of course.

Do you really think Vim does not support, for example, Ruby, JSON, Bash, Go, TypeScript or Swift? You are very funny.

With Vim and Unix tools ecosystem, you have the maximum control of a project. Of course I wouldn't recommend Vim on Windows, where Unix tools are missing. Since you can use all of them in Vim and pass the data into it, there's nothing better than Vim running on a Unix-like system, like GNU/Linux, FreeBSD, macOS, etc. Also, one can mix these tools to do new functions/tasks into the editor. As you can see, Vim is not only an editor with plugins, it's also the code editor of Unix. I can say the same for Emacs.

Have a good day.

PD: Thank you, RedSofaForEveryone for your kind words.

Thread Thread
 
erebos-manannan profile image
Erebos Manannán

If you had an argument, you would explain it.

No, and that's a stupid expectation.

I've said everything that needs to be said on the subject of Vim, and nothing worth commenting on has been added to the conversation.

then you should get more experience into programming, because these actions are implemented to help new programmers without experience or to fix code written by programmers without experience

This really shows your ignorance. You sound like you've got a couple of years of experience behind your back and now feel like you know everything. Everyone makes mistakes, nobody's code is perfect, ever, as in the real world requirements change over time. Code needs frequent refactoring, and the better your tools are for that the better you will be at your job - making the best software you can in the amount of time you have.

And if you need to change text recursively in the full project, with grep, sed, awk, ag (Unix tools) you should have enough

Just, lol. Good luck with that.

I can do things in Vim that you can not even imagine.

That really states just how intentionally ignorant you are being. I know what Vim can do, and no me listing various IDEs JetBrains makes does not mean that I think you can't get some support for them on Vim.

... now goodbye.

Thread Thread
 
gnu profile image
Gnu's Not Unix

Definitely, your code needs to be refactored, so you are the ignorant here. I've been programming since 1999, when I started programming in C++ using an IDE (yes, an IDE). You clearly don't know Unix so you talk from the ignorance, mainly when you say you know Vim. You can't know Vim if you even don't know Unix tools. You are really funny. Heh.

I had to refactor when I was learning Java, too verbose language, having to modify a lot of files requiring a parser. Nowadays there's a parser for Vim, as well. However, I'm not interested on Java anymore because other languages fit better on my needs: C/C++, Perl and Python (my general purpose tools), Go (concurrency), Rust (interop), RoR (web-dev), JS (web interactivity), Bash (system config)... All the languages I mentioned are perfectly usable in Vim, and you would change your opinion if you were more open.

I think you are in the same point I was a lot of years ago, requiring an IDE because you think it's the best, as I did at some moment of my life until I discovered Vim.

Let me say you won't have benefits of using Vim if you don't configure it. Of course, Vim without plugins and without Unix tools is a simple code editor, just a bit better than nano. Vim with plugins can do the same as any other code editor, and Vim with Unix tools using the official syntax checkers, the official debuggers and the official compilers is better than any IDE using subjective implementations.

If you can't understand this, then there's nothing to do with you. Good luck :D

Thread Thread
 
erebos-manannan profile image
Erebos Manannán

Dude, nobody cares how long you've been programming, or with what languages. Your random outbursts are just making your argument less interesting. Your random bashing of Java is also completely irrelevant to the discussion.

I think you are in the same point I was a lot of years ago, requiring an IDE because you think it's the best

Nice try with the combined strawman & ad hominem -fallacies.

Thread Thread
 
gnu profile image
Gnu's Not Unix

You say «nobody cares how long you've been programming» after I answered this because of allusions, when you said «you sound like you've got a couple of years of experience behind your back and now feel like you know everything», so when you then say «Nice try with the combined strawman & ad hominem -fallacies.», apply this to yourself, because I said this going down to your level. ;)

Thread Thread
 
johnpt profile image
john-pt

Thanks Gerard, I didn't know many of the things you listed could be done with Vim + Plugins.

PS. And yes, you crushed him.

Thread Thread
 
pianocomposer321 profile image
pianocomposer321

This was one of the most interesting things I've read in a long time. Thx Gerard.

P.S.
A little less harsh language and cursing would be better though. It really doesn't add anything to your argument.

Collapse
 
singalen profile image
Victor Sergienko • Edited

Coming from CLion -- here's a data point: "Yes" to all of your questions except for maybe "execute a script into a new tmux window" and "show relative numbers" (what relative numbers?.. what for?..)
What is more important, it does it more uniformly, not having to memorize a separate keyboard spell for each of these use cases.

What vim CANNOT do, for example, is to do a CORRECT navigation in C++. ctags/cscope are doing a very poor job indexing C++, especially modern C++.

CLion has an absolute killer feature that only one competitor (Eclipse CDT) possesses: ability top statically build a call hierarchy. This is so valuable when analyzing execution flow. AFAIK, no add-ons that can do it for other IDEs exist.

Collapse
 
fallast profile image
Brian

jesus christ gerard, you ate him up lmao,i literally registered to comment this and thank you a lot for all that information, i just started using vim since 2 months ago and i love it so far cheers

Thread Thread
 
erebos-manannan profile image
Erebos Manannán

I wish you kids had better things to do in your life than to register to comment useless things like this 😄

Collapse
 
gcorrel profile image
gcorrel

Who!! and thanks for your amazing and deeply insightful contribution, response and commenting. Just reading your lines, above and below is quite educative. As a VIM lover/nerd, I was reading to get convinced by any means why I should switch to an IDE but haven't seen a point, convincing enough yet. And not even from "Duke Lietu" as you referred to him, having only grudges and not interested in contributing with mind-changing points. For me, if I do have knowledge of something and feel very confident about it, I'd surely defend it to the last, except i get to a point, I'm convinced beyond reason then, I'd feel NO shame, agreeing to the huger and greater points. Afterall, no one is above learning and improvements. That's what life is all about eventually.

Categorically stating though, YOU WON HIM HANDS DOWN!!! NO ARGUMENTS.

Thanks for contributing all the same.

Collapse
 
bezirganyan profile image
Grigor Bezirganyan

As I've already mentioned in other comment, most of your issues can be fixed :) Again, vim is not an IDE, and it is not meant to be. What I like in vim, is that all I need to have is my .vim folder and .vimrc file, and I can have my vim configuration with all it's IDE like features in any computer or remote server. Good luck writing code on remote server with an IDE ;)

Auto import

Python - vimpy
Java - JavaImp
JS - ImportJS

Syntax check

Syntastic or
YouCompleteMe

Refactoring

I've heard about clighter8, which can do some refactoring for C/C++, haven't checked myself though

Navigation

The goto command in YouCompleteMe

Version control integration

fugitive.vim
vim-gitgutter

Automatic deployment

gist.github.com/noelboss/3fe139270...

Collapse
 
erebos-manannan profile image
Erebos Manannán

I don't think you follow. "I heard X can do some refactoring for Y" is not what I'm talking about, I'm talking about full project-wide refactoring for any language you're working with. That's an IDE.

If you're editing your code on a remote server, you're probably doing changes in production or some other incredibly stupid shit that you just shouldn't be doing.

Your tools seem to mostly work for C/C++ (very few sane people work with these anyway), and only a few other languages. JetBrains alone makes IDEs for C/C++, C#, F#, Go, Groovy, Java, JavaScript, TypeScript, Kotlin, Objective-C, PHP, Python, Ruby, Scala, and Swift. They also support all the companion languages like HTML, CSS, SASS, SQL, JSX, BASH, YAML, JSON, etc. that you frequently use when developing your applications.

If you want to feel like a kid in the playground you can mess around with your text editor and your plugins, if you want to maximize your productivity (and you should if you care about your work at all) you need an IDE.

I use text editors frequently, for managing large text files, big regex replaces and similar things that text editors are good at. When I want to get work done I use an IDE.

Thread Thread
 
erebos-manannan profile image
Erebos Manannán

Oh and if you ever have a legitimate reason to edit your code remotely (which is incredibly unlikely), well, JetBrains IDEs come with SSH sync etc. features - you save a file it gets synced on the server. Whoah, mind = blown, right?

Thread Thread
 
bezirganyan profile image
Grigor Bezirganyan • Edited

Your tools seem to mostly work for C/C++ (very few sane people work with these anyway)

Really? Oh,then me and all the employees of the company I work in, as well as the developers of Linux, Adobe, Chrome, Firefox, Mac OS, Windows, etc., are insane people? Good to know :)

If you want to use an IDE, use it, no one forces you to go to vim. I didn't write this post to convince people to use vim, but for people who actually want to use it.