Very true, he's a master. I've switched to neovim about 2 years ago and it was a process to get used to it but now I couldn't go back. So much so that when building a custom keyboard I install a custom firmware that is inspired by neovim: my arrow keys are hjkl system wide and I also use YXP instead of the usual copy/cut/paste. But I can also understand that investing for switching to a different editor is not in everybody taste.
When I saw the headline with Vim, I was so sure you have watched ThePrimeagen's videos... Did you noticed, that Vim is BLAZINGLY FAST? No? Neither do I :-)
Very fun video. I'm a Vim user for 10+ years and have tried switching to VSCode, but with the exact same arguments I gave up, and returned to Vim to get my job done. 🙂
@@casperes0912True, and other editors like Atom also has Vim mode or Vim bindings. But there is always something that's not exactly as I'm used to and If I just turn the other editors into Vim then I don't know why I'm switching anymore. There are also a ton of extensions to Vim to give it functionalities like VSCode, Sublime or Atom. I have more or less just accepted that it's not really worth the effort (or I'm too old to learn a new editor). 🙂
@@casperes0912 it's never really the same thing, you can't modify VSCode to the core, so it's impossible to replicate the same workflow from vim. I also tried multiple times to go back in the past, but am now happy and muuuch more productive with vim.
vim user here for 25+ years. I really feel for you, man. Why on earth do you want to subject yourself to this steep learning curve? It would be months before you get to the same productivity level as you are now. AND, BEWARE! If you do persist and vim commands become engrained into your muscle memory, there is no turning back! You won't be able to use another editor unless it provides vi-like key bindings. I know I do. I have installed Ideavim in Intellij/Android Studio and enabled Vim Mode in Xcode, otherwise they are completely unusable to me. And of course when other people see me editing files using just the letter keys, they think I perform magic. But as I said, 25+ years. My advice to them, and to you, is simply "don't". Or do, but you have been warned...
As a person that uses vim pretty much exclusively for development, I’ll say it is definitely an extremely steep learning curve, 5 years of vim and I’m still learning new features. That being said, once you’ve mastered it, there really is nothing that competes. When you add tmux into the equation, you can’t be stopped. To answer your question about why not use arrow keys, it’s because you have to move your hand, loss of efficiency, definitely took me a couple years to get used to. I think what a lot of people don’t realize though is the super powerful search/replace and copy/paste capabilities between files. There are also tons of plugins that add a lot of features, and most importantly it is super helpful for headless development. It’s powerful and fast whether you are on a MacBook, a raspberry pi, or even another system on a super slow connection. That being said, if you are developing front end stuff, it’s probably not super useful. If you are developing C#, visual studio is definitely the best option since the intelligence can nearly write the code for you. However, if you are doing embedded development and you know how to use a keyboard, then vim is definitely something worth taking the time to learn.
the og vi can be traced back to ED a single line editor. the hjkl keys are part of that history and the hardware that was available back then. nowadays with relative line numbers and the f key I rarely use arrow keys.
*_"That being said, once you’ve mastered it, there really is nothing that competes."_* I'm very skeptical of that. I've watched quite a few videos of Vim, trying to figure out what is it that Vim does so much better than other editors, but so far all I could find was people overselling features that also exist in Sublime, or things that Sublime can do just as easily, or in many cases even easier. Probably VSCode can do all of it as easily as well. A lot of things people say about Vim are myths, too. The notions that using the arrows or the mouse affects productivity are myths. The majority of work time is not spent typing text, but thinking, reading, etc, so at the end of the day whatever microscopic advantage you may get for not using arrows or mouse, or from using feature X or Y, that won't matter at all. That is if there's any advantage at all. In other editors you also gain time for using shortcut keys instead of typing colon->command. Clicking something might also be faster in many cases. And it doesn't take months or years of getting used to. (I do a lot of typos, so, personally, using commands is a nightmare to begin with.) *_"That being said, if you are developing front end stuff, it’s probably not super useful."_* Indeed that's what I've started suspecting, that Vim is only useful in specific situations for certain people. But most people who talk about it don't seem to realize that.
Interestingly I recently switched from VSCode to VIM/NeoVIM. It takes time and patience to get productive in VIM but once you master it.... man, you can flyyy! Sorry it didn't work for you. Cheers!
I first tried vim in February. I hated it and went back to vscode. But then 3 months ago i realised that i had created so many shortcuts for my vscode, and i wondered if there ways a better way. So at the beginning of this month, i started using vim (neovim) It was a very steep learning curve and a lot of things to configure. But i now can't work without it. I can go for 3 to 4 hours without touching my mouse once.
Recently started using VIM. Definitely took some pain but getting faster by the day. noticed whenever i had to use a IDE for work, i started accidently using VIM keybinds, so i feel like its improving.
@@nihancj unfortunately... nowhere 😂 i need to somehow integrate things like this in my daily tasks, else i will eventually start forgetting to use it... i'm weak
Thanks, Alex. I have to admit I enjoyed watching you suffer. And I admire your stubborn determination. After 40 years of using vi and its descendants, I sometimes forget how baffling it all is to newcomers. For better or worse, hjkl and all the other keystrokes long ago became permanently burnt into my muscle memory. I'm exactly the opposite of you: I get confused by arrow keys. For someone who is a blazingly fast touch typist, learning vim will probably increase their productivity. But, honestly, for most people, it won't be worth the effort. If you're comfortable with vscode, I highly recommend you continue using it. For me, when I first discovered vi in about 1981 or so, it was a huge step up from the line-oriented editors I had previously been using. But there were no such things as GUIs or mice at that time (unless you worked at Xerox PARC). I'm sure if something like vscode had been available, I never would have bothered to learn vi. You have a finite amount of time in your life; invest it carefully.
@@dr.mikeybee I can't say I've been there because I always had vi or emacs available on the Unix machines where I worked in the 90s. But, yeah, I can imagine the horror. I like Ed for small fast jobs and would be very frustrated having to use it only.
I have been working as a backend developer for about 4 years, and I use vim on my day to day work. it didn't happen right away, it happened gradually: from simple commands => combinations of commands => custom keybindings => custom vimrc settings => plugins => custom plugins it sure does have a steep learning curve, I remembered I had to reference a vim cheatsheet all the time and work progression that day is like 10% (had to switch back to vscode to get some things done) but after investing time learning, coding feels like a game and is just, fun. besides that, it had lots of pros too: 1. vim keybinding are used in a lot of cli tools: less, more, w3m, git (diff|show|log --oneline), bash vi mode, tmux, etc... 2. you will get better at the command line (filters, use code to write code, which is also fun and efficient) 3. no extra gui programs to install, better performance (no gui eating up your ram) 4. it's been around for like 30+ years (stable), don't have to worry about being "sunset" and forced to learn a new editor (you know, like "Atom", how do you know vscode won't be the next Atom?) 5. it's just cool so why not? learn vim😎
I've been there before, tried multiple times to learn Vim before but couldn't stick with it, until recently. I got tired of having to move my hands all the time to reach the arrow keys on my keyboard and decided that it was time to finally give it a real try. It was weird at first but by allowing myself to slowly learn bit by bit and making adjustments as I go, I finally managed to be able to use it daily, with the plugin for VSCode. Which like you said, gives you the best of both worlds, the GUI from VSCode and the movement from Vim.
Great video! I love that you gave it a chance and thought you were extremely fair. I enjoy using Neovim when I can. I am not realistically able to use it for work due to the projects I worn on, so I have the vim extensions installed in both Visual Studio and VS Code. This works pretty well for me since I am still able to use most of the things I like about vim even if they are a bit sluggish.
Im a DevOps engineer and im using both vim and VScode. VScode is nice to work on projects. And vim is great to edit one-two files in terminal, especially on a remote computer.
Nice video! I have done the vimtutor followed by Drew Niels Practical Vim Once you get used to doing things the vim way, everything else feels more awkward than your ear scratching analogy You have to invest time to learn how to use the tool, but just like a chef chopping an onion without even looking, Vim enables you to do precise cuts of text just by thinking about them. Sure you could chop an onion a million ways, but the most efficient one takes upfront investment to learn the proper tools.
Vimtutor followed by Drew Neils book is the route I would recommend to someone starting out, too! The book is excellent. You can dip into it and learn a few tips every day, it only takes a few months to build up a really good knowledge.
I've been using only Vim for text editing since October 2019. I started by forcing myself to use it. I read a few blogs and seen a few videos to get started. To this day, I have to admit I still use the arrow keys for navigation. But, once I knew how to get into Insert Mode and out of it, it was like using NotePad. From then on, I started to learn the motions and the different keys used in Normal Mode. Someone even said that learning Vim is like learning a musical instrument. You get better every day. I don't have to move my right hand all the way to the mouse for editing text. After getting used to the Vim way of doing things, I immediately installed Vimium; a plugin for Chromium-like browsers that uses the keyboard and has Vim-like motions to move around the browser. Finally, I try to install a Vim plugin everywhere! I hope you give Vim another try!
A key point: Vim is not a binary "you either fail or enjoy" thing. When I first got vim introduced / saw from a friend at university. I remember I tried it, he kept saying all good things about it and ended up like you here - thinking "okay just lets use some editor or IDE and get work done"... But guess what? Years later somewhere it was stuck in my mind "it would be great if I learn this properly" and was on a project where heavy text manipulation and non-trivial refactors were a thing. First started using vim in that space, then because I was already on linux anyways, then I installed it in every IDE as a plugin, then I don't even want to use IDE anymore just text editor and terminal and much more productive.
In university labs we had to telnet into Linux sever and do everything in cli and vim. Only programming in c or cpp. The black screens laid my foundation and now I appreciate visual studio a lot more. But if someday doom comes and a terminal is all I have , I will survive 😂
As a 10+ years Vim user I can say this was hard to watch, and it pretty much is an exact replica of me 10+ years ago wondering what was going on. Vim does really require some prior research to understand some of the concepts of modal editing before getting into it. That said, I couldn't imagine myself not using Vim nowadays, it's like an extension of my hands at this point.
VIM is installed if you open the terminal... Vi was great 30 years ago back when everyone used Elm for email... there are much easier options today. But I LOVE this video :)
Vi (or vim) is not supposed to be a substitute of a full IDE environment like vscode. But it is a very powerful text editor that is always available on a *nix machine, no matter how you've connected on it, regardless of being on a gui or a terminal mode. It has endless capabilities hidden in those shortcuts, however its true power is that it is always there when you need to edit a configuration file or change something on the OS and you can always run it even if you have only a black and white terminal available.
Use NVim or NeoVim is more cutomizable - you can customise your IDE of choice as code interpreter in it . Vim is also nice . The Primagen is a guru in VIM
I use it occasionally when I'm on a terminal over ssh, I only know the basics so I don't suffer, and I can get simple things done. For anything more complex than simple edits I use vscode over ssh. I've had a friend who could navigate in between files, split the viewport, and actually work efficiently with it, but I like vscode, mouse is not my enemy. I like vim and I respect it, you can easily record and playback macros and all, but I rarely use it.
It was very interesting seeing someone's perspective as a beginner to learn Vim. I think that given maybe a month or two, anyone could code faster with the Vim motions
Tester here. Also forced to work with vim especially on the devops part... On some of our Linux based machines only Vi/vim is available. We don't have anyone to do the devops stuff so it's up to us to maintain everything so.. vim it is. I still feel like I just use basic navigation for editing, and google lots of things for it. Mostly because it's not my absolutely everyday editing tool, my experience is not enough to be a keyboard vim warrior. Also the dev/team manager loves it so no changes in nearest future i guess
Yes, I use Vim. There is one primary reason for me, and that is you can access and edit files though a login session to a remote server. There are secondary reasons like not having to reach for a mouse and access to shell comands. It is a steep learning curve, but it has the powers; stange powers.
"You should be able to work on multiple files" I mean, you can, but you're also talking about a text editor that's been around longer than the advent of cursor keys, which is why the default movement keys are H, J, K & L, and I do use Vim. I relearned it this past Summer after about 20 years here, when I decided to pick up BASH scripting again (same timeframe).
I use Vim (Neovim actually) all the time and I love it. I used Sublime in 2014, switched to Vim in 2018 and stuck there. I've tried atom, Vscode, Brackets, Dreamweaver (sucks), intelliJ, etc. but oh boy. All of them had one problem, and that is SLOWWWWWW at start. And also I believe whatever program makes anyone comfortable he/she should use that.
Same for me, it's a matter of getting work done. I'm sure Vim could make me faster after months of learning, but it's hard to find time to invest that sort of time and slash my productivity a ton for a substantial amount of time. Then again, I felt the same about Typescript vs JS, and now I'd never pick JS over TS for a project again. But I suspect the learning curve there is still way less steep than for learning vim :D
very true. TypeScript still sometimes feels like more work than it has to be, but in the end I’m way happier with the code I write than just pure Javascript.
I decided to learn vim before I even started working. I took the time to do it properly. I just focussed on that for a month. Watched all the tutorials, installed all the plugins I wanted, set up a bunch of custom key binds etc etc. By the time I started my first coding job I was already proficient. I would never be able to invest time like that now that I'm working properly but I'm sure glad that I did it back then. It's probably saved me 20X that time over the years.
I ‘ve started with vim for my ruby projects some 10+ years ago. I switched to Elixir and editor remained the same! All workflows I had with a little config changes remained. It’s not easy to start, but for backend development it is worth
Great on your part to give it a try! I started using VIM 6 months ago and have never looked back. The issue here is that VIM in itself will never provide you the same experience like VS Code out of the box. You will have to create your own config using plugins like coc and tree-sitter for code completion and syntax highlighting (also for file browser). But I understand the sentiment of getting work done since the learning curve is so huge that you will need extra motivation + time to invest in it. If you don't have that now its ok, maybe sometime in the future you can try again. But its a great one time investment 👍
I've been using Vim for 14+, I started when I was at Uni, at that time we didn't have all the plethora of editors that we have today! It's amazing to see so many people using Vim despite how hard is to start using it, it's not very user friendly at all, but if you learn it, you will see the benefits later, It's like start a TH-cam channel, it's hard but you will see the result later! ;)
In the 1980s I worked on Unix systems that only had the ed editor. Then vi was a big step up. Then came vim. So of course I learned all the key combinations. Now if a modern editor doesn't have vim functionality, it's slow going. These days I use VSCode with vim emulation. I'm happy to use vim alone a lot of the time, but VSCode has Copilot, linters, and a debugger which are all amazing.
Back in the day terminals did not have arrow keys. I use vim in VSCode. Saves you a lot of time copying lines, deleting and replacing words, and finding words. Also great to delete lines, undo -re du
Been there…tried vim (because I saw a fellow developer flying across the keyboard developing and angular app). What I learned is…I like VS code…and I am ok with that. To those that use VIM, I salute you…but just because you can does not mean you should 😮
In addition to Alex and TJ below: The reason for "why not the arrow keys" is that vi, the "vi" in "vim" - that is "Vi IMproved" - is from days when you'd use terminals that, you guessed it, does not have arrow keys. So basically, through the history of "vim" (vi -> vim -> neovim, and that there is me starting a religious war) there's a continuum of people already being used to hjkl being "the way". Incidentally, you can see the same in a lot of tiling window managers on Linux and some things like Yabai on Mac. (Fun fact: I don't miss arrow keys - my desktop's keyboard does not have them. So much space saved on my desk! :D ) Further to that, I rarely move around with hjkl directly. Instead, you use combinations. For example, if I want to go to a letter 10 steps to the right, I type 10l. If I want to go five lines down, I type 5j. This is the power when you get used to it: want to delete 4 words? Instead of grabbing the mouse, click-drag, press delete, I just do: d4w. ("Delete 4 Words") Boom, gone. I want to "yank" (copy) 5 lines? V5jy (capital V to select whole line in visual mode, 5 lines, j for down, y for "yank"). Boom, done, I have copied it. If I want to cut them: V5jd (d for delete, but also stores it in "clipboard") I want to delete a whole line? dd Done. So basically, it's not stupid or arbitrary, it's just "very old" in some respects, and completely counter to what a lot of people have grown up expecting in the 46 years since VI was designed. (I'm old enough that command line was default when I started using computers.) On laptops especially, I love this, because I just can't with touchpads. VI (though I use neovim, usually through the lunarvim distribution) lets me work on my code efficiently without having to pack a mouse or give myself RSI through using the touchpads. All the other nice stuff (language server protocols, blah blah etc) are there through plugins - or in my case, just installing lunarvim. I'll not go as far as say "vi/vim/neovim is superior" to Vs Code or whatnot. But _for me_ it is. For most people? No. And if you want a real ride: install the "vim mode" plugins for Firefox so you can navigate websites without your hands ever leaving your keyboard.
The key to using vim is learning a few basic commands at the outset and mastering them before learning another group of commands. 1. How to exit the text editor 2. How to insert text and delete text 3. How to move to the beginning and end of a buffer 4. How to move to the beginning and end of a line, and move forward and backward between "words" 5. How to copy one or more lines and paste those lines elsewhere in the buffer 6. Keep learning based on your requirements, not every command supported by the text editor
I mainly use VS Code for my undergrad work, but I am taking a course right now, Introduction to Systems Programming in UNIX, which requires us to program over ssh onto the school's linux machines and I have to use vim. I dislike it compared to VS Code, but I force myself to use do all my programming for that class through vim.
I love vim. But I sadly often need to switch between editors based on my project requirements. What I've found interesting is that on specific keyboards where I've used vim the most I naturally fall into those vimbindings without thinking about it and it is frustrating when things don't support them. The other thing is I've gotten a bit of RSI from using my mouse so I try to keep my hands on the home row as much as possible
Neovim user here. I wa so happy on VCode on 2020 I changed my old intel Mac for a M1 Mac mini. When the pandemic ended I found my self without a laptop, so I bought an iPad, since I wanted to get things done while on the move I set up a remote environment, now I connect to my home Mac from mi iPad using Tailscale. But if don’t get vscode on the terminal, my only alternative ended up been Nvim, so put the time on it, it was paint full at times, but now Neovim is my default code editor, I have everything I need, code competition, syntax hilglihting, intelligent code navigation. And I move really fast on my code, compared with vscode, probably because VS is so easy to use that I didn’t give the time to learn to move really fast.
You have to understand that 1) Vim comes from an era where modern ides and even just a windowed environment where not a thing. 2) IT evolves much faster than humans, so there are still a lot of coders who grew up with Vim and so wanna keep using it 3) Having a rudimentary knowledge of Vi/Vim is useful for those times where you need to quickly and efficiently edit a file on a *nix system and you need to do it in a terminal.
I "needed" to learn vim. I wanted to develop stuff but only had an iPad with the shell "iSH". My setup was scuffed as heck: My Up/Down Keys were broken so I needed to use the ones onscreen; I didn't know about multiple file editing so I just closed and opened files with ':x'; My build times were horrendous; But I still managed to code something in the end and now helix, an editor similar to vim, is my main one.
I used vim for many years during my PhD. I was working on a cluster and vim, emacs, and nano were one of the few ways to edit files there (I prefer vim over emacs and nano). I have now almost completely moved to VS code (I still use vim for some quick edits ). I don't think vim can even come close to what modern IDEs can offer. And as you said, it's a tool and some people seem to be very obsessed with the tool for some reason.
Well my reason is I'm weird and modern products specialize for the average person. Point and click, fake soothing advertisements, things are annoyingly done for you all the time... Vim is more open to many types of people. Except average people.
@@theodorealenas3171 oh ye it does, I know just not as fleshed out as vsc for example. Although you can argue if using a mouse in vim is even necessary
Late to the party but for the future reference: It's good idea to start with vim plugin in your favorite editor/ IDE and set keyboard to toggle it. It's usually one of the most popular plugins with millions of downloads. Plugin makes the transition smoother or/and transfer the basic effectiveness of vim motions to your favorite editor. It also often comes with vimrc config file so one can modify plugin's behavior like real vim.
So I found the Keyboard is actually faster when coding, but had the same challenges with VIM, but I really liked a lot of the vim motions, which make you faster than your mouse. The jumping to the begging of words end of words, inside brackets, etc. I found the best of both words, there are vim motion plugins for VSCode that let you do the jumping around with the keyboard.
I learned VIM 2 years ago, these were my initial reactions, but now I don't want to go back, but if you want to turn it into a full-blown IDE to get features like auto-complete and going to code definitions, you might spend time tuning your setup using plugins and scripts, VIM is like a house without furnitures and appliances, you choose your own stuff and that can take a lot of time
"I have to use the j k keys to move up and down??!?! why not just the arrow keys?!??!?" as a vim/nvim user this is hilarious, why not? that's the right answer. I think that something new vim users need to understand is vim's philosophy of never having to look down at the keyboard nor move your hands from it. When knowing the basics, you could theoretically keep your wrists super glued to the desk and everything would be more than possible with vim/nvim. Awesome video Alex!
To answer your question at the end of the video: while I use Windows exclusively for work, I have been using the “VsVim” plugin in Visual Studio and the “VsCodeVim” plugin in VS Code for over 3 years. While I use Vim (actually Neovim) for making small edits to text files as needed, I have yet to establish a development workflow in Vim/Neovim proper-largely because tinkering with Vim config files isn’t particularly fun to me. Still, I would recommend learning to use VsVim/VsCodeVim to anybody who writes code for a living. While it initially took a couple weeks for me to become as efficient with Vim keybindings as I was with standard Visual Studio keybindings, those slow efficiency gains continued to climb to a level I could have never hoped to reach without Vim. If you code for a living, I would encourage you to keep at it. And remember: you don’t have to go all-in with “pure” Vim to experience many of Vim’s quality-of-life improvements.
Seems that escaping was not horibly hard. I will try it as well. So far I hold back because heard that it is almost impossible to get out of the Vim :)
Vim is great as an editor in a terminal. As that, it certainly is amazing. In a desktop environment it mostly cannot compete unless you are trying to do everything by keyboard. It can be good on the desktop for quick edits to config files. If you want to learn it then go ahead, it can be a very useful tool.
My story - Used sublime for primary coding, and moved to VSCode post that. while tinkering on servers, I used nano and then moved to vim since nano didn't seem to stand out and I felt it was no harm trying out vim. I got pretty good at vim but mainly for coding I used VSCode. A year ago added a vim plugin to VSCode and that has been the best stuff ever.
Vim always coming handy when I stuck in the server, but if I in my personal computer, vscode is still good option(dont forget to install vim add on in vscode, hahaha)
It really takes interest, some reading and configuring, using plugins and some practice to really understand how powerful vim or modal editing is. in a month or so, you'll realize using vim you can really get your work done faster and easier than any other editors.
The reason for HJKL is NOT for efficiency, it's simpler than that - the arrow keys as we know them didn't exist when vi came around. The terminal used by the original author of vi had four letter keys dubbed as arrow keys, you can guess which four. I use Eclipse and VS Code for proper projects, but I always install a vim plugin in them, because it just makes complex editing much much more efficient (none of them replicates all the behaviors accurately, though, but I can notice the improvements over the years). I wish I could list the most useful few tricks here, but that would be the entire manual. ;-) I hope you'll give it a second chance someday if you're bored.
Being (essentially) a FreeBSD variant, Macs ship with vim already installed... no need to do that separately. For me, using vi-then-vim has always been related to minimal hand movement. Using letter keys for navigation was never because of the absence of arrow keys, so much as it was about the how inefficient and slow it is to move one's hand back-n-forth away from the home row just to be able to navigate text. Not quite as bad as using a mouse, but still... a pointless speed-bump. Unless... I can see using the GUI version of vi / vim for some (though certainly not all) cases involving copying and pasting text. If one normally works with text that (for whatever reason) involves a "need" to drag-select text for copying.
I've been using vi (and then vim) since the 1980s. Anyone who was brought up in a unix environment without a GUI had to know how to use vi. Editing speed has never been an issue - thinking what to write is always the ultimate bottleneck I believe. If you're fully comfortable in a unix environment with all the command line tools and a good knowledge of regex, then vim will be very productive for you.
Instead of use the VIM program, I use vim plugin in every input area even in command line, it's an text editing style that I am addicted to once learned
Vim user for 15+ years while not being a professional programmer. I learned vim to edit configuration files, writing and coding. Now I consider any text editor without vim bindings to lack a fundamental feature. I love the focus you get not needing to touch the mouse and the fast navigation / manipulation across any piece of text / code. Learning vim was an invaluable skill. Thanks for the video, it reminded me some humble beginnings. As you pointed out, there is great content nowadays to get started.
Nice video! I switched from VSCode to Vim because I thought I could do more and better with it, but it doesn't necessarily. The difference is how things are accomplished. In my experience Vim/Neovim accomplish them in a more productive way. The biggest win for using Vim was the knowledge I gained, it makes you know your tool and customize it to extract its full potential. There is where I think many VSCode users fail. I've seen them struggle many times with simple issues with the Git integration, linting, formatting tools... because it comes almost as a built in feature hence an unexplored world for them. Vim made me deeply understand how linting, formatting, diagnostics, LSPs work, etc... to the point that today I could develop a plugin for Vim and even VSCode. Vim learning curve is big not only for the muscle memory you have to build but also for the custom configs you have to add and change along the way but it is a high pay high reward situation at least for my experience. I think VSCode and JetBrains software are great tools depending on the things you are trying to accomplish I just prefer using Neovim, in the end you should go with the tool that makes you feel safe and productive.
Thanks for the Laugh Alex - been a looong time since I've seen a Windows user (Mac?) try to learn vi. LOL. BTW it's a piece of software written by Bill Joy in the 1970s and is great for editing text files with regular expressions. Other than that I no longer have a use for it. But if you're a UNIX admin you need to know it since every version of UNIX since the 80s has had a copy. I'll stick to Xcode or Visual Studio, for coding Thank you. Cheers
I'm a fullstack Javascript developer, i use vim every day in my job. I have everything i need, i don't miss anything from other IDEs. I say this because i want to let people know that you can use vim as a full development environment successfully. It has a very steep learning curve, but once you pass the beginner pain, you will never come back to a "normal" editor.
I really like vim, hell, my arrow keys are even mapped to the vim keys on the second layer of my keyboard. Is vim for everyone, no. But if you're willing to stick with it till you get back up to speed, then you'll find going back to not having modal editing is tough. If you ever want to try vim again I strongly recommend using neovim not vim, as neovim has a lot better defaults, a lot of really powerful features, and plugins that vim can not use. And also steal someone's config, so you can get up to speed fast. If you have a good enough config, vim can almost feel like an IDE.
Vim is awesome ... but the learning curve is quite nicely represented by this character: | You summed it up perfectly. If you can or if you're willing to invest the time, it's gonna be great. I think I know approx. 2% of what Vim can do but these 2% are the reason why I have it in arms reach. When I have to make a text-horse out of a text-donkey it's my tool of choice and I find it quite funny how my stupid brain manages to remember how to tell Vim what to do.
Not quite what I expected. There might be a different layers of plugins and powertools, as in vs code, that you need to pre-install in vim to make it better, and there is emacs if you want further down that rabbit hole. So I wouldn't say that is a good coverage of things? But fun video anyway...
I code since more than 30 years ... used a lot of weird editors ... but never got used to vim - I always hated it when I tried! Always thought: What's wrong with me?!? Thank you so much for this video! 😉 Honestly, I kind of use only two fingers to type - and still I'm typing faster then I'm able to think my code ... ... so if I have to move my hand a little to reach the cursor keys is really not my problem 😝
I also didn't like vim after a week and a month of use. I tried and left it for a year. Then, I tried Vim Motions in Xcode (like Vim fro VSCode) and tried to stick to it. After a couple of weeks, I got used to it and worked like that for about a year. Now, I am getting tired of Xcode and it's speed. I switched 90% of work to NeoVim with plugins to replace my Xcode setup. Syntax highlighting, Jump to Definition (LSP), Debugging, etc.
I've been using the Idea Vim plugin in Webstorm for almost 2 weeks now. I did spend some time to learn the key bindings and I was super slow in the beginning, but I'm starting to see a good improvements in speed. Right now maybe I'm at 80% of my productivity before vim. I'll definitely keep using the vim motions in Webstorm, I can just tell that I'll be waay faster after some more time of practice. I'm not sure if I'll ever make the full switch to VIM editor, but using the vim motions in Webstorm or VS Code is a no-brainer.
Just started to use vim because I have a 2015 laptop and VScode is very chunky. I think people like vim for editing and rearranging their code or notes. In CTF challenges, when hacking a box, it may only have vim. So its also good to know.
I always use vim now because i like it more than the bloated vscode. I also use awesomewm (a window manager, replaces a desktop environment with a keyboard driven workflow). I juste like how fast i can get things done with them.
I like vi/vim, but I only use it to edit scripts remotely. For regular programming, don't use vi. Stick to vscode and ignore vi for day-to-day programming. At least it's not as hard as emacs, that's even harder.
Wise man said: one uses vim not to be the fastest programmer or typist, but to have fun invoking all those combos. Speed will increase over time, but it's not the end goal. It's a choice between boredom of getting stuff done and fun of getting stuff done with style.
I use vim/neovim for for almost two years now, aside from me being order of magnitude fater and more productive in vim it is FUN, i cant remember the lsat time a pulled out ant text editior/IDE and actually had fun performing tasks. That fact alone is worth the investment
Long time vim user here. Over 25 years. I totally understand your feeling. I can not put myself to recommend vim over vscode for most people. Specially if you are using modern languages like Javascript. However, vim is kind of an universal language if you are working with Linux and Unix like boxes.
When I started programming, I used a terminal connection over an RS232 network. Vi was the tool that was used on Unix boxes to edit files. Now I use vi when connecting over ssh, but that is all. VSCode and IDEs are the modern way, and I'm sticking with it :-)
Only @ThePrimeagen can make it look so easy.
Very true, he's a master. I've switched to neovim about 2 years ago and it was a process to get used to it but now I couldn't go back. So much so that when building a custom keyboard I install a custom firmware that is inspired by neovim: my arrow keys are hjkl system wide and I also use YXP instead of the usual copy/cut/paste. But I can also understand that investing for switching to a different editor is not in everybody taste.
When I saw the headline with Vim, I was so sure you have watched ThePrimeagen's videos... Did you noticed, that Vim is BLAZINGLY FAST? No? Neither do I :-)
Neovim is better to start.
@@semikolondev Yeah more sensible defaults than vim
You should have installed NeoVIM
Vim in 100 seconds was right over there
Very fun video. I'm a Vim user for 10+ years and have tried switching to VSCode, but with the exact same arguments I gave up, and returned to Vim to get my job done. 🙂
So THAT'S how the other side lives :)
VSCode has a Vim mode where it pretty much acts like a Vim editor
@@casperes0912True, and other editors like Atom also has Vim mode or Vim bindings. But there is always something that's not exactly as I'm used to and If I just turn the other editors into Vim then I don't know why I'm switching anymore. There are also a ton of extensions to Vim to give it functionalities like VSCode, Sublime or Atom. I have more or less just accepted that it's not really worth the effort (or I'm too old to learn a new editor). 🙂
@@AZisk For me Emacs is the other side. That feels so alien to me.
@@casperes0912 it's never really the same thing, you can't modify VSCode to the core, so it's impossible to replicate the same workflow from vim. I also tried multiple times to go back in the past, but am now happy and muuuch more productive with vim.
vim user here for 25+ years. I really feel for you, man. Why on earth do you want to subject yourself to this steep learning curve? It would be months before you get to the same productivity level as you are now. AND, BEWARE! If you do persist and vim commands become engrained into your muscle memory, there is no turning back! You won't be able to use another editor unless it provides vi-like key bindings. I know I do. I have installed Ideavim in Intellij/Android Studio and enabled Vim Mode in Xcode, otherwise they are completely unusable to me. And of course when other people see me editing files using just the letter keys, they think I perform magic. But as I said, 25+ years. My advice to them, and to you, is simply "don't". Or do, but you have been warned...
Muah hah hah!
+1 for Ideavim plugin
"how is this different from nano" it felt like an insult
As a person that uses vim pretty much exclusively for development, I’ll say it is definitely an extremely steep learning curve, 5 years of vim and I’m still learning new features. That being said, once you’ve mastered it, there really is nothing that competes. When you add tmux into the equation, you can’t be stopped.
To answer your question about why not use arrow keys, it’s because you have to move your hand, loss of efficiency, definitely took me a couple years to get used to.
I think what a lot of people don’t realize though is the super powerful search/replace and copy/paste capabilities between files. There are also tons of plugins that add a lot of features, and most importantly it is super helpful for headless development. It’s powerful and fast whether you are on a MacBook, a raspberry pi, or even another system on a super slow connection.
That being said, if you are developing front end stuff, it’s probably not super useful. If you are developing C#, visual studio is definitely the best option since the intelligence can nearly write the code for you. However, if you are doing embedded development and you know how to use a keyboard, then vim is definitely something worth taking the time to learn.
Thanks for breaking it down like that by dev roles - would have been a great addition to the video.
the og vi can be traced back to ED a single line editor. the hjkl keys are part of that history and the hardware that was available back then. nowadays with relative line numbers and the f key I rarely use arrow keys.
on the computerphile channel there is a great episode on how the grep command came about and the limitations they were facing.
*_"That being said, once you’ve mastered it, there really is nothing that competes."_*
I'm very skeptical of that. I've watched quite a few videos of Vim, trying to figure out what is it that Vim does so much better than other editors, but so far all I could find was people overselling features that also exist in Sublime, or things that Sublime can do just as easily, or in many cases even easier. Probably VSCode can do all of it as easily as well.
A lot of things people say about Vim are myths, too. The notions that using the arrows or the mouse affects productivity are myths. The majority of work time is not spent typing text, but thinking, reading, etc, so at the end of the day whatever microscopic advantage you may get for not using arrows or mouse, or from using feature X or Y, that won't matter at all. That is if there's any advantage at all. In other editors you also gain time for using shortcut keys instead of typing colon->command. Clicking something might also be faster in many cases. And it doesn't take months or years of getting used to.
(I do a lot of typos, so, personally, using commands is a nightmare to begin with.)
*_"That being said, if you are developing front end stuff, it’s probably not super useful."_*
Indeed that's what I've started suspecting, that Vim is only useful in specific situations for certain people. But most people who talk about it don't seem to realize that.
The thing which is not exist in any editor and it’s really was the main reason I have installed vim mode in VSCode is a visual blocks editing.
Interestingly I recently switched from VSCode to VIM/NeoVIM. It takes time and patience to get productive in VIM but once you master it.... man, you can flyyy! Sorry it didn't work for you. Cheers!
LOL -
I first tried vim in February. I hated it and went back to vscode. But then 3 months ago i realised that i had created so many shortcuts for my vscode, and i wondered if there ways a better way. So at the beginning of this month, i started using vim (neovim)
It was a very steep learning curve and a lot of things to configure. But i now can't work without it. I can go for 3 to 4 hours without touching my mouse once.
Recently started using VIM. Definitely took some pain but getting faster by the day. noticed whenever i had to use a IDE for work, i started accidently using VIM keybinds, so i feel like its improving.
It only gets better, especially when you start scripting vim.
How far along have you come? Tick tick it's been 9 months
@@nihancj unfortunately... nowhere 😂 i need to somehow integrate things like this in my daily tasks, else i will eventually start forgetting to use it... i'm weak
Thanks, Alex. I have to admit I enjoyed watching you suffer. And I admire your stubborn determination. After 40 years of using vi and its descendants, I sometimes forget how baffling it all is to newcomers. For better or worse, hjkl and all the other keystrokes long ago became permanently burnt into my muscle memory. I'm exactly the opposite of you: I get confused by arrow keys.
For someone who is a blazingly fast touch typist, learning vim will probably increase their productivity. But, honestly, for most people, it won't be worth the effort. If you're comfortable with vscode, I highly recommend you continue using it.
For me, when I first discovered vi in about 1981 or so, it was a huge step up from the line-oriented editors I had previously been using. But there were no such things as GUIs or mice at that time (unless you worked at Xerox PARC). I'm sure if something like vscode had been available, I never would have bothered to learn vi. You have a finite amount of time in your life; invest it carefully.
I remember the terror of discovering that there was only the ed line editor on certain machines.
@@dr.mikeybee I can't say I've been there because I always had vi or emacs available on the Unix machines where I worked in the 90s. But, yeah, I can imagine the horror.
I like Ed for small fast jobs and would be very frustrated having to use it only.
I have been working as a backend developer for about 4 years, and I use vim on my day to day work.
it didn't happen right away, it happened gradually:
from simple commands => combinations of commands => custom keybindings => custom vimrc settings => plugins => custom plugins
it sure does have a steep learning curve, I remembered I had to reference a vim cheatsheet all the time and work progression that day is like 10% (had to switch back to vscode to get some things done)
but after investing time learning, coding feels like a game and is just, fun.
besides that, it had lots of pros too:
1. vim keybinding are used in a lot of cli tools: less, more, w3m, git (diff|show|log --oneline), bash vi mode, tmux, etc...
2. you will get better at the command line (filters, use code to write code, which is also fun and efficient)
3. no extra gui programs to install, better performance (no gui eating up your ram)
4. it's been around for like 30+ years (stable), don't have to worry about being "sunset" and forced to learn a new editor (you know, like "Atom", how do you know vscode won't be the next Atom?)
5. it's just cool
so why not? learn vim😎
Love that you run the exiting Vim joke right away Alex xD
I feel Vim users aren't aware of the invention of the mouse.
I've been there before, tried multiple times to learn Vim before but couldn't stick with it, until recently.
I got tired of having to move my hands all the time to reach the arrow keys on my keyboard and decided that it was time to finally give it a real try.
It was weird at first but by allowing myself to slowly learn bit by bit and making adjustments as I go, I finally managed to be able to use it daily, with the plugin for VSCode. Which like you said, gives you the best of both worlds, the GUI from VSCode and the movement from Vim.
Great video! I love that you gave it a chance and thought you were extremely fair.
I enjoy using Neovim when I can. I am not realistically able to use it for work due to the projects I worn on, so I have the vim extensions installed in both Visual Studio and VS Code. This works pretty well for me since I am still able to use most of the things I like about vim even if they are a bit sluggish.
Im a DevOps engineer and im using both vim and VScode. VScode is nice to work on projects. And vim is great to edit one-two files in terminal, especially on a remote computer.
Nice video!
I have done the vimtutor followed by Drew Niels Practical Vim
Once you get used to doing things the vim way, everything else feels more awkward than your ear scratching analogy
You have to invest time to learn how to use the tool, but just like a chef chopping an onion without even looking,
Vim enables you to do precise cuts of text just by thinking about them.
Sure you could chop an onion a million ways, but the most efficient one takes upfront investment to learn the proper tools.
thanks. the chef using a knife is a great visual!
Vimtutor followed by Drew Neils book is the route I would recommend to someone starting out, too! The book is excellent. You can dip into it and learn a few tips every day, it only takes a few months to build up a really good knowledge.
I've been using only Vim for text editing since October 2019. I started by forcing myself to use it. I read a few blogs and seen a few videos to get started. To this day, I have to admit I still use the arrow keys for navigation. But, once I knew how to get into Insert Mode and out of it, it was like using NotePad. From then on, I started to learn the motions and the different keys used in Normal Mode. Someone even said that learning Vim is like learning a musical instrument. You get better every day. I don't have to move my right hand all the way to the mouse for editing text.
After getting used to the Vim way of doing things, I immediately installed Vimium; a plugin for Chromium-like browsers that uses the keyboard and has Vim-like motions to move around the browser.
Finally, I try to install a Vim plugin everywhere!
I hope you give Vim another try!
A key point: Vim is not a binary "you either fail or enjoy" thing.
When I first got vim introduced / saw from a friend at university. I remember I tried it, he kept saying all good things about it and ended up like you here - thinking "okay just lets use some editor or IDE and get work done"...
But guess what? Years later somewhere it was stuck in my mind "it would be great if I learn this properly" and was on a project where heavy text manipulation and non-trivial refactors were a thing. First started using vim in that space, then because I was already on linux anyways, then I installed it in every IDE as a plugin, then I don't even want to use IDE anymore just text editor and terminal and much more productive.
In university labs we had to telnet into Linux sever and do everything in cli and vim. Only programming in c or cpp. The black screens laid my foundation and now I appreciate visual studio a lot more. But if someday doom comes and a terminal is all I have , I will survive 😂
As a 10+ years Vim user I can say this was hard to watch, and it pretty much is an exact replica of me 10+ years ago wondering what was going on. Vim does really require some prior research to understand some of the concepts of modal editing before getting into it. That said, I couldn't imagine myself not using Vim nowadays, it's like an extension of my hands at this point.
"He is using an IntelliJ plugin that simulates vim?"
Vim-Plug: Welcome, nice to meet you.
VIM is installed if you open the terminal... Vi was great 30 years ago back when everyone used Elm for email... there are much easier options today. But I LOVE this video :)
Vi (or vim) is not supposed to be a substitute of a full IDE environment like vscode. But it is a very powerful text editor that is always available on a *nix machine, no matter how you've connected on it, regardless of being on a gui or a terminal mode. It has endless capabilities hidden in those shortcuts, however its true power is that it is always there when you need to edit a configuration file or change something on the OS and you can always run it even if you have only a black and white terminal available.
Use NVim or NeoVim is more cutomizable - you can customise your IDE of choice as code interpreter in it . Vim is also nice . The Primagen is a guru in VIM
I use it occasionally when I'm on a terminal over ssh, I only know the basics so I don't suffer, and I can get simple things done. For anything more complex than simple edits I use vscode over ssh. I've had a friend who could navigate in between files, split the viewport, and actually work efficiently with it, but I like vscode, mouse is not my enemy.
I like vim and I respect it, you can easily record and playback macros and all, but I rarely use it.
It was very interesting seeing someone's perspective as a beginner to learn Vim. I think that given maybe a month or two, anyone could code faster with the Vim motions
Tester here. Also forced to work with vim especially on the devops part...
On some of our Linux based machines only Vi/vim is available. We don't have anyone to do the devops stuff so it's up to us to maintain everything so.. vim it is.
I still feel like I just use basic navigation for editing, and google lots of things for it.
Mostly because it's not my absolutely everyday editing tool, my experience is not enough to be a keyboard vim warrior.
Also the dev/team manager loves it so no changes in nearest future i guess
Yes, I use Vim. There is one primary reason for me, and that is you can access and edit files though a login session to a remote server. There are secondary reasons like not having to reach for a mouse and access to shell comands. It is a steep learning curve, but it has the powers; stange powers.
"You should be able to work on multiple files" I mean, you can, but you're also talking about a text editor that's been around longer than the advent of cursor keys, which is why the default movement keys are H, J, K & L, and I do use Vim. I relearned it this past Summer after about 20 years here, when I decided to pick up BASH scripting again (same timeframe).
I use Vim (Neovim actually) all the time and I love it. I used Sublime in 2014, switched to Vim in 2018 and stuck there. I've tried atom, Vscode, Brackets, Dreamweaver (sucks), intelliJ, etc. but oh boy. All of them had one problem, and that is SLOWWWWWW at start. And also I believe whatever program makes anyone comfortable he/she should use that.
Same for me, it's a matter of getting work done. I'm sure Vim could make me faster after months of learning, but it's hard to find time to invest that sort of time and slash my productivity a ton for a substantial amount of time. Then again, I felt the same about Typescript vs JS, and now I'd never pick JS over TS for a project again. But I suspect the learning curve there is still way less steep than for learning vim :D
very true. TypeScript still sometimes feels like more work than it has to be, but in the end I’m way happier with the code I write than just pure Javascript.
I decided to learn vim before I even started working. I took the time to do it properly. I just focussed on that for a month. Watched all the tutorials, installed all the plugins I wanted, set up a bunch of custom key binds etc etc. By the time I started my first coding job I was already proficient. I would never be able to invest time like that now that I'm working properly but I'm sure glad that I did it back then. It's probably saved me 20X that time over the years.
I ‘ve started with vim for my ruby projects some 10+ years ago. I switched to Elixir and editor remained the same! All workflows I had with a little config changes remained.
It’s not easy to start, but for backend development it is worth
Great on your part to give it a try! I started using VIM 6 months ago and have never looked back. The issue here is that VIM in itself will never provide you the same experience like VS Code out of the box. You will have to create your own config using plugins like coc and tree-sitter for code completion and syntax highlighting (also for file browser). But I understand the sentiment of getting work done since the learning curve is so huge that you will need extra motivation + time to invest in it. If you don't have that now its ok, maybe sometime in the future you can try again. But its a great one time investment 👍
I've been using Vim for 14+, I started when I was at Uni, at that time we didn't have all the plethora of editors that we have today! It's amazing to see so many people using Vim despite how hard is to start using it, it's not very user friendly at all, but if you learn it, you will see the benefits later, It's like start a TH-cam channel, it's hard but you will see the result later! ;)
In the 1980s I worked on Unix systems that only had the ed editor. Then vi was a big step up. Then came vim. So of course I learned all the key combinations. Now if a modern editor doesn't have vim functionality, it's slow going. These days I use VSCode with vim emulation. I'm happy to use vim alone a lot of the time, but VSCode has Copilot, linters, and a debugger which are all amazing.
@@dr.mikeybee that's nice. But why haven't you added that functionality to Vim? It's a doable side project.
"What the hell did i just do?" is a very vim sentence.
Back in the day terminals did not have arrow keys. I use vim in VSCode. Saves you a lot of time copying lines, deleting and replacing words, and finding words. Also great to delete lines, undo -re du
Been there…tried vim (because I saw a fellow developer flying across the keyboard developing and angular app). What I learned is…I like VS code…and I am ok with that. To those that use VIM, I salute you…but just because you can does not mean you should 😮
In addition to Alex and TJ below:
The reason for "why not the arrow keys" is that vi, the "vi" in "vim" - that is "Vi IMproved" - is from days when you'd use terminals that, you guessed it, does not have arrow keys. So basically, through the history of "vim" (vi -> vim -> neovim, and that there is me starting a religious war) there's a continuum of people already being used to hjkl being "the way". Incidentally, you can see the same in a lot of tiling window managers on Linux and some things like Yabai on Mac. (Fun fact: I don't miss arrow keys - my desktop's keyboard does not have them. So much space saved on my desk! :D )
Further to that, I rarely move around with hjkl directly. Instead, you use combinations. For example, if I want to go to a letter 10 steps to the right, I type 10l. If I want to go five lines down, I type 5j. This is the power when you get used to it: want to delete 4 words? Instead of grabbing the mouse, click-drag, press delete, I just do: d4w. ("Delete 4 Words") Boom, gone. I want to "yank" (copy) 5 lines?
V5jy (capital V to select whole line in visual mode, 5 lines, j for down, y for "yank"). Boom, done, I have copied it.
If I want to cut them: V5jd (d for delete, but also stores it in "clipboard")
I want to delete a whole line? dd
Done.
So basically, it's not stupid or arbitrary, it's just "very old" in some respects, and completely counter to what a lot of people have grown up expecting in the 46 years since VI was designed. (I'm old enough that command line was default when I started using computers.)
On laptops especially, I love this, because I just can't with touchpads. VI (though I use neovim, usually through the lunarvim distribution) lets me work on my code efficiently without having to pack a mouse or give myself RSI through using the touchpads. All the other nice stuff (language server protocols, blah blah etc) are there through plugins - or in my case, just installing lunarvim.
I'll not go as far as say "vi/vim/neovim is superior" to Vs Code or whatnot. But _for me_ it is. For most people? No. And if you want a real ride: install the "vim mode" plugins for Firefox so you can navigate websites without your hands ever leaving your keyboard.
The key to using vim is learning a few basic commands at the outset and mastering them before learning another group of commands.
1. How to exit the text editor
2. How to insert text and delete text
3. How to move to the beginning and end of a buffer
4. How to move to the beginning and end of a line, and move forward and backward between "words"
5. How to copy one or more lines and paste those lines elsewhere in the buffer
6. Keep learning based on your requirements, not every command supported by the text editor
I mainly use VS Code for my undergrad work, but I am taking a course right now, Introduction to Systems Programming in UNIX, which requires us to program over ssh onto the school's linux machines and I have to use vim.
I dislike it compared to VS Code, but I force myself to use do all my programming for that class through vim.
I love vim. But I sadly often need to switch between editors based on my project requirements. What I've found interesting is that on specific keyboards where I've used vim the most I naturally fall into those vimbindings without thinking about it and it is frustrating when things don't support them.
The other thing is I've gotten a bit of RSI from using my mouse so I try to keep my hands on the home row as much as possible
Neovim user here. I wa so happy on VCode on 2020 I changed my old intel Mac for a M1 Mac mini. When the pandemic ended I found my self without a laptop, so I bought an iPad, since I wanted to get things done while on the move I set up a remote environment, now I connect to my home Mac from mi iPad using Tailscale. But if don’t get vscode on the terminal, my only alternative ended up been Nvim, so put the time on it, it was paint full at times, but now Neovim is my default code editor, I have everything I need, code competition, syntax hilglihting, intelligent code navigation. And I move really fast on my code, compared with vscode, probably because VS is so easy to use that I didn’t give the time to learn to move really fast.
You have to understand that
1) Vim comes from an era where modern ides and even just a windowed environment where not a thing.
2) IT evolves much faster than humans, so there are still a lot of coders who grew up with Vim and so wanna keep using it
3) Having a rudimentary knowledge of Vi/Vim is useful for those times where you need to quickly and efficiently edit a file on a *nix system and you need to do it in a terminal.
Been Vimming for 20+ years and it is very hard to use a non-modal editor, selecting lines seem to hurt
I "needed" to learn vim. I wanted to develop stuff but only had an iPad with the shell "iSH". My setup was scuffed as heck: My Up/Down Keys were broken so I needed to use the ones onscreen; I didn't know about multiple file editing so I just closed and opened files with ':x'; My build times were horrendous; But I still managed to code something in the end and now helix, an editor similar to vim, is my main one.
Congrats for the 100k subscribers
"I tried Vim" now do it again for 10 times then you'll start getting the juice
"We have no time to sharpen the Axe - we have to cut treeees!!!"
WOW! You exited vim easily. You are the quickest vim learner in the world.
The idea is that you don't need to move your hands around the keyboards. That's why you don't have to use the arrowkeys.
I used vim for many years during my PhD. I was working on a cluster and vim, emacs, and nano were one of the few ways to edit files there (I prefer vim over emacs and nano). I have now almost completely moved to VS code (I still use vim for some quick edits ). I don't think vim can even come close to what modern IDEs can offer. And as you said, it's a tool and some people seem to be very obsessed with the tool for some reason.
Well my reason is I'm weird and modern products specialize for the average person. Point and click, fake soothing advertisements, things are annoyingly done for you all the time... Vim is more open to many types of people. Except average people.
Wonder what an ide offers you over a configured nvim setup, except mouse support
@@druffel46 Vim does support mouse. Vim is a lifestyle, it's not much of a set of features.
@@theodorealenas3171 oh ye it does, I know just not as fleshed out as vsc for example. Although you can argue if using a mouse in vim is even necessary
Late to the party but for the future reference: It's good idea to start with vim plugin in your favorite editor/ IDE and set keyboard to toggle it. It's usually one of the most popular plugins with millions of downloads. Plugin makes the transition smoother or/and transfer the basic effectiveness of vim motions to your favorite editor. It also often comes with vimrc config file so one can modify plugin's behavior like real vim.
ESC+:+q+Enter.
This one rule can save lives.
The question is, does vim really make you code faster without a "graphical" UI?
So I found the Keyboard is actually faster when coding, but had the same challenges with VIM, but I really liked a lot of the vim motions, which make you faster than your mouse. The jumping to the begging of words end of words, inside brackets, etc. I found the best of both words, there are vim motion plugins for VSCode that let you do the jumping around with the keyboard.
I learned VIM 2 years ago, these were my initial reactions, but now I don't want to go back, but if you want to turn it into a full-blown IDE to get features like auto-complete and going to code definitions, you might spend time tuning your setup using plugins and scripts, VIM is like a house without furnitures and appliances, you choose your own stuff and that can take a lot of time
I use the vim plugin with vscode. I love it
"I have to use the j k keys to move up and down??!?! why not just the arrow keys?!??!?" as a vim/nvim user this is hilarious, why not? that's the right answer. I think that something new vim users need to understand is vim's philosophy of never having to look down at the keyboard nor move your hands from it. When knowing the basics, you could theoretically keep your wrists super glued to the desk and everything would be more than possible with vim/nvim.
Awesome video Alex!
I use vim. After a couple months, it becomes way easier than a mouse, I feel stressed using a mouse, and always end back in vim.
Vim is great for masochistic coders or if you are working on a server and there is no GUI; VS Code all the way.
It certainly feels that way at the beginning.
To answer your question at the end of the video: while I use Windows exclusively for work, I have been using the “VsVim” plugin in Visual Studio and the “VsCodeVim” plugin in VS Code for over 3 years. While I use Vim (actually Neovim) for making small edits to text files as needed, I have yet to establish a development workflow in Vim/Neovim proper-largely because tinkering with Vim config files isn’t particularly fun to me.
Still, I would recommend learning to use VsVim/VsCodeVim to anybody who writes code for a living. While it initially took a couple weeks for me to become as efficient with Vim keybindings as I was with standard Visual Studio keybindings, those slow efficiency gains continued to climb to a level I could have never hoped to reach without Vim.
If you code for a living, I would encourage you to keep at it. And remember: you don’t have to go all-in with “pure” Vim to experience many of Vim’s quality-of-life improvements.
Seems that escaping was not horibly hard. I will try it as well. So far I hold back because heard that it is almost impossible to get out of the Vim :)
i already forgot how to do it 😂
I use Vim as a Plugin with intellij for 3 months. And I totally got used to it. I love it and I found myself more and more using Vim instead of my IDE
When you enter vim, vim enter you.
I use Helix, which is like vim, but with different bindings, and more features out of the box!
Vim is great as an editor in a terminal. As that, it certainly is amazing. In a desktop environment it mostly cannot compete unless you are trying to do everything by keyboard. It can be good on the desktop for quick edits to config files. If you want to learn it then go ahead, it can be a very useful tool.
My story - Used sublime for primary coding, and moved to VSCode post that. while tinkering on servers, I used nano and then moved to vim since nano didn't seem to stand out and I felt it was no harm trying out vim. I got pretty good at vim but mainly for coding I used VSCode. A year ago added a vim plugin to VSCode and that has been the best stuff ever.
Vim always coming handy when I stuck in the server, but if I in my personal computer, vscode is still good option(dont forget to install vim add on in vscode, hahaha)
I think it probably falls into that unfortunate category of things that are not really worth learning but really worth having learnt!
false
It really takes interest, some reading and configuring, using plugins and some practice to really understand how powerful vim or modal editing is. in a month or so, you'll realize using vim you can really get your work done faster and easier than any other editors.
I used IntelliJ with the vim plugin for 2.5 years. Switched to neovim with plugins as main editor 4 months ago. Love it.
The reason for HJKL is NOT for efficiency, it's simpler than that - the arrow keys as we know them didn't exist when vi came around. The terminal used by the original author of vi had four letter keys dubbed as arrow keys, you can guess which four.
I use Eclipse and VS Code for proper projects, but I always install a vim plugin in them, because it just makes complex editing much much more efficient (none of them replicates all the behaviors accurately, though, but I can notice the improvements over the years). I wish I could list the most useful few tricks here, but that would be the entire manual. ;-) I hope you'll give it a second chance someday if you're bored.
Being (essentially) a FreeBSD variant, Macs ship with vim already installed... no need to do that separately. For me, using vi-then-vim has always been related to minimal hand movement. Using letter keys for navigation was never because of the absence of arrow keys, so much as it was about the how inefficient and slow it is to move one's hand back-n-forth away from the home row just to be able to navigate text. Not quite as bad as using a mouse, but still... a pointless speed-bump. Unless...
I can see using the GUI version of vi / vim for some (though certainly not all) cases involving copying and pasting text. If one normally works with text that (for whatever reason) involves a "need" to drag-select text for copying.
For all the great things about vim, I felt like rather than learning to program you end up learning vim.
I've been using vi (and then vim) since the 1980s. Anyone who was brought up in a unix environment without a GUI had to know how to use vi. Editing speed has never been an issue - thinking what to write is always the ultimate bottleneck I believe. If you're fully comfortable in a unix environment with all the command line tools and a good knowledge of regex, then vim will be very productive for you.
developement is okay. how can you debug your code in vim? that's like 2/3rds of my time on an IDE
Instead of use the VIM program, I use vim plugin in every input area even in command line, it's an text editing style that I am addicted to once learned
Vim user for 15+ years while not being a professional programmer. I learned vim to edit configuration files, writing and coding.
Now I consider any text editor without vim bindings to lack a fundamental feature. I love the focus you get not needing to touch the mouse and the fast navigation / manipulation across any piece of text / code. Learning vim was an invaluable skill.
Thanks for the video, it reminded me some humble beginnings. As you pointed out, there is great content nowadays to get started.
Nice video!
I switched from VSCode to Vim because I thought I could do more and better with it, but it doesn't necessarily. The difference is how things are accomplished. In my experience Vim/Neovim accomplish them in a more productive way.
The biggest win for using Vim was the knowledge I gained, it makes you know your tool and customize it to extract its full potential. There is where I think many VSCode users fail. I've seen them struggle many times with simple issues with the Git integration, linting, formatting tools... because it comes almost as a built in feature hence an unexplored world for them.
Vim made me deeply understand how linting, formatting, diagnostics, LSPs work, etc... to the point that today I could develop a plugin for Vim and even VSCode.
Vim learning curve is big not only for the muscle memory you have to build but also for the custom configs you have to add and change along the way but it is a high pay high reward situation at least for my experience.
I think VSCode and JetBrains software are great tools depending on the things you are trying to accomplish I just prefer using Neovim, in the end you should go with the tool that makes you feel safe and productive.
Thanks for the Laugh Alex - been a looong time since I've seen a Windows user (Mac?) try to learn vi. LOL. BTW it's a piece of software written by Bill Joy in the 1970s and is great for editing text files with regular expressions. Other than that I no longer have a use for it. But if you're a UNIX admin you need to know it since every version of UNIX since the 80s has had a copy. I'll stick to Xcode or Visual Studio, for coding Thank you. Cheers
I'm a fullstack Javascript developer, i use vim every day in my job. I have everything i need, i don't miss anything from other IDEs.
I say this because i want to let people know that you can use vim as a full development environment successfully.
It has a very steep learning curve, but once you pass the beginner pain, you will never come back to a "normal" editor.
Yes, "normal" editor are such a pain in the ass to use when you're used to the power of vim.
Am a vi or vim user and I agree that it had a steep learning curve. I mainly use it to edit config files on my application / web / db servers
I really like vim, hell, my arrow keys are even mapped to the vim keys on the second layer of my keyboard. Is vim for everyone, no. But if you're willing to stick with it till you get back up to speed, then you'll find going back to not having modal editing is tough.
If you ever want to try vim again I strongly recommend using neovim not vim, as neovim has a lot better defaults, a lot of really powerful features, and plugins that vim can not use. And also steal someone's config, so you can get up to speed fast. If you have a good enough config, vim can almost feel like an IDE.
Vim is awesome ... but the learning curve is quite nicely represented by this character: | You summed it up perfectly. If you can or if you're willing to invest the time, it's gonna be great. I think I know approx. 2% of what Vim can do but these 2% are the reason why I have it in arms reach. When I have to make a text-horse out of a text-donkey it's my tool of choice and I find it quite funny how my stupid brain manages to remember how to tell Vim what to do.
So often I find myself watching myself use Vim.
More than a few times, I thought the wrong command but did the right one.
Not quite what I expected. There might be a different layers of plugins and powertools, as in vs code, that you need to pre-install in vim to make it better, and there is emacs if you want further down that rabbit hole.
So I wouldn't say that is a good coverage of things? But fun video anyway...
The reason to use Vim over VSCode is the keyboard shortcuts. After you have all the short cuts memorized it's faster.
I code since more than 30 years ... used a lot of weird editors ... but never got used to vim - I always hated it when I tried!
Always thought: What's wrong with me?!?
Thank you so much for this video!
😉
Honestly, I kind of use only two fingers to type - and still I'm typing faster then I'm able to think my code ...
... so if I have to move my hand a little to reach the cursor keys is really not my problem 😝
I also didn't like vim after a week and a month of use. I tried and left it for a year. Then, I tried Vim Motions in Xcode (like Vim fro VSCode) and tried to stick to it. After a couple of weeks, I got used to it and worked like that for about a year. Now, I am getting tired of Xcode and it's speed. I switched 90% of work to NeoVim with plugins to replace my Xcode setup. Syntax highlighting, Jump to Definition (LSP), Debugging, etc.
I've been using the Idea Vim plugin in Webstorm for almost 2 weeks now. I did spend some time to learn the key bindings and I was super slow in the beginning, but I'm starting to see a good improvements in speed. Right now maybe I'm at 80% of my productivity before vim.
I'll definitely keep using the vim motions in Webstorm, I can just tell that I'll be waay faster after some more time of practice. I'm not sure if I'll ever make the full switch to VIM editor, but using the vim motions in Webstorm or VS Code is a no-brainer.
Just started to use vim because I have a 2015 laptop and VScode is very chunky. I think people like vim for editing and rearranging their code or notes. In CTF challenges, when hacking a box, it may only have vim. So its also good to know.
I always use vim now because i like it more than the bloated vscode. I also use awesomewm (a window manager, replaces a desktop environment with a keyboard driven workflow). I juste like how fast i can get things done with them.
Do you use tmux too? Having Vim, a WM and a terminal multiplexer is a great mouseless combo. edit: and also use the vim extension with the browser
Actually no, I don't use tmux because I think tiling windows is enough for me. For now I think that it's one more tool that I don't really need.
I like vi/vim, but I only use it to edit scripts remotely. For regular programming, don't use vi. Stick to vscode and ignore vi for day-to-day programming. At least it's not as hard as emacs, that's even harder.
Wise man said: one uses vim not to be the fastest programmer or typist, but to have fun invoking all those combos. Speed will increase over time, but it's not the end goal. It's a choice between boredom of getting stuff done and fun of getting stuff done with style.
I use vim/neovim for for almost two years now, aside from me being order of magnitude fater and more productive in vim it is FUN, i cant remember the lsat time a pulled out ant text editior/IDE and actually had fun performing tasks.
That fact alone is worth the investment
Long time vim user here. Over 25 years. I totally understand your feeling. I can not put myself to recommend vim over vscode for most people. Specially if you are using modern languages like Javascript. However, vim is kind of an universal language if you are working with Linux and Unix like boxes.
vim is installed out of the box on macOS, you actually don't need to use home-brew
When I started programming, I used a terminal connection over an RS232 network. Vi was the tool that was used on Unix boxes to edit files. Now I use vi when connecting over ssh, but that is all. VSCode and IDEs are the modern way, and I'm sticking with it :-)