11 ms·
I've seen so many editors come and go, and yet I've been using Vim for the past 20 years and have never had a problem. As stupid as it sounds, if I could give o
by toprerules 2y ago
I've seen so many editors come and go, and yet I've been using Vim for the past 20 years and have never had a problem. As stupid as it sounds, if I could give one piece of advice to any entry level SWE, it would be to learn Vim or Emacs and just stick with it for your whole career.
- pomatic 2y agoCan you offer up a .emacs that provides the same functionality as say, PHPstorm? I've tried, and not been able to reach that level of functionality.
- criddell 2y agoI'd give the opposite advice. Learning a new editor is fun and thankfully they are mostly inexpensive. You will build up a suite of editors that you use in different contexts and be able to talk about the differences based on experience and not just dogma.
- twelve40 2y agoI find this and the emacs sentiment really weird. I use vim daily for quick edits, but for any sizeable codebase, especially new/unfamiliar, IDE's are just better. It's like depriving yourself of a bunch of tools and helpers for no visible benefit.
- packetlost 2y agoidk, I find I don't miss anything from heavyweight IDEs. I switched to neovim like 6 years ago. 95% of working with a codebase, familiar or not, is navigation and editing. LSPs enable pretty much any editor to intelligently navigate to definitions and find usages of a given construct. Anything beyond that is quickly hitting diminishing returns. The one exception is maybe untangling particularly gnarly git conflicts.
- binary132 2y agogood thing Emacs has a best in class git and visual diff editor package
- packetlost 2y agoEmacs is fine, but it's not really about the visual diff and more that you get syntax checking and other features in the diff view that afaik aren't available in lighter weight tool. Neogit is quite good and is heavily inspired by magit, so it's not like they're appreciably different.
- mixmastamyk 2y agoMost tools work at the command line, making scripting a freebie.
- gedy 2y agoNot OP, but I was confused as well, but found that a lot of people who did this had basically created an IDE-like experience with tmux, etc around vim, etc. Not really my thing but I guess it works for them.
- bawolff 2y agoMaybe i just never gave the heavyweight ide tools a fair chance, but i always found them more distracting than helpful. Focus is king for me, and vim gives me that.
- cruffle_duffle 2y agoVSCode is not a heavyweight IDE by any means.
- valval 2y agoI use IDEs with vim keybinds and zen mode (full screen, hide everything except text editor) when writing code.
- csdreamer7 2y agoStrongly disagree, but I am in a niche field, Linux kernel development. Emacs is really struggling with it's tools. But for Neovim: the plugins and good keycombos are absolutely essential to get certain functionality for my productivity. * rg with telescope window to quickly find text in very large code basis is essential. * Pressing spc, spc, to bring up a telescope window of my open buffers and typing in text to narrow them, very important. * To date I still struggle to get the LSP to work the Linux kernel on VSCode, but on Neovim I got it working. IDE's have a lot of menu clutter that I struggle to make good use of-most programmers working on user-space apps, it is likely fine, but for the kernel, we often need more control.
- Zambyte 2y agoEmacs is doing fine too.
- csdreamer7 2y agoI struggle to find good bundles for Emacs. Doom Emacs is struggling with migrating their plugins. Most programmers I know use Emacs with few plugins and not the better IDE like plugins in Neovim.
- a_e_k 2y ago> Emacs is really struggling with it's tools. First I've heard of this. As a long-time vanilla Emacs user, I'm using consult-ripgrep and rg-project for ripgrep interfaces, consult-buffer for fast buffer and file switching, Eglot for LSP integration (mainly with clangd), etc. I've also got org-mode for note taking, magit for speedy Git manipulation, etc. And all without any visible menus or clutter. I suspect that a power Emacs user and a power Neovim user are more akin here to each other than to VS Code users.
- csdreamer7 2y agoI mostly use kickstart.nvim in Neovim. I really like using mnemonic key bindings (which do show a menu) with the functionality above. One real issue was the lack of a telescope competitor (and I noticed you did not mention one above). I really like the quick overlay for those actions is how Telescope in kickstart is programmed. I really do not like the results smushed at the bottom of the screen like how Doom handles it. Spacemacs got me into mnemonic key bindings, but it was too buggy and development had slowed. I got some things working with Doom Emacs, but it had a lot of bugs as well. Part of that reason is projectile also seemed to no longer be worked on. They were converting over to project.el but that seems to be slow.
- llm_trw 2y agoSince I graduated, I've had people try to sell me on the following editors, which were going to be the future: BBEdit, TextMate, Sublime Text, Atom, Komodo Edit, NetBeans, and Eclipse. Each was going to kill Emacs. Somehow, I think I'll be using a version of Emacs until the day I can no longer type. Meanwhile, everyone else is wasting months getting up to speed on the latest and greatest thing every 8 years or so. This adds up over a career. Oh, and by the by, this was written in Emacs using GhostText as the link between Firefox and Emacs.
- stackghost 2y ago>Meanwhile, everyone else is wasting months getting up to speed on the latest and greatest thing every 8 years or so. Yeah I used to think this way, because you're right: becoming proficient in emacs takes significant effort and time. But becoming proficient in VS code takes maybe 25 minutes. 25 minutes to change IDEs every 8 years or so doesn't seem like an onerous requirement to me. Emacs just has extremely poor defaults and out of box UX.
- llm_trw 2y ago>But becoming proficient in VS code takes maybe 25 minutes. Becoming proficient in kicking a ball takes 5 minutes. Becoming proficient in football takes slightly longer. Magit alone makes VS Code look like a child's finger painting.
- imp0cat 2y agoSo true! Now don't get me wrong, I quite like VS Code as it's so easy to set up and there is a plugin for almost anything, but I find myself always coming back to Emacs. He's right about the defaults though. Use something like Spacemacs or Doom if you just want to dip your toes in the goodness that is Emacs.
- bitwize 2y agoI typed up some thoughts about the nth time I tried out Visual Studio Code to see what all the fuss was about and if my productivity could be improved vs. Emacs. I might turn it into a blog post, if I can be arsed to start a blog again. One header read: "Not better enough". Inasmuch as Visual Studio Code does anything better than Emacs, it doesn't do things better enough to justify expending the high activation energy of switching, unlearning my Emacs workflow and learning all that I need to know to do things Visual Studio Code's way.
- bitwize 2y agoThere are a number of neurodiverse hackers who've "switched off the targeting computer" precisely because it's disruptive to thought to always be having to constantly juggle the state of code in your head with the fucking video game appearing before your eyes as you type. I am one of them. Recent research has confirmed that this is an actual phenomenon: https://link.springer.com/chapter/10.1007/978-3-031-35017-7_9 https://link.springer.com/chapter/10.1007/978-3-031-35017-7_... Discussed on Hackernews: https://news.ycombinator.com/item?id=36721055 https://news.ycombinator.com/item?id=36721055 If IDEs help you work better, that's great. Do not presume your experience and preference generalize to all.
- acuozzo 2y agoMy current codebase is a liberal mixture of C, C++, Java, and mksh. The whole project uses CMake and GNU Autotools and ndk-build and whatever the heck calling mma with AOSP does. There's no way to unify it given how many different moving parts are involved. Trying to fit this all within an IDE would be a project of its own...
- lostmsu 2y agoA similar mix took me under 20 minutes to get a C++ + Rust + C# + TypeScript codebase working between VS proper and VS Code. In fact, I don't remember doing anything at all to get it working except installing damn node for TS and choosing CMake configuration in a dropdown.
- Lio 2y agoHow? What tools do you have that you can’t plug into any editor that supports LSP/DAP like emacs or vim?
- camgunz 2y agoEveryone's brain is different, but I'd bet you'd be surprised by how good you are at things you rely on an IDE for (autocomplete, go to definition). For other stuff, sed and grep will cover 90% of your needs. Source: me, and I'm pretty good at this.
- toprerules 2y agoWhat tools, what helpers? I hear this comment a lot and it's just ignorance on the part of people who clearly have never tried to actually learn how to use (Neo)vim or Emacs. I've used Jetbrains, VSCode, Atom, Xcode plenty and there's nothing that I can do in those IDEs that I can't do in Vim besides things related to platform specific SDKs.
- xtracto 2y agoBut this is people that use their autocomplete, F8 step through debugging and the like. I was like that about 20 years ago, working with Eclipse and later NetBeans for Java and Visual Studio for C# .net v1 (anyone remembers whole tomato extensions?). I needed the IDE , the autocomplete, the debugger and all that. Nowadays, I do mostly Vim and Vscode for more complex projects. I don't know why, but I "grew out" of needing an IDE.
- nomel 2y agoI suspect it’s also about the type of work you do, if you don’t need a debugger.
- rad_gruchalski 2y agoAre you using Vim and VSCode in plain text for everything? Or do you still like the language server, syntax highlighting and the like?
- xtracto 2y agoLanguage server and plenty of plug-ins. I haven't used a debugger proper in more than 10 years I think... only ollydbg for cracking fun.
- rad_gruchalski 2y agoSo you do like an IDE...
- trey-jones 2y agoThe weird thing about comments like these is that of course you can do all of this stuff with Emacs, you just have to figure out how.
- xtracto 2y agoHaha I'm a vi guy never used emacs. Not meaning to start a war.
- nineplay 2y agoI probably used vim exclusively for about a decade. I've worked with a handful of developers who've only used vim and I've only known one who was anywhere near as effective with it as most IDE users. A few examples -- debugging with print statement because they don't know how to use a command line debugger -- using find and grep to find files/methods -- hand-formatting files because they don't have a inline formatter or something to notify them when they've missed a semicolon or spelled a method wrong. I strongly encourage them to move to an IDE because I can't stand looking over their shoulder and watching them code so inefficiently. There probably are vim plugins to handle many/all of these things, but if a developer doesn't put the effort in to find them than they're just hurting they're own productivity.
- bawolff 2y agoI'm kind of doubtful of this. Just to take print debugging as an example. While there is definitely a time and place for debuggers, i think print debugging can be shockingly efficient in many circumstances. Besides, typing speed is usually not the limiting factor in programming speed. I think overall efficiency needs to take a broader look.
- sagarm 2y agoI default to printf debugging myself, but it can be an indicator that someone doesn't know their tools.
- erik_seaberg 2y agoBreakpoints are likely to screw up a lot of concurrent user requests, so in prod we debug microservices by comparing pushed logs.
- llm_trw 2y agoThe typical bell curve meme: https://imgflip.com/i/9a9gm7 https://imgflip.com/i/9a9gm7 The fun begins when you can't debug by printf because the buffer is shared by multiple processes that change it while the printf command is running.
- jimbob45 2y agoHow can you possibly be as productive as someone working in Visual Studio? I'm asking honestly - working without the solution explorer, being able to look at any immediate variable, instruction pointer dragging, and others seems like it would slow me down immensely.
- syndicatedjelly 2y agoWith vanilla Vim, you're right. I recently switched to NeoVim after years of using VSCode, and after about 2 weeks, I am probably back at about 90% of my productivity as VSCode. I had to spend a little time learning Lua and learning the internals of a text editor, but I wanted to learn those skills anyway so I'm glad to have had an excuse. If you have no interest in those things, then I wouldn't recommend leaving VSCode. I am also excited by the fact that the text editor configuration is programmable in a Turing-complete language, as opposed to pure JSON configurations that VS Code offers (correct me if I'm wrong, but settings are just a JSON file right?). It means that anything is possible. In VSCode, my biggest complaint was that, for the Vim extension, the status bar was not configurable - I wanted to make the whole page change color when in "Normal" mode, versus "Insert" mode. Not possible in VSCode, but it's only a handful of lines of Lua in Vim. Is that a huge productivity boost? No, but it makes me happy. Just as much as I want to be productive, I also want to be happy while programming
- ironman1478 2y agoVim is great but I think VSCode really is the one tool to rule them all going forward. It's extremely well designed, snappy, and I think does the correct thing of first treating everything as a text file and allowing plugins to provide semantic meaning. I never liked visual studio because it was too specific to writing software and using the GUI to do what I wanted. Editing msbuild files directly was a pain for example. If I wanted to do some shell scripting or system debugging, I had to leave that environment. Whereas with VSCode, I really never have to leave the VSCode environment to do what I want. I can pop open a shell within VSCode and don't have to switch windows. I can easily open random files not associated with my project and VSCode does the right thing (usually). It opens images easily, renders markdown well, etc. my favorite feature is that you can pipe cli output directly to VSCode in the shell and then it opens a tab displaying that output. You'd be so surprised how often that feature comes in handy.
- mixmastamyk 2y agoNice try, microsoft. There’s way too many floss options to bother with surveillance capitalism tools and lock-in/e³.
- syndicatedjelly 2y ago> Vim is great but I think VSCode really is the one tool to rule them all going forward. I really hope you’re wrong about that. I don’t want to be ruled by another Microsoft product
- ironman1478 2y agoI mean, nothing stops you from not using it. It's just a really well designed piece of software and it does a good job of getting out the way something a lot of IDEs don't do well (visual studio for example).
- andreasha 2y ago>pipe cli output directly to VSCode in the shell and then it opens a tab displaying that output Example from VSCode Terminal: $ echo hello | code -
- tauwauwau 2y agoI don't even know what to say to this other than that you are right that it does sound stupid and it is stupid. A software developer should not be afraid of learning software, learning new things is fundamental in our work. Comparing an IDE with basic editor like vi, really, that may have worked out for you since you started 20 years ago when that worked, but it should not be the advice today.
- erik_seaberg 2y agoI learn new tools and platforms all the time, but editing needs muscle memory and I don't want to abandon that every five years for the new hotness. IDEA is just starting to show some longevity for Scala and Kotlin.
- xigoi 2y agoMainly, a seftware developer should not be afraid of creating neW tools to solve their own specific problems. Programmable editors like Vim allow you to do that, proprietary corporate IDEs do not.
- bramhaag 2y agoAs someone who programs Java daily and uses Neovim daily, I don't think I could be any less productive than when programming with Java in nvim. Some features that I do not have in nvim, but use daily in IntelliJ: Run configurations, proper debugger, SQL integration, hot reloading, and most importantly everything just working OOTB (auto complete, snippets, docs, ...). Can (n)vim do these things? Probably, but it'd take me days or even weeks to get it configured to the point where it's as seamless as IntelliJ. I do use the IdeaVim plugin, so not all of my muscle memory is wasted.
- sagarm 2y agoJava is really unpleasant to program in without IntelliJ IMO. I strongly prefer NVim for Python and C++, but still use IntelliJ for anything non-trivial in Java.
- sitzkrieg 2y agoone thing missed is intellij can cross-complete over several domains, like correctly showing tables in a sql statement in a java string in your project, if you also have the database added, etc. ive never seen any vim-with-plugins setup come close to this
- bastardoperator 2y agoThe best is when you open vim/nvchad in vscode terminal.
- yapyap 2y agoor, if you’re feeling spicy go for Doom Emacs
- closeparen 2y agoIn college I used exclusively plain text editors, and like 80% of my edit-compile-run cycles were wasted on noise like symbol names and the ordering of positional arguments. When I got into professional life and started using JetBrains IDEs, I felt like I was flying.
- jaredklewis 2y agoI was a heavy Emacs user for just short of 10 years. I don't use it now because I am more productive with JetBrains IDEs. Your advice seems too rigid and dogmatic to me. Just posting to balance things out for any entry level SWEs reading.
- Apofis 2y agoI'm one of those people that doesn't like polluting his brain with a ton of keyboard shortcuts and likes clicking with a mouse on stuff and is just more efficient with it. I've seen video clips of "efficient" terminal text editor use, and while it looks cool in a hacker way, it just isn't any faster than what I do without all of the overhead of memorizing a ton of keyboard shortcuts and editor commands. I would definitely much rather install VSCode or an IntelliJ product on a Jr's machine, show them how to setup their terminal, get their dev environment setup, how to run and debug the app, and off they go. Edit code. Run code. Debug code. Rinse repeat. Much more reasonable and preferable to having them spend months learning Emacs. Let's remember, they likely don't know how to use the terminal either these days.
- toprerules 2y ago> Let's remember, they likely don't know how to use the terminal either these days. Which is a huge issue. If all you know how to do is crank up a GUI and write code, you are easily replaceable in a world where the demand for SWEs has gone way down. The best thing I ever did in my career is invest in learning how things actually work. Learning how something like Vim works is just a litmus test for absorbing and applying information quickly. Vim is just one in hundreds of tools I've learned how to use and string together.
- pxc 2y ago> I've seen video clips of "efficient" terminal text editor use, and while it looks cool in a hacker way, it just isn't any faster than what I do without all of the overhead of memorizing a ton of keyboard shortcuts and editor commands. Would that still be true if the ordering of your menus (and the items within, recursively) were randomly shuffled each day, and which side submenus opened on were also randomized? How about if the speed of your mouse or mouse acceleration behaviors varied? I think you may be discounting memorization which benefits your workflow because that memorization is spatial rather than symbolic. Perhaps there's an argument to be made that such memorization is more natural, gradual, or easy, but there's definitely memorization involved in mousing around with any degree of efficiency or speed.
- theanonymousone 2y agoSticking with something "for your whole career" is a very bold advice that must be taken with appropriate caution. No?