This article was originally published in HackerNoon
Over the years I've jumped back and forth between many code editors, IDEs and tools; but it se...
For further actions, you may consider blocking this person and/or reporting abuse
dev.to where is the dislike button? :/
VIM is not an IDE, just an editor that helps you write faster
After you install 30 plugins and spend years of learning it you can come close to an IDE, but you lost a lot of time, for nothing.
The length of the post and the config file is working against you, is proof that is not easy to work with, and still not doing a proper job
If you would use an IDE in a proper manner (See Visual Studio or intelliJ) you will realize that your productivity is not about writing text (what Vim excels at), is at making your code work in the real world. Is more about development and less about being a type writer.
If you write books, articles or pseudocode Vim is the best tool I agree, but
..
the devs usually need to do DB queries, work with env tools, debug, see static analyzers warning, deploy dockers, run automatic tests, do merges, do huge refactoring that touches many files, find the "blame" on a bug, and so on (without writing or remember CLI commands or wasting time to setup the IDE).
Just saying, as a "director" you should appreciate productivity and do not make "feels like home" decisions for work projects. Do not confuse "what I like to do" with "what I have to do, as a professional".
By not using the proper tool, that gives you the fastest and most productivity you are wasting your employers money, so you are not being professional, you are just selfish.
Adrian,
VIM is a tool, every developer is entitled to its opinion and preference, VIM might not be the right fit for all stacks or all applications but I have successfully use it to work as you mention for writing, python development, elixir/erlang development.
IntelliJ is great and I use it for other kinds of development (ionic for example); I find the knee jerk reaction to the size of configuration file a bit risible, the configuration file as shared has support for several languages, stacks and some of my personal customizations.
Finally, I find that the ad hominem attack on the last part of your reply actually subtracts from what was actually some valid points on your argument.
I just wanted to raise awareness on "VIM priests" that spread their false gossips around, I probably sound more passive-aggressive then it should.
You just "forget" to mention that it is a personal preference, and state that "Vim is the perfect IDE" (for me?!), knowing in fact that is not even an IDE and not perfect. You "forget" to mention that you spent maybe years of being prolific, where in IDE's most of the things "just works".
VIM is great when you have many small scripts/projects, or you alter big projects with minimal invasion, edit big files, or you are a sys admin, or ...(insert here a lot of stuff you didn't mention), but ....
It is "a common trap" that I've seen are with web dev juniors, they usually:
This combined with the fact that people hate change, leads to bigger problems once the developer gets involved in bigger and more complex projects.
I just want to make things clear for the juniors and next generation of developers to make a big difference between "personal preferences" and "best tool for the job", and posts like this doesn't help at all.
Please keep in mind that everything you've said so far is anecdotal. Others, such as me, may have different experiences.
I tend to agree with BG. Tooling becomes vastly important when working with larger and more complex codebases. The kind of code analysis provided by actual IDEs simply cannot be replicated in Vim no matter how it's customized.
Vim is great, but Vim is ultimately just a powerful text editor. BG is correct in that the anti-IDE stance is alluring for junior devs, providing false machismo in the absence of experience and well-honed skills.
We really need to change the way we talk about Vim. Here are my suggestions:
Vim, conceptually, is mode-based text editing with consistent, highly optimized keybindings. The beautiful thing about vim-as-a-concept is that it's available in some form or fashion in nearly every IDE and text editor.
"vim-as-a-concept is that it's available in some form or fashion in nearly every IDE and text editor." ... and browser.
In my line of work, I've seen little to no benefit with static analysis. I am working on a highly dynamic codebase. Sure, if your language is static its great, but I really don't see this as being a reason for not using VIM. I've actually seen VIM autocompletion be more accurate than IDE's (for newer languages such as Rust).
I am very curious in what languages/line of work there are no benefits for static analysis, can you give some examples?
Javascript - we use dependency injection heavily.
wow ok, your team is great then! I was part of teams that didn't used but we ended up regretting.
I usually saw linters solving a lot of (very small) problems in large teams and projects, like (forces a coding standard, find small bugs like forgetting to type a var or forgetting a switch default, fewer git merges/conflicts) which leads to a better codebase in general (if you enforce the rules at commit/build).
As a sidenote linters are builtin in most IDEs so maybe you use them already, but only at a basic level.
We use eslint (for the older projects, a combination of jshint and jscs). The plugin I use for vim (ale) works with pretty much any kind of linter I've encountered.
This isn't the sort of static analysis I'd expect from and IDE though, this is what I'd expect from any kind of programmers editor (vscode, sublime, etc). What I meant by static analysis is the ability to goto definition, display documentation, refactor, etc. This is the sort of stuff which doesn't work consistently enough with our codebase to even bother trying.
Ha, these kinds of comments always baffle me...
Your comment can be summarized as:
It's like telling someone "No, you shouldn't like chocolate", or "Your favorite movie is wrong".
Chocolate and movies are indeed a matter of taste, but productivity is not (also note that 'feeling productive' and 'being productive' are two different things).
Of course, these kind of discussions tend to spiral into the following, myself included :-)
That is the problem, he didn't specified it is a personal preference, he said it as an absolute truth and other people can make wrong decisions.
Wow great insight
I actually wasted a lot of time in this stuff. Your insights. are very useful to me
Linux, the whole environment, is your IDE. Vim is just one part of it.
B.G. ..... My subjective opinion: you are bore and hysterical. It is a fact. And all about what you find fault with the author of the article applies to your claims. All this is subjective, even your praised productivity.
I apologize for my english - google translate.
"Stay hungry ..stay foolish.". Steve Jobs.
Nope sorry, productivity can be measured, and the time you invested to reach that level.
Also my claims can be easily verified after one week of Vim.
sorry, client satisfied can be measured only
I'm sorry but this statement is ludicrous. Productivity can indeed be measured, but the metrics you choose to measure are completely subjective.
That's somewhat besides the point, but coming from someone who seems downright angry that someone else presents subjective fact as the truth, your assertion is beyond hypocritical.
More importantly, it's absurd to argue that vim is inherently less productive than using any IDE. I keep hearing how vim users are preachy and judgmental, but I have never heard anything from a vim user as dogmatic, condescending, ignorant or absolutist as anything you've said in this thread.
Well stated and to the point.
I can do pretty much all of that in Vim with only a handful of plugins and little configuration. Also of note I've been in the biziness for roughly 7 years and have never had to deploy a container. ๐คท๐ผโโ๏ธ YMMV
Well I partially agree with you.
As I use NeoVim for all my dev purposes, earlier I used to use Jetbrains' GoLand with vim plugin, I couldn't feel much difference as long as productivity is concerned. Only reason I shifted to NeoVim was so that I don't have to use mouse, and I was too busy to learn Jetbrains' shortcuts.
I was able to replicate most functionalities... debugger you say? yes that is one major caveat in Vim or Neovim, etc. but I was able to successfully integrate that too in vim.
I have heavily customized init.vim (not too many plugins, around 10-15) and I can work very fast while doing my work.
What I'm trying to say is,
Vim alone --> just an editor
Vim with right set of tools (I don't mean plugins here) --> a Development Environment, only difference is they are not integrated, hence not an IDE.
Now I'm not any pro or something like that, but the works that I have done till now, I can tell I was more productive with NeoVim with conjunction to some other tools when compared to an IDE.
where is the dislike button?
VIM is awsome, but not for everybody
Correct
I am actually using Vim, my point is that title of the post should be "Vim is the perfect IDE ... for me".
This, so much. I downloaded VSCode, used a clean GUI to install a few plugins, and I was developing nodeJS in minutes. That vimrc convinced me to never use the editor for anything serious.
^ This person is my favorite.
I'm in the same place. It seems like one a year I go out and try out other editors or IDEs, and always find myself in vim. Well now Neovim and using deoplete. I've tried the new language server protocol, but had some prefomance issues. To answer the question below. I primarily develop Go these days so I have that deeply integrated. Delve for breakpoints, I get in line errors as well simple key bindings for extra go metalinter tooling. It does take work and your config is a living setup.
Would you mind to share your Go config for (Neo)vim?
Yes @dtoebe ! I would appreciate it as well
I'm a vim fanboy, I really think it's a great tool but it's far from being perfect. The great thing about vim, as you demonstrated in this post is that there's an unlimited amount of customization you can do to it. With that, I can't imagine two developers having the same set of plugins and the same vimrc file. It's just so personal.
The title you've chosen is somehow provocative that's why I can see some violent reactions here. But I understand, that's not your intent.
For me the best way to learn vim is to see how others use it. And I appreciate you sharing what you got. Thanks!
I'd also like a dislike button. VIM is like all kids in the 80s who knew how to solve the Rubik's cube puzzle decided to make and IDE version. An over complicated, hard to figure out editor. Which they can feel superior in using knowing that only they know how to use it.
What do you care what another developer uses? This sounds like just another Mac vs Windows vs Linux argument that is all opinions
BTW, I know of companies that use Notepad++ as their "IDE" and in my opinion it's no different than vim(or a variant like Neovim).
I don't care what another developer uses. It literally does not matter, in the long run. However I like these arguments. It's always funny to see the more extreme reactions and insightful to see the discussions to these small details.
Do you know why I love these arguments? Simply because I'm not arguing with some faceless twitter avatar about why women, people of color, LGBTQ+ people are under represented (or underpaid) in STEM fields. I don't have to make some passionate argument as to why basic human decency and inclusion should apply to everyone.
You get into a having a real discussion about people's experiences and why these features matter from one person to the other. I just enjoy the debate.
You're right though, it does not matter.
I love vim. I started learning java on a Chromebook, which Eclipse proved too much for and wound up on Codenvy. From there I messed with IntelliJ and Eclipse Photon but I really didn't like either. Especially Eclipse photon plugins suck, the ui feels laggy, there are tiny mostly inconsequential bug that are just annoying enough to trigger my OCD. I get the benefits on a larger code base but vim is something that can be fine tuned. Sure it's more work, but I can be sure vim (neovim) will work smoothly and exactly how I want. The LanguageClient plugin I run is way more consistent than the vscode redhat plugin and they share a jdt.ls! I'm an obsessive tinker and vim fulfills both for me!
Too much plugins for too little benefits. I do not traverse the directory tree. I search files, I search for words in files. I use abbreviations and macros for writing code, refactoring, compiling, testing,... everything in the Vim. I don't want IDE. I like my Vim.
I'm somewhere in between you and the OP. Here's my configuration:
github.com/readyready15728/dot-vimrc
I've chosen to be pretty conservative with it so far but Vundle and a number of the things that can be installed with it are really good. That said, at this time I still only have nine Vundle plugins downloaded.
A lot of people can't grasp this.
"Vim is my default Ruby, Elixir, Python, PHP IDE" . I have noticed all these languages are dynamically typed.
You can't compare the power of intellij for statically typed languages over any text editor as sophisticated as it can be. I have noticed as well that for dynamically typed languages it's not that much of a powerful difference (there is but not as for statically typed languages) if you use a light text editor or ide.
Much more powerful stuff which help maintain and analyze codebases and projects not written by me. Or written by me and maintained by others.
8 Of these things are covered under LSP specs. LSP really makes these features portable to just about any editor that can implement LSP client.
Not a snarky comment, I'm truly curious: How tough is to do debug tasks (set breakpoints, view/modify variables, etc)?
Closest thing you get to an IDE debugging support would be something like github.com/vim-vdebug/vdebug which supports PHP, Python, Ruby, Perl, Tcl and NodeJS.
Slows you down? Not sure what are you working on, but if i can guess i'd say you are writing a novel, and in that case it's understandable.
I usually write ~500 lines of code a day ( mega wild guess), and that takes around 1-2hr of an actual productive work, everything else is debugging, looking into documentation or staring at the wall.
If you are a dev tho, i really can't see what's slowing you down, except if you are mashing random keystrokes 8 hours a day straight and calling that 'programming'.
I really appreciate vim but honestly there are some functionality that other editors have already configured like: you can view immediately unused code, jump to a file easily and fast, autocomplete methods and variables name.
This features can be added on vim but sometimes they are hard to configure and many times is too difficult to do it in my opinion.
But for many files I use vim for example: configuration file, markdown, readme and others.
Autocompletion of anything in open buffers is available out-the-box. Jumping to files depends on what you mean, but capital-letter marks and things like
gd
andgf
will do that for you. Buffers match by partial and filenames autocomplete when opening them. Unused code is a much more IDE thing though, which requires actual inspection of the code rather than pattern-based syntax highlighting.How many times are you going to repost this same article?
Tried to set up my vim using your
.vimrc
file. The plugin install hangs on thejakedouglas/exuberant-ctags
plugin, further examining revealed the repo on github no longer existsNote: Fixed by removing
Plugin 'jakedouglas/exuberant-ctags'
line and installing package withsudo apt-get install exuberant-ctags
instead (on Ubuntu 16.04)I have been pretty happy with IDEAvim plugin for IntelliJ products. It even works with a custom vimrc. But not the plugins. For the plugin stuff I just rely on IntelliJ and it has been great.
Also happily using it, but have that issue, that keybindings work inconsistently in dialogs (youtrack.jetbrains.com/issue/VIM-765).
At a previous job, I used VIM because it was the editor the other devs were using, and specifically there was remote pair-programming that utilized VIM. Now, I know folks love it -- the devs at the job sure did -- but I loathed every minute of coding with it.
The basic paradigm felt like it was eschewing any modernity just for its own sake, as though the peak of computing tech came into existence 40 years ago, and not even something like the newfangled mouse would be acknowledged. The idea of flipping between modes struck me -- and still does -- as ludicrous.
The two main perks of the VIM, as far as I've ever seen, are both related to speed: one being that you never need to move your hands off the keyboard, and the other being at how fast the editor lets you work. And while I can type at upwards of 90 words per minute, I don't program at that speed. Do any of you? I wonder how relevant that level of speed is to anyone.
And as far as the speed it grants you โฆ I never really saw that. Not just from my own begrudging use, but I lost track of the amount of time I spent watching the other devs going into change something and bragging about the speed of VIM, only to spend a lot more time making whatever change than it would've taken with an IDE. Now, I can't say that all of the dev in the office weren't just totally clueless about how to use VIM, so maybe it's their fault, not the editor. But there were 6 of them, and it was consistent.
(If it's an editor you like, that's cool. I personally like Visual Studio Code, as it's a good mix of time-saving keyboard shortcuts with features using technology developed in the time since man's landed on the moon, but since this conversation is getting all testy I figured I'd jump in)
Lots of interesting things here, hadn't had the time to thurougly look at it, but one thing right away: Maybe you don't want to post your github auth token on here.
Someone once said, "Linux is like a huge woman, once you get your arms around her, you'll begin to love her.", I think same example goes with vim as well, once you get to know 'her' you'll begin to like her more than any editor/ide.
You can argue that, you'll waste time learning it, well, it is always a trade off, depending on what kind of tasks you are handling, for local development , I usually use atom in vim mode, much efficient than what I used to be with 'regular' mode. well , what I find most demanding at the moment is , where I have to write program on a remote machine with only ssh access, inside another private network, there are hundreds of servers constantly require writing something or modifying, all testing environment are on remote private network, which is pretty hard to get exact duplicate on local, so we end up writing stuff directly on the development server, tried c9 and other remote ide's ,but non of them were fast and agile enough to compare with vim so far.
So unless you need it, it is fine you can always use your favorite 'super duper' IDEs , but if you want to be able to write code everywhere fast, I recommend creating a vim configuration on git, then wherever you need, just clone it, and use it, no desktop required. since we always have terminal access.
Close to <insert IDE name here> ? Probably pretty close.
Thanks for sharing.
It seems that some people really get offended when their main stream Ide/editor is not named.
While vim may not be the perfect editor for everyone, it does an outstanding job when it comes to developing in linux environments, the key mappings, macros and configuration capabilities in vim makes it feel like its an extension of us developers, my IDE of choice was PHPStorm, after trying vim for a while i never went back to PHPStorm or any other IDE/Editor.
But is my view and the tech stack i work, which is different for everyone when there are so many variables in team sizes, company culture, programming languages support, etc, anyways, vim will still be beneficial in large and small teams, specially when sh*t hits the fan and all you have is a black box with a blinking cursor staring at you and no IDE.
Curious to know what you all think of code.xyz (code.xyz) our online code editor for building APIs.
I build this handy service by merging two API's on code.xyz :
medium.com/stdlibhq/build-deploy-a...
Comments are welcome :)
And i was wondering what debuggers are for.
But, anyhow, the example i gave ( 500 loc) was just that, an example. The point was you are not writing lines of code 24/7, even if you want to.
If that seems hard to grasp, let's look at example of yours; if you really need 5 seconds to double click and get back to the keyboard, then you probably never saw that people usually keep their mouse near their keyboards. It takes 1-2 seconds at most, for me.
As for myself, i'm using Vim and i3/awesome as a tiling VM. But i use every tool where it fits. Vim mostly for config files ( nginx, nas things because i'm working with them quite a lot, etc.), bash/python/lua scripts and similar. There Vim really shines, i agree.
But keep in mind that it's also pretty fast (only on local machines, not VMs) to type vcode filename, edit, hit ctrl + s, and ctrl +w/q to close.
I have no intention to argue over 'preferences', but to the fact that there's no one solution to them all. I always assumed that that goes without saying.
As for the original question:
"On the other hand I don't know how to, in any other IDE, for example delete everything inside curly braces, and start editing the method from scratch."
Thanks for sharing Allan!
Vim Is The Perfect IDE... for you.
Hi, while I didn't use it is this sounds amazing and worth checking, but does it do show call hierarchy? I saw: github.com/Valloric/YouCompleteMe/...
I was more referring to descriptions of the overlords than the timeline itself. Rubik's cube was the first thing to come to mind and I think that was the 80s.
Just come back to say thank you, the article and github repo is helpful.
Vim is hands down, the greatest text editor the world has ever seen.
Hey i am. a newbie in vim. Having used it for a month or so. I am confused between whelther to choose bw spacevim or just install individual plugins like you did? Any support is highly appreciated.
I stopped using Vundle after I upgraded to version 8 of Vim, now I do it this way: frt.github.io/vim%20config/2020/08...
Hope this helps someone.
man, how do i install all this. it feels very bulky and time consuming to even install them all.
Wait... where is Part 2..???
OMG. You surprised me with VIM > Merci beacoup
You can double click opening or closing brace in Eclipse to select the whole block. Then type to replace!
JetBrains is bae
As a friend told me time ago, old tools and console commands raise the ego of developers. But finally, you must choose a tool and you should work with the tool that feels you more comfortable.
Great post(+flollow), keep up the good work ...
Good luck.
Hi Allan,
Thanks for sharing this amazing post.
Can I have a look at the config files for Elixir 'IDE'?
I just can't stop configuring vim to be used as an IDE.
Thanks, Rauan.
Do you have something to mange undo/redo in insert mode? I cannot make Vim my fulltime coding env for this single reason.
(BTW, I definitely should edit my coms HERE with Vim, I've lost all I wrote)
.
Yes, you cane, add 5 lines to your .vimrc
That means:
๐ท It works for new words
<space>
, delete word<c-w>
, means Ctrl-W, delete line<c-u>
.๐ท When you press, let's say
<space>
, it first sends a break (<Esc>a
exit and goes to insert mode), then truly add a space.๐ท When you press
<c-z>
(map it to whatever you want), it goes to normal mode for only one command<c-o>
, then does an undo (actually, two)2u
and that's all.๐ท When you press
<c-y>
, it's like<c-z>
but for "redo"2<c-r>
instead.๐ท You can add breaks for other things, including every ASCII char if you want.
๐ถ Maybe the status bar will "blink" a bit when there is a break.
๐ถ Alternative:
<c-g>u
instead of<Esc>a
avoids blinks but the "redo" will not work as expected.Good enough actually :D see the error detection part in my old post
here
It'll pick up things like duplicate function definitions but undefined functions, not so much. That's IDE territory.
OK, how to setup the ide.
Anyone actually use this with java and spring? Or would it be best to stick with STS for debugging purposes.
Hi, i am using your vimrc and i realized some minuses. And i am patched it. Can i punlish my patch of your vimrc? My twitter is @neodev27
youtu.be/JWD1Fpdd4Pc
;)
Vim is awesome