I don't know any Vim Script. You don't have to know it to use vim, unless you want to write your own plugins.
I tried using an IDE recently (Clion), but it was not really worth it. Vim has plugins for most IDE features, including autocomplete and syntax checking. The only feature that I really miss in Vim automatic refactoring such as inlining functions.
Any Python code I write or review in Python I try to give a run-through in PyCharm (JetBrain's Python IDE) interactively -- having a chance to step through code lets me consider more options and corner cases and get a more expansive view on what I'm developing or reviewing.
"vim" is my preferred editor when I'm not in an IDE, and often when writing bash scripts, but over the last ten years especially I've rarely written higher-level language code outside an IDE environment ... and I stick to JetBrain's suite mostly these days.
I really wish there was an IDE that would be IDE-first (building an AST for each file, and using it for most of the functionality + making it easily usable in the scriptable plugins), but had the UI and usability of vim, but there doesn't seem to be any.
Like I said, Clion (which is a JetBrains product) has some great functionality which goes beyond that. The one I found the most useful is the refactoring functionality. I actually opened Clion just to refactor some code on Friday. But it also has drawbacks. I am working a very large codebase and Clion is very slow.
edit: Let's take 2 billion. Assuming 60 characters per line, that'll take around 120GB just to keep the text in memory! Would the ast representation of whole codebase be smaller or larger in size?
Any editor that supports it will have very very high quality auto complete and other IDE-like benefits like jumping to definitions.
It's still in its early stages but it's shaping up to be a game changer if you want those features.
Not knowing how to use a more productive IDE doesn't mean that Vim is more productive.
Here, I’ll do it completely from memory for you, while typing on my iPhone.
:saveas newfile.ext<cr><c-^>:!rm %<cr><cr>:bd<cr>
And of course, you could always use the command line to rename anything.This argument is so nonsensical it doesn’t bear contemplating.
So, not dozens.
You could also not bother destroying the old buffer.
You could also do:
:!mv % newfile.txt<cr><cr>:e newfile.txt
Again excluding the filename and extension, that's a total of 12 keystrokes.And again, this is not a task anyone spends much of their working life performing.
Give up.
Probably the first time someone ever thought this inane idea.
>Vim's nasty design
OK, trolling, next.
I learned vim a bit more than 20 years ago and can tell you it’s a very efficient tool. Fair enough if I was doing most of my coding in a single language it might be worthwhile to learn a different IDE. You’re welcome to use a different tool that better fits your needs. And hope that you find it at your next workplace or the legacy server that you are asked to fix.
However, the main benefit of vim isn't so much 'increased speed' (to me) but rather 'feels like a solid tools in my hands', or even better, 'feels like an extension of my mind'. No other editor gives me that - there are always these small micro-interruptions of 'reaching for mouse, aim at menu, miss, try again' or 'take hands off home row, now my elbow isn't in a comfortable position any more when I go back'.
It's like using say a Hilti, blue Bosch or Makita cordless drill vs a no-name or even cheaper brand name one. You can drill holes or screw screws just as well, but the reduced vibrations and excess power and tighter fit of everything just make everything feel more effortless and make you spend less time on being annoyed at the tools, even if they're all just 'micro-annoyances' that don't add up to any measurable time wasted. The more expensive ones (in Vim's case, expensive in learning time) are still worth it.
TBH, now that I'm mostly using an IDE with vim-plugin for work, I still prefer writing macros in such situations than using multiple cursors, because such situations are rare enough, and the power of habit is strong.
VIM is about composing small and straightforward operations, like in functional programming. So with several primitives you get a lot of combinations. So the idea actually is the opposite: Learn just a few primitives and get your shit done using the combinations, which can be very flexible and powerful.
> you have to learn a lot more than these tricks and hacks to be proficient
The techniques highlighted in this article are not tricks nor hacks. It's actually more like VIM 101. Surely VIM has a lot of hacks but these definitely aren't among those. You don't sound very informed about VIM here.
> Obviously an IDE with intellisense and multiple cursors is more efficient than most of Vim's efficiency hacks.
Obvious to you, maybe. Funny you believe that something that has caused a shitload of controversy can actually be obvious. Please don't serve your personal opinion as being "obvious". To me, and I'd say to many others, it's not only not obvious, but "obviously" wrong.
Also VIM has multiple cursors for some time albeit as a plugin: https://github.com/terryma/vim-multiple-cursors
> Vim is inefficient for editing
> Vim's efficiency gains more apply to editing text, not structured code.
First of all, structured code is text, so Vim's efficiency gains have to apply to it as well, there can't be any denying that. On top of plain text, VIM has other easily applicable features for structured code such as text objects, folding, highlighting, auto-completion and tag-browsing. These are not very hard to get right.
> If you aren't proficient in Vim's garbage VimL then keep learning
VimL really is garbage, I'll give you that. The trick is that you don't really need to learn it. I'm a ~10 years VIM user and still don't know anything about the VimL syntax (intentionally). The secret is that you can have a very effective VIM config around ~50 lines which itself mostly consists of settings, file type specific settings and aliases. But if you try to make VIM behave as something it wasn't meant to be, you'll be sorry.
I think that the confusion comes from the tendency of comparing VIM to IDEs, as well as trying to make VIM behave like IDEs. In my opinion, most people in the VIM community are "guilty" of this as well.
If you need an IDE, but you want VIM's mode and command composition driven approaches and keybindings as well; the wiser choice would probably be a modern IDE that supports a VIM mode.
For me, stuff like popping fancy file browsers or git wrappers from VIM is not what I'm looking for in the VIM experience.
But if what one wants is to get stuff done in the terminal; then one should learn a couple of UNIX tools instead of installing a gazillion of VIM plugins.
In short, if you need a modern IDE, use a freaking modern IDE. No need to make ignorant comments about our beloved VIM.
Go into visual block mode, press j a few times to select more lines, and hit I to go into insert mode. When you finish the insertion, you'll see the same insertion has been performed across all the selected lines.
You are clearly trolling, and/or you have far less knowledge of vim than you think you have. You are only making yourself look bad here.
For everything else, there’s macros. Macros are unarguably far more powerful and useful than multiple cursors.
Visual block mode is constrained by absolute cursor position. Multiple cursors is constrained by relative cursor position. Macros have no constraints whatsoever, and can even be recursive.