4 ms·
Vim is the best lightweight single file editor there is. That’s all it should be. If you’re heavily configuring it, you should be able to answer “why is this be
by eradicatethots 9y ago
Vim is the best lightweight single file editor there is. That’s all it should be. If you’re heavily configuring it, you should be able to answer “why is this better than an ide?” Without saying “vim makes me cool”. Also, if you can answer that, please let me know! To me, an IDE is better for everything but what default vim is good at.
And if you tell me that typing is faster, please also tell me why that’s relevant!
- ehsanu1 9y agoI can't live without my vim bindings now, it's incredibly jarring anytime I have to use someone else's editor. The muscle-memory is just too strong, and configuring vim with a bunch of plugins is extremely easy to do and provides me a lot of value for no downside afaict. I started configuring vim years ago and have only tweaked it here and there over time, adding a plugin for this or that as I felt the need. I don't really see anything wrong with that :)
- eddieroger 9y ago> “why is this better than an ide?” Because it's a workflow that works for some people. Shouldn't being the most effective you can be trump things like which editor is better, or IDE versus vanilla editor? Your workflow is your workflow, don't worry about other people's.
- foo101 9y ago> Vim is the best lightweight single file editor there is. Are you serious? Do you know about Vim buffers? The `:b` command? The `Ctrl + 6` command? The `m` and `'` commands? These commands alone make Vim a far superior multi-file editor than anything else I have seen. Now if you add plugins like `NerdTree`, `CtrlP` or `fzf` to the list, I don't think there is any other editor on the planet with the exception of emacs that comes anywhere close to multi-file editing productivity that Vim can offer.
- solatic 9y agoAfter you really internalize the Vim movement keybindings, using anything else to move, from arrow keys to home/end to the mouse, feels like an interruption in your workflow. The wrist movements are what kill you by a thousand cuts. It's like TrackPoints versus mice. Once you're used to never leaving the home row, the alternative feels rough and unergonomic.
- oelmekki 9y ago> And if you tell me that typing is faster, please also tell me why that’s relevant! Clearly the less understood thing about vim. People keep thinking this means "typing more words", while what it means is "having the change you have in mind faster on your screen". It's not about writing more code, it's about not having your code lagging compared to your brain. Anyway, to me, this is not even the best feature of vim. The best feature is what vim creator mentioned : its ability to automate repetitive tasks, possibly short living (with macros). It's easy with vim to convert a file without writing a parser, just with macros. So yeah, I prefer to add IDE stuff on top of vim rather than using an other editor.
- eradicatethots 9y agoThat’s true, vims automation is great. I’ve had some success with multiple cursors in sublime text for instance, but vim really is the king here.
- nextlevelwizard 9y agoReversely what is so good about your IDE?
- eradicatethots 9y agoIntellisense, in-line code documentation, debugger, unit tests, refactoring, file browser/project support, find usages/jump to definition, full project intelligent search. Even where vim supports these, it’s support is far weaker, less reliable, and much more painful to set up than IDE support. Among devs serious about productivity, it’s hard to imagine choosing vim.
- nextlevelwizard 9y ago>in-line code documentation What do you mean by this? Like folded comments? >debugger So, gdb? >unit tests You can write unit tests in vim. You can also run them, obviously. >refactoring Again, what do you mean? Now it feels like you are just listing stuff or maybe I just don't know what refactoring actually means. >file browser/project support Granted the build in file explorer is pretty stupid, but the standard `:find` works perfectly well, so as long as you are not just randomly browsing, I don't see an issue. >find usages/jump to definition Vim has support for tags. I use jumping between them every day. >full project intelligent search What is this? Just grepping for stuff on whole repo or something more interesting? >Even where vim supports these, it’s support is far weaker, less reliable Only if you haven't used the features before. I definitely do not buy the "far weaker and less reliable" part. >much more painful to set up than IDE support. I am not arguing that vim does not have a higher learning curve than your average GUI editor/IDE, but are you seriously suggesting that you have not configured a single thing in your IDE? If you have, then your point is moot. I consider my .vimrc complex, but it has been build from scratch over the years as I've wanted more functionality. >Among devs serious about productivity, it’s hard to imagine choosing vim. Meh, sure depends on what you are doing. I rather have a tool which I can adapt to my needs than having to hunt down new tool for every project/language. You ready for that killer feature that your IDE doesn't have? Try being productive on another machine. Over an SSH. EDIT: I just noticed that I completely dismissed the "intellisense". Completion is build in by default. I can't remember if member list is, I use some tiny script that formats them all nice and neat.
- falcolas 9y agoSo, a lightweight text editor eh? What about: - Automatic compilation and error mapping into the codebase (supports make and parses gcc output by default). - Function definition traversal with tags. - File traversal over #include statements - Syntax highlighting. - Word completion with both on-page and tags file support. It's sometimes easy to forget, but vanilla vim is a fully featured IDE for C. All this is really doing is extending that IDE functionality to support other languages, and adding innovations which have been made in other editors.