5 ms·
>Everything is pre-configured: You don’t have to worry about setting up tags, or YouCompleteMe, or NERDTree. I can’t tell you how many times I open a new projec
by simias 6y ago
>Everything is pre-configured: You don’t have to worry about setting up tags, or YouCompleteMe, or NERDTree. I can’t tell you how many times I open a new project, perhaps in a different language, and everything works great out of the box. It’s a total sigh of relief.
I agree 100% here, if you value these types of IDE tools I don't recommend going to Vim. It frankly sucks at this stuff, it wasn't meant for it and it's not the type of things you can easily tack onto a codebase not meant for it. Doesn't stop people from trying of course, and some do an amazing job at it, but it rarely reaches the same level of polish and simplicity as good IDE solutions.
But on the other hand, please consider the Zen of dumb tools: I code all day in Vim and I don't use YouCompleteMe, NERDTree or anything like that. I use dumb, language-agnostic completion and dumb, language-agnostic FZF and Rg for searching and navigating the source code. If I'm feeling fancy I use universal-ctags, but if it's not here FZF and Rg do a good enough job.
Is it as fancy and fully featured as an IDE? No. But like the author I like when stuff just works, and dumb tools work reliably regardless of what I'm editing. It works in emails, it works in man pages, it works in custom DSLs, it works in config files, it works in HN comments if I decide to edit them there. And it's always instant.
- willberman 6y ago+1 on vim with fzf and rg being enough for almost any task. I use that setup for most things and then when I need something with a little more syntactic awareness, I pop open my IDE.
- TylerE 6y agoThe killer thing for me is how IntelliJ has the best cross-language embed support. So it not only knows when strings in my python code are sql queries, but it autocompletes in those strings against my actual schema
- mdaniel 6y agoAnd I recently learned that it will open the embedded language in its own editor pane (ala editing code in org mode, if that means anything) and can be a less distracting way to edit without the mental encode/decode cycle It may have been implied by the "it autocompletes" statement, but it runs analysis on that code, too, catching bad practices such as logic errors, common mistakes, and unused code (where applicable) One can influence its embedded language detection via `language=RegExp` (or whatever the language id is) while inside a comment right above the embedded language literal: https://github.com/JetBrains/intellij-community/blob/idea/203.5600.34/plugins/IntelliLang/src/org/intellij/plugins/intelliLang/inject/InjectorUtils.java#L361 https://github.com/JetBrains/intellij-community/blob/idea/20...
- dbtc 6y agoHow do you hook vim up to email and HN comments?
- mr_mitm 6y agoEmail is easy if you are using mutt. HN comments... I'd like to know that, too. Before Firefox switched to WebExtensions, there was a plugin that opened gvim when you pressed some hotkey while the focus was on an textarea. Now there is textern, but it requires some additional binary.
- simias 6y agoThere still are plugins, you just need a helper tool on your system to run the actual commands. Tridactyl provides the feature but if you just want external edit without the intrusive vim binding layer you can try Textern, it worked well back when I tried it.
- akalsz 6y agoFor email mutt is obvious, but I also recommend aerc, though it's still beta and does crash sometimes. And I'm writing this from w3m, in which you can just navigate to a textarea and write to it in your $EDITOR. For general browsing it's not that great due to its lack of js/css support, but I find it great for commenting on forums which usually still work with html forms. Interestingly, w3m used to work with gmail as well, but sadly you can no longer log in without javascript.
- leephillips 6y agoI use qutebrowser, and one keystroke opens vim. When I close the editor the contents of the Vim buffer appear in the browser text-entry input.
- higerordermap 6y agoI know vim isn't for people who want everything set up out of the box. But I think installation of the extensions for LSP / completion / navigation etc.. features could've been easier. In my limited experience, it's a hassle getting these tools to work.
- apazzolini 6y agoThis will get a lot simpler in the next couple of months when Neovim 0.5 ships with built in LSP support.
- higerordermap 6y agoWow. Good to know. Thanks.
- tsimionescu 6y ago> But on the other hand, please consider the Zen of dumb tools: I code all day in Vim and I don't use YouCompleteMe, NERDTree or anything like that. I use dumb, language-agnostic completion and dumb, language-agnostic FZF and Rg for searching and navigating the source code. If I'm feeling fancy I use universal-ctags, but if it's not here FZF and Rg do a good enough job. I understand this preference, but it's also important to recognize that you are essentially programming with one hand tied behind your back when you are choosing to use such tools instead of an IDE when one is available. For example, free IntelliJ can do "Data flow from/to here" analysis on your code for Java (probably others as well), which analyzes your whole project and finds all the code paths that use/provide a value for a variable, at any depth of calls. For a medium-sized product, finding the same information with Rg is easily 30m of work; if you need to navigate between the levels to find a bug, you'll lose even more time. Also, refactoring tools that an IDE can give you make certain programming tasks trivial at 3-5 key presses which would easily be a 2 day change in a medium project using basic text processing tools. Especially now that most IDEs also support VIM or emacs key bindings, it is very rarely a good idea for medium-to-large codebases to rely on text processing tools instead of a full IDE. Note that I'm also considering vim/emacs+language server or similar extensions as an IDE (though LSP has quite a way to go, especially on the refactoring side). For small projects, or for languages with poor code analysis support, I do agree that these advantages don't amount to much and personal preference and familiarity amounts to much more than any tools an IDE can give.
- theonemind 6y agoI land in the "if you need an IDE, you already took a wrong turn" school of thought, basically Paul Graham's position in this old post: https://news.ycombinator.com/item?id=72710 https://news.ycombinator.com/item?id=72710 granted, we don't always get to choose what language we use or what code bases we inherit.
- tsimionescu 6y agoThat's a very strange attitude from someone who proselytizes Lisp, the language which pioneered IDEs about 30 years before other languages really had anything comparable. Emacs, for Common Lisp, is still a much more advanced IDE than many languages have. It used to actually be a significant ingredient in the secret sauce that made Lisp so powerful - an advantage which it has thoroughly lost to IntelliJ/Visual Studio in my opinion.
- dotancohen 6y agoVI (or VIM) the text-editing language is terrific. VIM the text editor is just a basic editor like notepad, that just happens to speak VI[M?] the language. IDEs exist that also speak most of the language. IdeaVIM is an extension to IntelliJ that speaks 90% of VIM the language (and also gets some things wrong). I live in IdeaVIM almost all day.