I switched to Vim – and it took me only 6 years to learn it(emanuelcepoi.com)
emanuelcepoi.com
I switched to Vim – and it took me only 6 years to learn it
https://emanuelcepoi.com/preview/66785dd2d3170dd0332a47d9
66 comments
This. I have loved and used Vim since I was 18 years old, but I did because I fell in love with the tool right away and felt right using it, not because it was "cool" or whatever.
I tried other editors, it didn't feel right, I didn't force myself to continue using them. My advice if you're trying vim is the same... if it doesn't feel right, if it doesn't feel like the tool works for you, look somewhere else.
I tried other editors, it didn't feel right, I didn't force myself to continue using them. My advice if you're trying vim is the same... if it doesn't feel right, if it doesn't feel like the tool works for you, look somewhere else.
As a developer, I've long tended to leaning into the tech, to figuring out how to script & control my world. (It's been a strong distinction versus a lot of folks I see much more interested in getting through the mission at hand at express a pace or a directly a path as possible).
I'm not a great vim user by any means, but it feels comfortable & nice for me at this point. Vim is forever part of the virtuous cycle, forever letting you mix this idea for doing something with that technique. It fits my mentality fantastically well. Computers rarely have suchnfantadtically well equipped sandboxed, and even more rarely is software so module & flexible, so readily recombineable.
And I just absolutely adore being in a world where anything can be scripted, where every single ounce of power I get compounds with and works with every other bit of power I've accrued. Where everything fits together, and is useable on the fly, or usable when trying to do more elaborate crafting.
One little recommendation I would have given my old self, expand the power domain. I was a little slow to really get into scripting. VimScript was kind of ok but also for me personally kind of ass, but I should have leaned in more. Now a days NeoVim has excellent Lua support built in which is great, and I really really really love Denops which lets me use a lot more tools and libraries and ecosystem that I know & that are more mainstream (JavaScript). https://github.com/vim-denops/denops.vim
This is totally off topic, but the one thing that's not in any way at all modular or composeable is that vim assumes there's only one screen, only one output. It's been almost a decade since Tarruda blogged the idea of Smart UI where multiple apps could effectively start sharing a headless neovim, where there could be multiple different terminals at once, but there's been (afaik) no progress decoupling the core of vim from rendering into one and only one screen, which is my transcendent vim dream to expand beyond. https://tarruda.github.io/articles/neovim-smart-ui-protocol/
I'm not a great vim user by any means, but it feels comfortable & nice for me at this point. Vim is forever part of the virtuous cycle, forever letting you mix this idea for doing something with that technique. It fits my mentality fantastically well. Computers rarely have suchnfantadtically well equipped sandboxed, and even more rarely is software so module & flexible, so readily recombineable.
And I just absolutely adore being in a world where anything can be scripted, where every single ounce of power I get compounds with and works with every other bit of power I've accrued. Where everything fits together, and is useable on the fly, or usable when trying to do more elaborate crafting.
One little recommendation I would have given my old self, expand the power domain. I was a little slow to really get into scripting. VimScript was kind of ok but also for me personally kind of ass, but I should have leaned in more. Now a days NeoVim has excellent Lua support built in which is great, and I really really really love Denops which lets me use a lot more tools and libraries and ecosystem that I know & that are more mainstream (JavaScript). https://github.com/vim-denops/denops.vim
This is totally off topic, but the one thing that's not in any way at all modular or composeable is that vim assumes there's only one screen, only one output. It's been almost a decade since Tarruda blogged the idea of Smart UI where multiple apps could effectively start sharing a headless neovim, where there could be multiple different terminals at once, but there's been (afaik) no progress decoupling the core of vim from rendering into one and only one screen, which is my transcendent vim dream to expand beyond. https://tarruda.github.io/articles/neovim-smart-ui-protocol/
Only problem is that vim doesn't work with LSP. It is a broken tool.
Easy check proving absolutely that it is broken:
1. Create a new wails project with `wails init -n myproject -t svelte-ts` 2. Create a svelte file and use a function defined in app.go 3. Run `wails dev` to compile and run the app 4. Delete the function from app.go
Result: The svelte file which imports the function generated from app.go doesn't show any errors even thought the function doesn't exist anymore.
So use VS Code or Sublime which actually work with LSP without issues.
Don't use broken tools for your work.
Easy check proving absolutely that it is broken:
1. Create a new wails project with `wails init -n myproject -t svelte-ts` 2. Create a svelte file and use a function defined in app.go 3. Run `wails dev` to compile and run the app 4. Delete the function from app.go
Result: The svelte file which imports the function generated from app.go doesn't show any errors even thought the function doesn't exist anymore.
So use VS Code or Sublime which actually work with LSP without issues.
Don't use broken tools for your work.
It sounds like something broken with this specific workflow. I use LSP features in typescript and python daily without issue.
Don't use a tool that's broken for your work. There are plenty of bugs in other editors
Don't use a tool that's broken for your work. There are plenty of bugs in other editors
VS Code has no bug which is not also in Neovim. So VS Code is the best of the lot.
Bugs are not the only thing that matters. VSCode is way slower than (Neo)Vim, uses more memory, contains proprietary parts and lacks many of (Neo)Vim’s features.
Strangely, I've noticed mixed opinions from developers about whether learning vim is a productivity boost. Some people believe it is while others disagree.
I'll admit my FOMO was what originally got me to start learning vim. I still barely know the basic motions but I'm starting to think it could lead to a productivity boost once I get over the learning curve.
I'll admit my FOMO was what originally got me to start learning vim. I still barely know the basic motions but I'm starting to think it could lead to a productivity boost once I get over the learning curve.
The productivity boost is highly subjective, it depends a lot on your work. Do you edit files a lot or spend more time thinking ? Do you use some graphical tools on the side that forces you to grab your mouse anyways ? With AI tools now, where you can now basically select a file and prompt "rewrite all in snake_case" in VSCode it's becoming even less evident. I think the biggest gain from vim is simply if you're more happy using it or not.
> The productivity boost is highly subjective
There is a quote from Apple UX designers/engineers about testing the keyboard vs mouse for doing stuff in the OS.
Apparently the test subject always reported that they keyboard-driven controls were faster, but the timing measurements showed that mouse were faster.
Chances are the keyboard feels faster, rather than being actually faster.
I'll add another point of view I developed while observing many LaTeX vs Word or Excel vs SomeObscureCoolThing(tm) threads: people will happily waster thousands of hours over many years to learn vim/emacs/LaTeX/SomeObscureCoolThing but will plain refuse to spend 20-200 hours (again, over many years) to properly learn how to use Jetbrains' stuff (IntelliJ etc) or Word/Excel/PowerPoint (or the LibreOffice equivalent) or some other mainstream tool.
I've seen countless time web-apps being developed in months that could have been an excel sheet developed in a week. People wasting weeks on their documents because after a software update LyX would not open the documents anymore. People (particularly in university) being super-stressed, wasting precious time and occasionally missing deadlines because they waster too much time fighting LaTeX to align tables or images because they refused to properly learn how to use Word (or the LibreOffice's equivalent, writer).
And don't even get me started on the plumbing of various tools together. Most vim/emacs user (and I say this as an emacs user) can only integrate other tools as long as there is some copy-paste-ready code, but they can't go much further.
So... Yeah productivity boost is incredibly subjective. And chances are it's also fake.
It's not too much of a big deal (meh) but I'm annoyed by the fact that all this isn't even acknowledged.
There is a quote from Apple UX designers/engineers about testing the keyboard vs mouse for doing stuff in the OS.
Apparently the test subject always reported that they keyboard-driven controls were faster, but the timing measurements showed that mouse were faster.
Chances are the keyboard feels faster, rather than being actually faster.
I'll add another point of view I developed while observing many LaTeX vs Word or Excel vs SomeObscureCoolThing(tm) threads: people will happily waster thousands of hours over many years to learn vim/emacs/LaTeX/SomeObscureCoolThing but will plain refuse to spend 20-200 hours (again, over many years) to properly learn how to use Jetbrains' stuff (IntelliJ etc) or Word/Excel/PowerPoint (or the LibreOffice equivalent) or some other mainstream tool.
I've seen countless time web-apps being developed in months that could have been an excel sheet developed in a week. People wasting weeks on their documents because after a software update LyX would not open the documents anymore. People (particularly in university) being super-stressed, wasting precious time and occasionally missing deadlines because they waster too much time fighting LaTeX to align tables or images because they refused to properly learn how to use Word (or the LibreOffice's equivalent, writer).
And don't even get me started on the plumbing of various tools together. Most vim/emacs user (and I say this as an emacs user) can only integrate other tools as long as there is some copy-paste-ready code, but they can't go much further.
So... Yeah productivity boost is incredibly subjective. And chances are it's also fake.
It's not too much of a big deal (meh) but I'm annoyed by the fact that all this isn't even acknowledged.
Maybe it comes back to the feeling of fun mentioned by GP? I also enjoy working with Vim, while LibreOffice Writer is clunky and Word is not much better (though I have no love for LaTeX). I could make a spreadsheet in under an hour, but if it'll make me feel like I'm hacking together something buggy in an inadequate tool, I'd rather spend more time making a web app or a Python script.
Likewise, mandating a file per each class in Java is no big deal on the surface, but having to create and juggle so many files for small classes feels terrible to me, so a seemingly small detail turns me off the language.
I think we should examime these feelings, because they ultimately drive (some part of) our behaviour, and I'd guess they're not just random preferences but are rationalisable.
Likewise, mandating a file per each class in Java is no big deal on the surface, but having to create and juggle so many files for small classes feels terrible to me, so a seemingly small detail turns me off the language.
I think we should examime these feelings, because they ultimately drive (some part of) our behaviour, and I'd guess they're not just random preferences but are rationalisable.
> I could make a spreadsheet in under an hour, but if it'll make me feel like I'm hacking together something buggy in an inadequate tool, I'd rather spend more time making a web app or a Python script.
Congrats you missed the point entirely and provided me with a perfect example case:
Have you ever spent a considerable amount of time learning Excel, the very same way you did for python?
It’s very likely that excel is perfectly adequate and not buggy at all, you’re just and ignorant (in Excel) and can’t go further than “hacking a spreadsheet together”.
So, have you spent time properly learning other tools or are you one of those everything-expect-what-i-like-sucks ?
Congrats you missed the point entirely and provided me with a perfect example case:
Have you ever spent a considerable amount of time learning Excel, the very same way you did for python?
It’s very likely that excel is perfectly adequate and not buggy at all, you’re just and ignorant (in Excel) and can’t go further than “hacking a spreadsheet together”.
So, have you spent time properly learning other tools or are you one of those everything-expect-what-i-like-sucks ?
The whole "data and (hidden) code mixed in a seemingly-infinite matrix" concept offends my engineering sensibilities. It's not about bugs in Excel, it's about the bugs my spreadsheets will have since I forgot to fill in that one cell, overran the area used by some formula elsewhere, didn't set the format correctly, so visually all looks good but it breaks a sum...
To get back to my point, working with spreadsheets feels bad (from my experience) because I have to juggle all the things mentioned above. In my favourite programming environments, mistakes of this sort are generally directly evident in the form of errors.
If I had more spreadsheet experience, I would get better at avoiding these mistakes. But I choose to use Python, where they are handled by design.
To get back to my point, working with spreadsheets feels bad (from my experience) because I have to juggle all the things mentioned above. In my favourite programming environments, mistakes of this sort are generally directly evident in the form of errors.
If I had more spreadsheet experience, I would get better at avoiding these mistakes. But I choose to use Python, where they are handled by design.
It was a comparison between keyboard shortcuts and quick access bar, on a graphical tool.
And anyone who has ever played MMO or RTS games will know that early on, quickbar are faster and more precise than shortcuts, but later on clearly, no one mouse-click if they want to stay competitive.
And anyone who has ever played MMO or RTS games will know that early on, quickbar are faster and more precise than shortcuts, but later on clearly, no one mouse-click if they want to stay competitive.
The real productivity boost happens when you become fluent and it feels like a second language that describes actions on text objects. At this point I can do most things as fast as I can think what needs to be done. It's like being bilingual.
I would say that it’s important to learn and use the vim basics, because you can generally login to any linux server or mac and edit a text file quickly and efficiently, but I would not spend too much time beyond that unless you really love it.
I tried to get all-in on Neovim, but unfortunately VSCode is just too powerful now, and too convenient. I like their defaults, I'm used to their shortcuts, you can customize it easily (extensions, tasks with custom parsing of the output for example). You can even connect through remote machines with it. And you can use it in a browser. At this point it's more ubiquitous than Neovim.
VSCode has a really great neovim-plugin that I'm currently using. Best of both worlds: https://marketplace.visualstudio.com/items?itemName=asvetlia...
Yup and also it has complete features for LSP.
Nvim doesn't support all LSP features such as anchor links in hover documentation. Looking at you rust analyzer LSP.
Nvim doesn't support all LSP features such as anchor links in hover documentation. Looking at you rust analyzer LSP.
Interview with a VIM Enthusiast: https://www.youtube.com/watch?v=9n1dtmzqnCU
> Do you know how much faster Vim was ? 4.3 seconds ! 4.3 I save every day ! All those months learning were totally worth it..
> We don't need Neuralink... We already have Vim.
This guy is so funny !
> We don't need Neuralink... We already have Vim.
This guy is so funny !
I can write text files in VIM and run code in virtual environments in Linux terminal (whether via VIM or separately). There is syntax highlighting, and plugins if needed. Old school, run code in terminal.
What do I gain by instead using VSCode (or any other IDE)?
I tried it, and it looks complicated, with a lot of keyboard shortcuts. At the end, it requires going through the same steps of creating virtual environments, dropping to terminal if needed, etc.
I’m not a programmer.
What do I gain by instead using VSCode (or any other IDE)?
I tried it, and it looks complicated, with a lot of keyboard shortcuts. At the end, it requires going through the same steps of creating virtual environments, dropping to terminal if needed, etc.
I’m not a programmer.
I think the author is writing JavaScript which certainly helps. Some languages just have terrible support in Vim. C# was okay-ish, Java was annoying, Kotlin is almost non-existent. As soon as you either want tests or debuggers more integrated into your editor, it gets difficult even if the language is not very IDE driven.
But I used neovim for a year at work. I write Python. I can totally see how you can live in neovim for languages like this. But I missed a proper test explorer and debugger though.
I don't think I'd go back to VSCode though. Either JetBrains or neovim. VSCode is in that awful middle ground spot where it's great if you are tying together tools and extensions anyway but if your whole suite of tools is supported in JetBrains products, I'd rather use those. Or use the tools on the command line and stick to neovim.
But I used neovim for a year at work. I write Python. I can totally see how you can live in neovim for languages like this. But I missed a proper test explorer and debugger though.
I don't think I'd go back to VSCode though. Either JetBrains or neovim. VSCode is in that awful middle ground spot where it's great if you are tying together tools and extensions anyway but if your whole suite of tools is supported in JetBrains products, I'd rather use those. Or use the tools on the command line and stick to neovim.
I'm a user of JetBrains IDEs for the last couple of years, and I'm using the IdeaVim plugin on and off. Maybe you would like it ?
[deleted]
VS Code is what everyone develops for. For example when using Rust, VS Code will link to documentation in the hover popup. But nvim cannot do that. Just one small example.
Nvm with the CoC plugin might actually do that. I have that for golang from the CoC plug-in.
What do you mean by link? If I hover a Go type, the pkg.go.dev link is at the hover window which I can open with the default `gx`. I guess VS Code will inline the contents of the link?
Starting with just the motions in Vim is a good start if you want to take the time to learn Vim. It gets you used to modal editing without going too deeply into it.
That said, the article focuses too much on the fact that using Vim makes you look cool rather it being a good tool overall. Sure, quick and precise navigation is a good benefit of using Vim, and it is superficially impressive at first glance, but the real power of Vim comes from its terse command language, which is something the article does not mention. There are so many tasks that I can easily do in Vim that would take minutes to hours in other editors, and it is all due to the command language. I guess my point is that Vim doesn't just look cool and there's more going on than what you superficially observe looking at somebody else's screen.
That said, the article focuses too much on the fact that using Vim makes you look cool rather it being a good tool overall. Sure, quick and precise navigation is a good benefit of using Vim, and it is superficially impressive at first glance, but the real power of Vim comes from its terse command language, which is something the article does not mention. There are so many tasks that I can easily do in Vim that would take minutes to hours in other editors, and it is all due to the command language. I guess my point is that Vim doesn't just look cool and there's more going on than what you superficially observe looking at somebody else's screen.
I was vim for more than 10 years. I have now switched to VS Code with the Vim extension. I get to keep my Vim motions and gain the ecosystem of VC Code.
Being able to view images, read pdfs, and have html based components from extensions is really nice, as is intermixing terminal tabs with code tabs.
Being able to view images, read pdfs, and have html based components from extensions is really nice, as is intermixing terminal tabs with code tabs.
Interesting experience. For me, vim (and a pure terminal-based workflow) is my “comfort food” for those days I really need to focus or have gone through an issue and require taking care of myself. Then I will only use vim eg for coding Python or Rust, lynx for browsing etc. I’m not good at all with traditional cli commands so I keep another terminal tab with the ollama cli running codellama and off I go.
What is the ollama cLi, like a shell wrapper or something?
I use Vim mode in sublime/zed and I love it. But not for productivity reasons. It's just... Interesting. And somehow cool. And I like learning new things.
In a way it's a meta-game that makes writing code more fun for me.
I simply don't think that the bottleneck for doing my job is how quickly I move the cursor around a document. Or that it makes me write better code in any way.
I simply don't think that the bottleneck for doing my job is how quickly I move the cursor around a document. Or that it makes me write better code in any way.
I delayed learning vim because I couldn't close the program, really.
And because it made no sense to me to have a modal editor.
Now I use vim mode everywhere is available, also in Google Colab and in Firefox.
At the beginning, you people shouldn't waste too much time editing vimrc. I admit that some plugins are exceptional, like startify, markdown, vim plug etc
And because it made no sense to me to have a modal editor.
Now I use vim mode everywhere is available, also in Google Colab and in Firefox.
At the beginning, you people shouldn't waste too much time editing vimrc. I admit that some plugins are exceptional, like startify, markdown, vim plug etc
The payoffs don't really seem worth the effort here in my case. Most of my time at work is spent thinking or talking, not typing. And plenty of that typing isn't code: logsearching, Jiras, planning docs. I think this is true for at least a lot of SWEs not building things from scratch.
I’m a fan of trying to write as much as possible in vim. For instance the GitHub cLi allows pretty much all GitHub writing to happen locally in my terminal.
Wish I could write google docs in vim, or for google docs to have a good markdown import/export so there could be a bidirectional pathway to producing them in the terminal.
Wish I could write google docs in vim, or for google docs to have a good markdown import/export so there could be a bidirectional pathway to producing them in the terminal.
The lure and convenience of modern IDEs is too much to let that happen at least in my case.
The trouble here is that even though the productivity will eventually increase, the learning curve will take too much of a tool. Yet I'm determined to give vim a solid chance soon once my current projects are over.
The trouble here is that even though the productivity will eventually increase, the learning curve will take too much of a tool. Yet I'm determined to give vim a solid chance soon once my current projects are over.
You could try getting familiar with the basics of vim and then continue using your IDE.
This is how I use vim. It’s great for quick edits and ssh boxes but I’m not a fan of maintaining all the plugins and settings manually so I have a barebones vim setup.
This is how I use vim. It’s great for quick edits and ssh boxes but I’m not a fan of maintaining all the plugins and settings manually so I have a barebones vim setup.
Same happens to Emacs. The complexity of Emacs is grossly exaggerated.
You can get around with relatively little know-how. The problem is that knowing what you need to know is not easy.
Most tutorials, including the official one, focus too much on details and too little on concepts to get you bootstrapped.
You can get around with relatively little know-how. The problem is that knowing what you need to know is not easy.
Most tutorials, including the official one, focus too much on details and too little on concepts to get you bootstrapped.
This!
I don't need to turn vim into an IDE, and nor do I want to. However VIM is an amazing tool that's worth learning on its own merit. It's the text editor that's everywhere you need it to be, and I have never had an admin say "NO" to adding it into a box or environment to work/test.
I don't need to turn vim into an IDE, and nor do I want to. However VIM is an amazing tool that's worth learning on its own merit. It's the text editor that's everywhere you need it to be, and I have never had an admin say "NO" to adding it into a box or environment to work/test.
You know what's also great for quick edits and ssh boxes? Nano. No learning curve and it's perfectly cromulent.
Just install the keybindings. Then you can use those on any IDE on any OS forever. And Vim, of course. :)
I started using emacs about 8 years ago. Every 6 months or so, I spend 10 minutes learning a new feature and curse myself for not learning it 25 years ago.
Think of learning emacs features as catching pokemon. You must catch a few hundred before you think of slowing down. Else you easily stall in a limbo of "good enough".
I'm definitely in the good enough local minimum, I think it's just because I'm older now and futzing with configs doesn't excite me as much as it used to as a younger man. I do love the stability and wide coverage of all my needs though, I never need another text editor in my life.
I was in the same boat as I mentioned in the article, have you thought about trying a vim plugin for the current IDE you're using?
I think every coder starts off wanting to be one of the "cool kids", but then later matures into a "what works for me" rhythm - similar to a high school vs. college experience. The vi/vim/emacs drama just feels like high school to me.
There is no vi/emacs drama. Everyone's largely nice to each other.
Yes, a joke. Maybe some people got hotheaded about it -- in 1980.
It's noticeably more of a joke than using tabs vs spaces vs null bytes for indentation. That has some legitimate arguments in a few directions, even if there is only one reasonable choice: null bytes assure everyone that you're not secretly writing C code, and they have no visual representation so you're free to display the code any way you like.
Not everyone gets that it's a joke of course, but they're probably government bird operators and you are free to just nod and quietly back away.
Not everyone gets that it's a joke of course, but they're probably government bird operators and you are free to just nod and quietly back away.
Interesting perspective. It did start off for me as trying to be a "cool kid" indeed, but once I I realized how much better vim motions are I just couldn't go back. It just feels natular, I'm not sure how to explain it but it's really satisfying in a unique way. Heck, I'm even writing this comment with vim motions using a chrome plugin.
> By asking around, I discovered he was using vim
Now I would just give ChatGPT a screenshot and have it describe what’s being used on screen
Now I would just give ChatGPT a screenshot and have it describe what’s being used on screen
it takes about a day to learn how to start and about a week to achieve the speed you had before, after that its just gains
Maybe a bit more than that. I'd say a week to start and about one or two months to achieve the previous speed.
given it's a very large and stable piece of tech, that's not bad. Also, after 2 weeks of regular usage you already have the most important pieces in place to get you going, everything else is like a productivity bonus of things you learn as you need more features.
I think a bunch of people were introduced to Vim by Luke Smith, Geohotz and primeagen around 5 years ago. I wanted to be one of the cool guys using Vim but it took a while to admit it that except for Vim keybindings Vim wasn't doing much for me. Vim is less of an editor and more of a system and I struggled to adopt Vim completely or introduce Vim approach to other systems. If I need to write a document in word or google docs and colloborate with other people Vim keybindings was a distraction. I have to write the content in Vim and then transfer it to docs. Vim makes editing documents difficult. It is not friendly to people who make constant typos as character traversal is not part of it's design. Vim appeals to a very niche group of people who are working on a personalized environment and are comfortable with the idea of daily struggle for the promise of progressive productivity. Vim people are different kind of people.
After trying out every text editor out there, I think sublime text (vintage mode enabled), VS code (with Vim plugin) and liteXL are the generally useful editors and provides a better user experience then vim and terminal based Vim variants. Even though I do not use Vim, my hot take is that if you are installing Vim plugins from the get-go you are missing the point Vim. Vim is not like the GUI editors and you should not attempt making it that way. That defeats the purpose of Vim and makes using vim more like an agenda.
After trying out every text editor out there, I think sublime text (vintage mode enabled), VS code (with Vim plugin) and liteXL are the generally useful editors and provides a better user experience then vim and terminal based Vim variants. Even though I do not use Vim, my hot take is that if you are installing Vim plugins from the get-go you are missing the point Vim. Vim is not like the GUI editors and you should not attempt making it that way. That defeats the purpose of Vim and makes using vim more like an agenda.
Now if you’re anything like me, in 6 more years you’ll decide to try eMacs, and in 16 years you’ll still be putting off committing to it.
[deleted]
[deleted]
I love vim, not because of some huge speedup, but because it just feels good. It's like being in a workshop where all the tools are in just the right spot. I figure if I'm going to spend 8 hours a day coding I want it to feel really nice. And it does.