TBH, not every developer is willing to become a power user or interested to learn an IDE instead of the language itself. Being someone who worked on VStudio alot and now on Linux/Mac based tools, I can safely say that Microsoft tools are Developers friendly most of the time. It's good they are introducing same touch for Linux/OSX community.
verbs like ci" (change inside ") which deletes inside the current double quotes and leaves you in insert mode are pretty easy to get used to. dd deletes a line and puts it into the yank register so you can paste it somewhere. u undos an action.
using a plugin with visual studio is pretty king to get the best of the IDE and the most common vim functionality.
Classic SO answer on why vi: http://stackoverflow.com/a/1220118/1772636
edit: here is another classic why vi answer that is a bit different http://www.viemu.com/a-why-vi-vim.html
Humans have this funny thing as they grow older - they look at a thing, maybe try it out for few seconds, and then immediately determine it's too difficult and it will take forever. They rarely bother to spend actual five minutes, to the clock. If they did, they might actually have learned something.
25 minutes of deliberate practice - a single Pomodoro - is enough to become acquainted with several of Emacs features - like, navigation by semantic units and incremental search and autocompletion. You won't get proficient in that time, but it's enough to rewire yourself to actually start using it when writing code. Which will then lead to you becoming proficient while doing your regular, billable work.
Seriously, set up a Pomodoro timer, sit in front of Vim or Emacs, and try to practice a few things. You'll be surprised how fast you can learn.
(And yes, I did that, so I'm not talking out of my ass. I actually almost doubled my Emacs productivity once in 5 pomodoros - in 2.5 hours - two of which I spent watching Emacs Rocks videos, two on rewriting s-expressions with Paredit, and one on multiple-cursors.)
To reach a level of skill where using emacs is easier/faster/better than something like intelli-j (for instance) requires significant dedication and repetition.
Far, far more than "a few hours".
Not the parent, but I've spent a significant amount of time with pure vim. I use vim bindings in everything from my web browser (vimium, vimperator) to my WM (i3 & kde vim navigation bindings), to my text editors & IDEs (atom, VS, sublime)
Despite all that, I still find using pure vim to be ineffective relative to just using Atom, Sublime, VS or whatever with vim bindings. I may have internalized the most basic navigational concepts, but the more advanced / esoteric shortcuts that are essential to use vim as an exclusive editor are still ones I need to look up - and that's not counting stuff specific to vim packages liked nerdtree.
At the end of the day I'm sure you could always argue that I should have practiced differently / better / more or whatever - but to what end? There are plenty of full featured text editors on all platforms that do everything I need. Why on earth should anyone force themselves through dedicated practice just to learn the intricacies of a 20 year old editor?
Not parent but I have. I still would recommend something else for all the stuff I work with.
That said, it is amazing, I just believe in my line of work people are better off spending time learning an ide, esp refactoring, efficient search/ replace as well as how to enable block selection.
I sometimes do to. In particular, when that stuff is Java or C# - it's hard to beat the support IDEs gives you there. So I personally opt to switching said IDEs to Emacs keybindings instead.
(Also, one could argue that you need IDEs there mostly as crutches to support the weak language, but that's a topic for another day...)
> better off spending time learning an ide, esp refactoring, efficient search/ replace as well as how to enable block selection.
Refactoring - if you mean semantic transformations supported by your IDE, then yes. See above. But for search/replace and block selection no IDE beats the convenience of Vim and Emacs. They simply can do that better and more naturally (along with plethora of similar things helping with selection and navigation). And this is exactly the type of thing I was talking about in my previous comments - you can learn both under one Pomodoro if you focus solely on it, and then normal work will quickly take you to proficiency.
Nerdvana.
For example, do productive programmers tend to use Vim or is it the other way around? It's hard to find the causality.
I really don't think that's what's behind my attitude toward code editors, though. I've been writing code for thirty-odd years and making a living at it for twenty-five, and I've spent the majority of that time working on dev tools. Compilers, mostly - but I've written a couple of editors, too, plus a debugger, a couple of linkers, an assembler, you name it. So I have had a lot of time to think about tools, and have been lucky enough to get several chances to put my ideas into practice.
I'd have trouble remembering the names of all the different editors and IDEs I've used over the years. Emacs and vi are ubiquitous now but that was certainly not always true, and on some platforms, particularly embedded environments, using anything but the officially-blessed toolchain can make your life unnecessarily difficult. I have learned to get my work done using whatever tools happen to be on hand. That's meant a wide variation in the kinds of features which are available, the specific control-key bindings, the details of the build environment, pretty much anything you can imagine - so I have learned to rely on the basics and ignore the rest.
I find it far more frustrating to deal with a sophisticated tool that isn't working quite right than a simple, brainless tool that does the job but requires a little extra manual labor.
I'm not here to play with editors, after all, I'm here to build software, and the editors are just a means to that end. Time spent learning sophisticated editor features has to justify itself in time reliably saved using those features, which has to be balanced against the time wasted when they don't work quite right or when you have to go dig through the documentation to remember how to use them, times some distraction multiplier for the fact that you're thinking about the tool instead of the job you're using the tool to do. In my experience, there's been too much change and not enough actual need for sophisticated editor features to justify their cost.
Even if a sophisticated editor could allow me to perform certain editing tasks more quickly, that wouldn't change my overall productivity very much at all, because I spend far more time reading and thinking than I spend typing or editing. I type fast enough already; it's my brain that needs to be accelerated, and the best way I've found to do that is to eliminate distractions and focus as much as possible on the problem I am actually trying to solve.
I wrote a simple terminal-based editor a couple of years ago, including all the features I use every day and none that I don't, and I've been using it for all my daily programming work ever since. It's an unabashedly personal expression of my own taste, so I wouldn't necessarily recommend it to anyone else, but I like it and feel good when I use it. It's nice to know everything there is to know about the tool, so that I never have to think about it or try to remember how it works. Perhaps some day I'll be working in some new environment with some new toolchain and I won't be able to take ozette[1] along with me, but that's fine - wherever I go, I'll be able to get my work done with the tools I find there, because I'm comfortable doing my job with the basics.
I was thinking more of the sorts of automatic refactoring tools some people really like to use in their IDEs. I haven't found that such tools save enough time to be worth learning how to use them.
Very few programming workflows are so complicated that it is simply not possible to do something without first creating your own highly customized environment within Emacs. However, very, very many programmers do have a lot more fun screwing around with customizing their work environment (editor, window manager, shell, etc.) than using that environment to get actual work done (myself included).
Which is not to say that Vim and Emacs aren't awesome tools, I just wouldn't generalize anything about anyone based on the tools they use.
You will see that after you learn how to use Vim you won't want to use anything else to edit text, you emails, browser and word processing will be in Vim.
You only think that because you have used it and became accustomed to vstudio. As someone who has used vstudio, eclipse, atom, intellij, vim, emacs - I can safely say that vim and emacs are far more 'developer-friendly' than the others.
The sole concept of IDEs specialized for one language makes me cringe.
I still use Vim a lot, for JavaScript, for text, for remote sessions... But when a tool with real semantic highlighting and understanding of code is available (with a Vim plugin) then I'll take that.
Of course an IDE like QT Creator does many things better. But it's a tradeoff always.
Can you explain this a bit? I don't see that Sublime, VS Code, Atom, etc. were made for one language, at all. As a little background, I've used vim for a while, then switched to Sublime Text, and am just trying VS Code. I find Sublime/VS Code/Atom to be far easier to customize than vim.
I was indeed referring to Eclipse and Visual Studio. From what I observed around me, for some reason, people don't use these to edit:
- shellscripts/perlscripts/batchfiles.
- Files written in a in-house domain-specific language.
- Configuration files.
- Makefiles and project files: vcxproj, sln ...
Actually, I observed that these kind of IDEs discouraged people doing the above things, giving them the impression that it's not "real development" (I suspect that this is, in part, where the bizarre term "scripting language" comes from, but this is another debate).
That is the power of vscode, it provided a good enough way to play with code, yes not outright innovation, but an awesome text editor nonetheless.
I'm not saying Vim and Emacs are the be-all (I program mostly in R, so RStudio is my main tool), only that VS Code hasn't changed anything fundamentally. It's just a good editor.
Or, hell, even Kate?
Of course you can do a lot with extensions, but at least in Atom's case they break a lot for me.
Bear in mind that the claim wasn't that it's better in some ways, but that it's sweepingly better than the stuff that came before (and Atom wasn't even mentioned by the OP, which is funny--I mean, I don't use it, but it's obviously in the conversation).
Uh, if you edit tens or hundreds of text files per day, it's a game changer.
EDIT: that's only the most trivial benefit of git integration
I guess the killer feature of VS Code is multiple cursors (Ctrl+D). I only know of Sublime Text and Atom who also have this feature on Linux, not sure about Kate. Sublime Text is closed source and not gratis, Atom is slow and buggy.
No, not built-in. They both have plugins, and allow you to set the key shortcut to whatever you please.
That they are not built-in really doesn't matter though. All these editors revolve around plugins, and it's common practice to save your preferences on github or the like so that it's easy to use the same settings and plugins on every machine.
I think you have to wait a few minutes, then it gets activated.
> No, not built-in. They both have plugins, and allow you to set the key shortcut to whatever you please.
That's too complicated for me. Last time I've tried to set up vim and emacs to my liking it was a mess: A lot of copying and pasting around random code, changing configuration files I didn't understand, ...
Granted, Atom, Sublime, VSCode etc. are easier to start with because they expose customization through JSON files instead of a custom programming language. But if someone where to tell you that they didn't understand how multiple cursors worked in VSCode, you would tell them to learn their tools and send them a link to the relevant page of the documentation (if that).
If you know your editor, adding functionality like multiple cursors is easy. The greatest strengths of extensible lightweight editors like VSCode and Emacs, is that such functionality is only a package away.
No that's the thing: I would tell them to press Ctrl+D, simple as that. Multiple cursors in Sublime Text, Atom and VSCode are intuitive and it's the first time in an editor that I actually use them.
I want to keep on top of my current branch, what is untracked, what is unstaged and staged, quick diffing, etc. It actually helps a lot with productivity since I don't have to actively query for this information when it's all in one screen.
If I used another editor, I would like to have similar features. Maybe it can be done, but I am quite fluent in magit already, and one major thing keeping me from moving to another text editor for my current projects (if it actually mattered.)
The only 'plugins' I use are a keyboard shortcut (cmd+space) which puts me in a terminal window and rupa/z[1] for jumping into a project directory.
Another scenario: You type `git status` and see a file called `src/a/very/long/path/file.c` hasn't been staged yet. Now you need to type that file path for git add or git diff. Takes more than 5 seconds, but it's just a simple click on a + symbol in VS Code.
vscode's benifits:
blazingly fast modern design works on linux/mac too little features like ctrl+P which lets you to jump to functions rather than play with files, I didn't know any other editor which allowed this feature to be there.
It is a great way to code if you don't want or can't use vi/emacs, I don't have the luxury to learn all the nook and corners of emacs, I started using Go plugin in vscode and today I have built go apps and written partially completed book: http://github.com/thewhitetulip/web-dev-golang-anti-textbook...
i tried giving vi a chance, but nope. couldn't bear it for more than a day, large webapps require a UI IDE, vscode > everything else I tried till now
Literally every other popular code editor supports some form of "go to symbol".
Go ahead and downvote it, but after all every programmer worth his/her salt does realize that the choice of IDE/text editor is ultimately a personal opinion, so long as you as a person are comfortable using it, that is good for you, it does not make a tad bit of difference to anyone else in the world.
IntelliJ
I think the parent was talking about modern text editors such as Sublime, Atom, Brackets etc.; Vim and Emacs are completely different beasts (note: I love both).
Within the category of modern text editors, VS Code is in my opinion revolutionary in several ways - I will give you three examples
The first feature that I find "disruptive" is the way VS Code offers a standardised interface for debuggers, hence debugger plugins are much easier to create - and you can see that VS Code already has debugger plugins available for many languages: https://marketplace.visualstudio.com/vscode/Debuggers?sortBy... the availability of such plugins for Atom and Sublime Text is not nearly as good.
The second aspect where VS Code changed the game is the clever way it leverages Electron (the framework it's made with, Atom is made with Electron too) - while creating clever workarounds to known Electron bugs - e.g. VS Code, unlike Atom, does not suffer from this bug https://github.com/atom/atom/issues/10720
The third aspect is the git integration - since Atom is sponsored by Github, you would think it has the best git integration out there - but VS Code has gone the extra mile by giving you a great user-friendly UI interface for staging and committing (yeah, I know, anything more complicated than git add -A requires the command line - the fact is that nearly 50% of all the git commands I type are git add -A, LOL).
PPS I totally agree with you about the importance of tooling. But e.g. if you have a debugger that does not have an interface to your editor it becomes hard to set breakpoints. So the editor needs to integrate with your tools and VS Code is great at that.
I don't need an instruction manual to figure out how to close VSCode.
Oh but that's needlessly hard and annoying? Well so are Vim and Emacs.
> I don't need an instruction manual to figure out how to close VSCode.
To close GVim, you click the 'x' in the upper right/left corner, like any other window.
Alternatively, you could just close the terminal window.
I like being able to use other languages for editor extension, having a competent graphical and text layout layer with image support, and quite frankly I find emacs development tedious now.
So... Do I need a few more years of time to "get it?"
I am not aware if that feature is available in other editors, I tried light table for a short time, but it isn't getting much attention since they are working on some other product. ctrl +P transformed the way i write go code, now I dont' have to bother to remember which file stored what, just ctrl +P function name, as i know what all functions I am using or I can just scroll!
VSCode and Atom are essentially just Sublime Text with Javascript instead of Python as the plugin language. Also, IntelliJ has had this for quite some time, though it doesn't meet the criteria for light weight text editor, it is certainly better than Eclipse.
I do, however, agree with you. Mostly because you can customize Atom and VSCode to have all the same benefits as Emacs and Vim. Except for running them in the console, which I know some people like having the option of doing.
I still use emacs for quick editing, moderately complex search-and-replace in limited numbers of files (for when I don't want to bother with perl), and a handy scratchpad for throwaway things, but I don't intend to do a lot more software development in it anymore.
Vim and Emacs are still superior if you want to put the time in, and both have non-terminal interfaces. They can also be both customized to be whatever you want them to be, there's not really a limit to their functionality except what plugins are already written. Ditto for Atom, though of course, it does seem to be more web based for the moment (though Atom does have great plugins for Go, Nim, and I'm sure a bunch of other languages).
In the grand scheme of things, tools like compilers, debuggers, interpreters, other command line tools (like completion servers), etc..., matter more than editors anyway.
Edit - for the record, VS Code seems great. But it's not revolutionary.