11 ms·
I will never understand why people choose VSCode/Jetbrains over a terminal based editor. I can edit the kernel with clangd and get hover reference, autocomplete
by ilovecaching 4y ago
I will never understand why people choose VSCode/Jetbrains over a terminal based editor. I can edit the kernel with clangd and get hover reference, autocomplete, go to def, ref, dec, smart refactor, and that's on top of being able to easily jump and fix lint/bugs using Vim's already great support for parsing compiler errors. With term added (which is a core Vim feature) it also has excellent support for gdb debugging. I am very glad that neovim is also making things EVEN BETTER with tree sitter and baked in LSP support.
So I get 98-100% of what an IDE gives me, I can use my editor over ssh and edit anywhere, I don't need a GUI to even be installed on the system where I have all of my cores and RAM for compiling the kernel, it starts up instantly, and it's completely free and open source, not driven by a corporation, and there's decades of documentation on how to use it.
Edit:
I really don't understand the comments of "I will literally not spend a single minute configuring my editor". I guess it's the systems developer in me that can't fathom someone that wants to use a tool to make a living without understanding it fully and being able to tweak it to their exact liking over the course of their entire career.
I personally consider my investment into Vim one of the best I ever made. If dumb college me can do it in a few weekends, you can do it. I recently setup Emacs and got it to the same level as my Vim usage in about two days of tinkering just for fun. Then again, I suppose some people are just here for the money and want to clock in and clock out as fast as possible. I really wish I could share with you the joy of tinkering, learning, and growing your knowledge about how these wonderful machines work.
- mbernstein 4y agoNeovim is amazing but recall how long it took you to get used to vim keybindings. It isn't something you master overnight. I recall it took me a few weeks to get comfortable. Lots of people are perfectly comfortable not using keyboard navigation. Edit: Also to note - vscode supports editing files anywhere over ssh as well, so there isn't a huge advantage to neovim there.
- ilovecaching 4y agoExcept that I can use vim on my iPad Pro with just a terminal app, which I can't do with VSCode. Vim is portable anywhere you can get a terminal connection, even if it's over serial.
- stnmtn 4y agoWhile it takes more work (and probably won't work over SSH), looks like there's a neat way to host a vscode server and use and Ipad as a client of it: https://medium.com/swlh/vs-code-for-ipad-and-other-phones-and-tablets-252e8cace2aa https://medium.com/swlh/vs-code-for-ipad-and-other-phones-an...
- petepete 4y agoAt this point I'd use recommend Codespaces. I taught some of my less techy colleagues how to make content changes with it and it was a breeze.
- blowski 4y ago> I will never understand why people choose VSCode/Jetbrains over a terminal based editor. I don't want to use my valuable time learning how to get vim working in some super-optimal way that's hypothetically going to improve my productivity by 1%. JetBrains consistently works well enough for me that I'm not going to bother switching. 90% of my life is spent thinking about how to solve the problem so the editor is not the main constraint.
- ilovecaching 4y agoIt's a weekend of learning for a tool that you use your entire life. Any computer scientist should realize the power of amortization.
- mynameismon 4y agoI do not know how your brain is wired, but vim is certainly not a weekend's learning (speaking from experience).
- OtomotO 4y agoTrue, it was like half a day of extensive coding for the basics, a bit of cursing, then about two weeks of settling in and then a few hours over a couple of months, when I did heavy extension and configuration. Bonus: my window manager has similar keybindings these days
- ARandomerDude 4y agoYes, do it this way. When I learned vim, I just went to work and decided to use it one day. The only thing I did was get on Stack Overflow and look up how to turn off the arrow keys, so I would have to use hjkl. As you said, by the end of the workday I was very comfortable with basic vim use.
- jethro_tell 4y agoPrint a sheet of basic commands, tape it to your monitor and off to the races.
- harha 4y agoMaybe because it’s all easy to find. You don’t need years of experience, just search for the plug-in you need. Sure it’s probably worse, not really portable and possibly insecure, but the barriers of entry are so low that it works great for most people.
- rwnspace 4y agoPrecisely this, kitted-out vim in the hands of someone experienced is a force multiplier but it's uh, 'late-game'. VSCode and the like take absolutely minimal brainpower and experience for near-enough similar gains (for most users, I would say). I say this as someone who uses both the editors I mention depending on context.
- paskozdilar 4y agoVim/Neovim/Emacs/etc. require a certain "commitment" to them - you have to learn keybindings, for example. Moreover, if you want any fancy IDE features you're addicted to, like hints, autocomplete, static analysis, refactoring, etc. you have to configure it yourself, which still isn't quite straightforward as selecting a plugin in VSCode (perhaps this is a good feature idea?). Most people just don't think it's worth it, when the existing tools are Good Enough for them. But once you pass the initial obstacle, vim/emacs/derivatives are really nice to use, and there are plugins for literally anything out there.
- ilovecaching 4y agoThere's 0 configuring. It's as simple as installing one of the many LSP clients, like ALE, that will automatically detect and start a language server for you with the right arguments.
- mikub 4y agoInstalling an LSP is already configuring, so it's not 0.
- paskozdilar 4y agoIf that's true, I'd really like to try that. I've never heard of ALE, so thanks for that. Still, the fact is that you have to know what to install. It's not like the NeoVim manpage mentions any LSP clients. So it requires a lot of tinkering, reading and participating in the community to figure out how to do stuff. That's exactly opposite of 0-configuring. If NeoVim could bundle an LSP client with it, and have a config key to enable it, that'd be dope.
- mjlbach 4y agoNeovim does bundle an LSP client.You can launch and attach with ~6 LoC. See `:help lsp` https://paste.sr.ht/~mjlbach/1a1df5cd61627e87ea4c4355a0473bffef22b957 https://paste.sr.ht/~mjlbach/1a1df5cd61627e87ea4c4355a0473bf...
- JodieBenitez 4y agoSurprise ! Different people have different expectations.
- brightball 4y agoOne of these days I really need to sit down and commit to learning to use Vim at this level. I always use Vim when I'm editing from a terminal but generally stick with VSCode or the Jetbrains family of IDEs for any real coding projects. I've just never gotten around to learning vim in a more advanced way than edit, replace, copy paste, skip to line and search. Any good suggestions on where to start? I looked at Spacevim but that seems to just throw everything at you.
- lambdaba 4y agoFor "base" Vim (pre-neovim), the Practical Vim book and Vimcasts by Drew Neil were very helpful. To get the muscle memory, try blocking the arrow keys in your config or even hiding the cursor (I'm serious, I once had this unintentionally and realized that because I was so used to Vim movements I didn't even need to see the cursor in normal mode). The vim way is: stay in normal mode, learn to move efficiently with searching, jump to char, forward/backward words etc. Don't use a prepackaged config. Refrain from plugins until you know for sure what you want.
- davidkunz 4y agoI think it makes sense to start from scratch and learn new features step by step, otherwise it quickly becomes overwhelming. I made some videos on how to configure Neovim, maybe you'll find it useful: https://youtube.com/playlist?list=PLu-ydI-PCl0OEG0ZEqLRRuCrMJGAAI0tW https://youtube.com/playlist?list=PLu-ydI-PCl0OEG0ZEqLRRuCrM...
- brightball 4y agoThanks! I'll check them out. IMO that approach makes the most sense too.
- auslegung 4y agoI highly recommend following this author’s advice https://medium.com/actualize-network/how-to-learn-vim-a-four-week-plan-cd8b376a9b85 https://medium.com/actualize-network/how-to-learn-vim-a-four... It’s a pretty gentle introduction to vanilla vim over 4 weeks. After that point I’d recommend using nvim and all the plugins you want to make life easier, but learning The Vim Way is very powerful
- snowram 4y agoSame reaction but in the opposite direction. I still do not understand why some people are that obsessed to dedicate a large amount of time learning a software that will sometimes make their life a tiny bit easier in rare edge cases. Every time I try to learn how to use Vim as an IDE, I just end up massively overwhelmed and never even come close to reach a fraction of my productivity on VSCode. The fact I cannot see the benefit where others can is frustrating.
- lambdaba 4y agoMost people I know that use Vscode now are coming from TextMate -> Sublime Text -> Atom -> VScode. Meanwhile my Vim go brrrrrr :D Seriously, there's a huge benefit to not constantly switching and learning new environments (admittedly since Neovim / switching to Lua for scripting Vim there's been a lot new but all things the community wanted)
- mypalmike 4y agoSeriously, there's no benefit to sticking with one environment. The right tool for the job. If you're doing Java for instance, no version of vim or emacs comes close to the functionality of the popular IDEs. With vi perhaps you can type more efficiently. With a good IDE, you can develop far more efficiently. For modifying bash scripts on remote machines, vim all the way.
- lambdaba 4y agoI could agree with you a few years ago but since LSP and Tree-sitter the tables have basically turned, I'm pretty confident you can get _more_ IDE-type features in Neovim (albeit with some amount of effort, no doubt). But, again, you can tailor that exactly to your liking.
- dotnet00 4y agoOne big benefit from my perspective is that due to being terminal based, vim makes it much easier to edit remotely and makes it relatively easy to bring your environment around. While vscode's ssh option is cool, it still requires that you have it installed on your local machine and while the web based version doesn't have that issue, it's missing other features (like ssh). So for me the biggest motivator for switching to nvim has been the ability to connect to my machine and work on code from any device (ie even android) anywhere, only needing access to a terminal, and if I need to work on someone else's machine, having my environment there is as simple as cloning a git repo with my .vimrc
- LVB 4y agoI held this view too for quite a while. But in recent years as I’ve been exposed to some really powerful features in VSCode and GoLand, I’ve adopted a much more flexible workflow. I always have my CLI editor running and might spend the day in there, but I often have an IDE running in parallel (with Vim bindings, naturally). By now I automatically switch between the two based on whatever is the better platform for the immediate task, and have let go trying to load up Vim beyond basic LSP.
- Barrin92 4y agoIntegration. The last time I tried neovim the LSP kept crashing for me on random occasions, some plugins had considerable performance issues, some things weren't async, and so forth. Vscode or Jetbrains or any other integrated software is from the ground built up to have its tools work together 100% of the time. I like vim fine if I edit something without any plugins needed but otherwise I'll stick with an IDE. And if I want vim controls I'll just turn them on the IDE because conceptually for me it makes more sense to port keyboard controls to an IDE than to port the entire IDE to a terminal Practical example, look at the instructions to set up an ide-like ocaml environment with neovim[1]. It requires basically to install half a dozen tools by hand and to fix the linter config before you've even started. In VsCode it's literally one click. [1]https://www.rockyourcode.com/setup-ocaml-with-neovim/ https://www.rockyourcode.com/setup-ocaml-with-neovim/
- mjlbach 4y ago> The last time I tried neovim the LSP kept crashing for me on random occasions, some plugins had considerable performance issues, some things weren't async, and so forth. Any issues with the language server I doubt are client side, and every request/response is "async". For a minimum setup it is: 1. Install the language server via opam: opam pin add ocaml-lsp-server https://github.com/ocaml/ocaml-lsp.git opam install ocaml-lsp-server 2. Add lspconfig, the plugin 3. Add the following to your init.lua require'lspconfig'.ocamllsp.setup{} 4. That will give you basic linting, you can add keybindings/omnifunc integrations by copying out our configuration examples from `:help lspconfig` or the lspconfig wiki. We're not trying to target vscode users, so if the above is too many steps that is ok, you just aren't our target audience.
- DavidWoof 4y agoI could ask the opposite: why do people choose terminal vim when you can easily add nvim integration to editors like VSCode and get 98-100% of what vim gives you along with much easier configuration of all those extras you mention like autocomplete, hover reference, refactor, etc.? That's a bit of an overstatement, because I really do love vim/nvim and nvim integration isn't that good, but the fact is that adding a feature in nvim still means researching and configuring it where in something like VSCode you open a new filetype, it asks "do you want support for this file", click yes and you're ready to go. I can spend a few days trying to get vim to work in the way I want it for a specific filetype/framework, or I can get 90% of what I want from VSCode in 30 seconds and still have vim navigation and command support.
- elpatoisthebest 4y agoThe 100% full reason for me was that I had a job where I needed to SSH into our prod server about once per month and tweak some files. I was so terrified every time I had to do it because I was afraid of vim and/or nano in those situations. So I decided to get competent so I trusted myself not to make huge mistakes. After about a week of using vim it clicked and I knew I couldn't go back to Sublime Text. As for VS Code, I do everything I can to keep Microsoft products out of my life.
- jambutters 4y agovscode is open source, there are forks(vscodium) where all the microsoft stuff is removed and you can audit it yourself if you think its sending tracking data back
- DavidWoof 4y ago> The 100% full reason for me was that I had a job where I needed to SSH into our prod server Statements like this are common, but they confuse two usages: (a) learning vi/vim well enough in order to use it in any unix environment vs. (b) using vim with a complete plugin/config suite as a primary development IDE replacement tool. The former is IMHO an essential unix skill, but it's incredibly inefficient to try to use core out-of-the-box zero-plugin vim as a primary development tool. But once you start configuring an efficient dev environment, the GUI editors start to really outshine vim, and they still provide core vim functionality via plugins if you want it.
- baq 4y agoI've been a hardcore vim user since early 2000s. I've switched to VSCode a couple years ago and haven't looked back. My .vimrc clocks in just below a humble 500 lines. VSCode gets me more with practically zero configuration out of the box; a few clicks to install relevant language extensions and that's it. It's more stable and more performant on large files (e.g. 2+kLOC Python modules). RemoteSSH and RemoteWSL plugins are 100% pure gold.
- annowiki 4y agoThe debugger. I made your same argument for years to a buddy of mine that always used WebStorm (I'm a Python dev and he kept pushing me to try PyCharm). A coworker pushed me to try PyCharm since we're on Windows and I haven't really looked back. I even bought CLion. If you can point me to an easy debugger to set up in neovim I'd probably be right back, but I can't. Couldn't figure out how to set up vimspector. And in PyCharm, at this point, I find it has better tooling than coc (I haven't wanted to spend the time setting up LSP/treesitter). Furthermore, doing development in wsl isn't that great in my opinion and native windows neovim isn't either, even when using Windows Terminal. Its slow when handling a massive repository. FZF with ripgrep still works massively faster than telescope for my main work repository. I mostly dip into wsl when I want to do complex grep/sed/find operations and to make edits to my hledger timeclock sheet. But one thing I've found to be a killer app for Pycharm Pro: vim keybindings in jupyter notebooks. Works way better than the plugins for Jupyter Lab. IdeaVim is sometimes kind of disappointing, I wish JetBrains would just add a neovim plugin (I want to use vim sandwich instead of vim surround but alas). Still, it's good enough.
- davidkunz 4y agoDebugging in Neovim is quite simple, I recommend nvim-dap, I made a few videos: https://youtu.be/ga3Cas7vNCk https://youtu.be/ga3Cas7vNCk https://youtu.be/SIYt1dopfTc https://youtu.be/SIYt1dopfTc If you prefer Vimspector: https://youtu.be/-AZUIL1rY3U https://youtu.be/-AZUIL1rY3U
- wussboy 4y agoI watched your first video. As someone who likes the idea of Vim and has learned many of the keyboard shortcuts, my impression of the video was "Debugging in Neovim is quite simple. Just remember these 35 keyboard shortcuts."
- davidkunz 4y agoThat's true, it requires a bit of memorization and configuration. I've put the shortcuts similar to character movements: CMD + j,k,l (jump over, jump out, jump in).
- heydonovan 4y agoCould not disagree more. For entertainment purposes, I've installed neovim with `brew install neovim`. Opened a small project with `nvim ~/projects/whatever`, and am presented with a screen full of errors (https://imgur.com/D0ydDIG https://imgur.com/D0ydDIG). Pressing enter brings me to a blank screen with even more errors. It then drops me into a vim document with some modal screens and now now I'll probably spend hours researching what all these mean, why this is happening, etc. All those features you've listed aren't anywhere on the homepage, how does one even do that? I'm interested in learning more, but to think one can do this in a weekend just isn't true. While I'm sure I could figure out all these kinks, its just software, it's the time sink that makes me pause. I don't see the value here, but I also don't know what all it can do compared to my current workflow with VSCode.
- jethro_tell 4y agoThat's a brew packaging problem. Haven't used it for years but it happened enough for me that I just went to Linux where packaging wasn't an issue.
- deleted 4y ago[deleted]
- wyclif 4y agoJust curious: you mentioned SSH. What is currently the optimal way to setup vim/neovim over SSH and carry all your configuration over with you to different servers?
- xigoi 4y agoJust use your favorite version control system?
- lazyier 4y agoI don't know why people would use a text editor in a terminal when they can use that same text editor as a desktop application. Fonts are better, colors are better, it is faster, less latency, running a terminal inside your editor works better, pop-ups and overlays work better/are more flexible/easier to read, mouse interactions work better, resizing works better, it is easier to run multiple windows, it is easy to run multiple different fonts with different font sizes, etc etc. I also don't have to figure out solutions to conflicts between the keyboard shortcuts between the shell, the terminal, the terminal multiplexer (screen/tmux/tabbed terminal emulator), and the editor. > I can use my editor over ssh and edit anywhere I can just have my editor use ssh to edit files anywhere. Remote editing is a thing. Anyways for proper system hygiene you shouldn't be shelling into anything except to troubleshoot problems or for checking things you don't have monitors in place for. This is why we have things like ansible or puppet. In fact the whole insisting on having an editor in a terminal emulator thing is probably holding Nvim back as a whole. Which is why you don't see the obvious benefits. Since the community wants to use terminal emulators so heavily then all the add-ons and features of the editor must support the lowest common dominator between desktop apps and terminal emulator, which is almost always going to be the terminal emulator. Just remember that you are not avoiding a GUI by using a terminal emulator. It's still a GUI. Just a GUI designed for running command line applications in a Unix-style shell. And Neovim really isn't even a command line application.
- kldx 4y agoThank you, I agree with this perspective. The content density from a professional IDE is higher than what I get from a terminal editor. I can't imagine tooltips using the same font size as the rest of my code. I don't like it when the UI elements use monospace fonts.
- JodieBenitez 4y ago> I really don't understand the comments of "I will literally not spend a single minute configuring my editor". It's really not difficult at all. I and others have probably a million things we would like to tinker with (yes, including tweaking a text editor), but we all have a limited time so we end up with priorities. It just happen that I didn't make a priority to tweak vim/neovim because I'm happy with my current code editing setup. For other kinds of software, I may not be happy at all, to the point of writing my own. See: different people, different expectations. Your choice being right for you doesn't mean it's the right choice for everyone. Tolerance 101.
- ylyn 4y ago> I can use my editor over ssh and edit anywhere, I don't need a GUI to even be installed on the system where I have all of my cores and RAM for compiling the kernel, I can use VS Code in the browser: https://github.com/coder/code-server https://github.com/coder/code-server > it starts up instantly, I launch my editor once a day. Why do you need to keep killing and starting your editor? > and it's completely free and open source, OK, so is VS Code, or at least the OSS version, which has all the key features anyway. > not driven by a corporation, So this is your philosophy. > and there's decades of documentation on how to use it. Most of it out of date, probably. > I guess it's the systems developer in me Guess what? I'm a systems developer too! I also work on the kernel! But I use VS Code. > that can't fathom someone that wants to use a tool to make a living without understanding it fully and being able to tweak it to their exact liking over the course of their entire career VS Code is open source, so there's nothing stopping me from diving in if I want to. And it's also highly extensible. Now that I've answered all the supposed benefits you list about (neo)vim, I have one question: Can (neo)vim show text in two different font sizes? Or fonts? Like, what if I want my documentation popups to show up in a sans-serif font? No, don't tell me I have to open up the documentation in a browser or whatever. I want it in the popup.
- ilovecaching 4y agoLinux newbies jumping into Microsoft's arms is still something I'm trying to wrap my head around.
- cercatrova 4y agoTools are tools. If they work well, great, if Microsoft tries to wreck VSCode for some reason, then people will switch.
- picardythird 4y agoEmacs would like to have a word. But seriously, that would not be an important feature to me. Obviously everyone has their preferences.
- wing-_-nuts 4y agoI like using vim as an editor. I don't bother with janky plugins that require some arcane blood ritual to install, configure, and be invoked. I'm not going to go through the trouble of setting up vim as a java ide when intellij does that intuitively out of the box. If I just need to edit a file, or view it, I'll often use vim. If I need to sit down and actually code? Intellij every time. If vi had never existed, and you introduced it today, people would think it was some sort of april fools joke of an editor. It is the least intuitive and user friendly piece of software I've ever used. The only reason I continue to do so is because I've learned it's quirks and it's stockholm syndrome now.
- fi_do12 4y agoQuestion to those who are using both NeoVim and an IDE like VSCode/Jetbrains: Suppose you're using VSCode/Jetbrains with proper keyboard shortcuts (stuff like expanding selection, search/highlight all matches, ...) - basically never using the mouse. Is navigating / editing with NeoVim really that much faster?
- mekster 4y agoIf vim or neovim can work as featureful as JetBrains, I'll switch any day. Let me know how to highlight SQL in strings and make tables linked to remote database over SSH and autocomplete table names and column names as I type. And make sure that its grammar is checked against specific RDBMS's available syntax. And I also want code formatting that's not entirely opinionated, so I can decide what gets wrapped and what gets indented and let it format an entire folder with a shortcut. And if I'm setting the project to use PHP 8.0, make sure to highlight features I've mistakingly used from 8.1, so that I don't get runtime errors. And if I'm editing files over SSH, make sure that if the remote file is changed, it warns me before I upload a local version, so I don't accidentally overwrite any remote changes and give me the option to merge. And for sake of being right, in PHP if I have a function paremeter set as a string, highlight "is_string" check on the parameter as redundant, so my code doesn't look dumb. I probably have others and even more that I'm not even aware of from its feature lists that can be useful over what vim/nvim can offer after taking some months configuring it to my liking. I suppose you're comfortable missing out on those? vim to me is a server config editor.
- Aissen 4y agoI prefer using (neo)vim, but I find it a bit disingenuous to ask such a question. LSPs wouldn't exist without the investments made in VSCode. I'm grateful for this technology aimed at bringing IDE features in any editor (instead of being silo-ed), and don't really care if most people prefer the comfort of integrated environments.
- ahallock 4y agoI've used Vim for 20 years. My main issue is that, while I love the text editing part, setting up something aesthetically pleasing with IDE-like features takes a lot of effort -- especially when you're dealing with multiple layers of shell + iTerm2. Some even add tmux on top of that! My setup still doesn't look on par with the amazing setups I see on Youtube. There are too many low-level settings you need to mess around with and it's completely unintuitive.
- ahallock 4y agoFelt inspired to look at this again and there is a project called LunarVim which advertises giving you an "IDE" experience out of the box. Looks promising!