@@danielrdrigues My greatest thoughts while coding happen when I bust out the pen and paper to evaluate my design before I code a logical error that is impossible to debug. Either you catch the error while designing, or you easily catch where your code doesn't align with your sketched design.
What is being referred to as "command mode" in the part after the 100 seconds, is actually called normal mode. Command mode is what you enter when you hit colon ( : ).
@@Fireship 😂 hey I currently want to purchase your courses. Will I access everything previous such as Flutter and others if I subscribe this month for quarterly.? Are they downloadable? I'm new to your platform slack but haven't purchased a single before. Kindly help
@@Fireship Why are people so orthodox with editors like emacs and vim? . Why not encourage the use of vscode itself? .Vscode would have saved hours of time for most of the users even with less experience.I don't think outdated editors like vim / emacs would have made a difference even if it didn't exist today.
Someone had to say it, I love Fireship's videos because of how dense in knowledge they are. Whenever he brings out a guest they always move at a glacial pace in comparison, which is fine, but it's not Jeff's style at all. Feels like I'm watching someone else's channel.
I think the same and in my opinion it kicks me out of the flow when the 'master' (at their topic) talks slower or not precise! Don't get me wrong, it's still great content but it was better when he made the videos all himself. I also know this is a lot of time and work especially to keep up with his information density throughout the whole video
Small tip: you can also navigate to line numbers via {n}gg, where {n} is the line number you want to go to (ie. 5gg). Alternatively, gg goes to the first line, and G goes to the last
@@egg-mv7ef Sure, show me a common way to do something like cs'" -> Change surrounding single quotes to double quotes ci" hello! -> Change stuff inside quotes to hello! People who are somewhat capable to quickly edit code use some sort of modal editor. Everyone else thinks they edit code as fast, when in fact they don't. You don't even have a quick way to do what vim macros do. Hell most people have a tough time joining multiple lines, when in vim you can just use J.
Vim acting is faster for editing but can be slower for writing. But visual vim (idk what its called. Vim gtk? Not sure) lets you do stuff with the mouse as well
> _"visual vim lets you do stuff with the mouse as well"_ @@loonathefoxgirl6375 the "visual vim" u are talking about is called gvim (graphical vim) - i have tried that, but it ain't a very good piece to use. i couln't figure out how to save settings in it. like font size or even what are the shortcuts to zoom in it
I'm a hardcore vim user and was literally just telling my friend that I need a text editor alongside vim which is better in YAML and XML editing, previously I never needed to edit files in those formats. I think that this configuration is exactly what I was looking for! Thank you!
I've used Vim here and then. But just in general for the way I write code I've never felt using a mouse was a bottleneck. I understand people who like it though. There's a certain charm once you get into the swing.
HOW DO YOU GET INTELLISENSE? i don't even type 50% of my code. I type the first two characters and intelliJ finishes off the line. Is this even possible with vim?
@@brianevans4 Yes. At least with neovim there are a variety of LSP plugins available. The most common one is coc. It's not the most trivial thing to setup, but it works pretty well. But even vanilla vim has some basic completion functionality by using Ctrl-N or Ctrl-P keys, but it only matches raw words.
The biggest advantage of vi/vim over every other editor is it's incredibly powerful text processing (which by the way you can apply from within a session or via a command-line if you're running via batch).
no, it's not 10 seconds a day. it's 10 hours a day LOST in learning this whole vim-fu acrobatics and repeating commands and keybindings. Then it's 10 more hours a day lost on getting verbal revenge on others humiliating them for not using vim. 4 hours are left to play VimBeGood, Vim Adventures and Nethack and trying to understand why the J key has a touch typing marker on every keyboard and not the H key...
@@linuxrantYou do not understand! Using Vim makes you unique compared to those puny basic IDE fools! I gotta feel special to code efficiently, daddy issues seeping in.
Another pro-tip that I one used and since never went back: wether you use VSC or IntelliJ (and stuff): Disable "multi tab" so only one tab is displayed and learn the shortcuts that show you the last files you opened (CTRL + E for IntelliJ) and to search for files / classes. That somehow forces you to use the keyboard much more often, because using the mouse becomes so painful with just one tab. And in the end it boosts your productivity by A LOT! Thank me later 😉
fun fact: the 'hjkl' mapping for vim is surprisingly similar to the arrangement of arrows in Dance Dance Revolution, which is always typically Left, Down, Up, Right.
@@cindrmon HJKL They keep your right hand in middle center of the keyboard. It is all about being in 100% control all the time. And having bleding edge efficiency
You should note that a and A are separate commands. I have met people that thought the command to append to the end of the line was shift+a, which it is not. An interesting side effect of learning the vim navigation keys that I've noticed is that you start to notice them all over the place. They work on Facebook and twitter for navigating your feed for example.
@@samuelwaller4924 I'm not sure what Daraul meant but, interestingly, vim doesn't care what keys you type, but rather what character is being typed to the terminal. Yes, typically Shift+a will result in typing 'A', however if you happen to have Caps Lock enabled, and press the 'A' key without shift, vim would recognise it as user typing uppercase 'A', so it would appending to line ending. In this scenario using shift would actually result in regular mid-line appending. As a result, if you have different keyboard layout, you would use different keys to do the same thing in vim.
❌Point mouse to your target word near-instantly with precision honed from years of hand-eye muscle memory ✅Spam up arrow until you get to your line, then spam right arrow until you get to your word The speed thing is mostly a myth. Some inputs are faster with a mouse, other a keyboard. Use the right tool.
That’s why the arrow keys / hjkl are actually not used that often in Vim. There are almost always better ways to precisely move the cursor where you want it.
I have been using Vim on my own, and while I wouldn't consider myself fluent, just being able to delete or yank lines without touching the mouse has made editing text files much faster.
@@oberguga On vim it's (also ?) v + arrows to select, then y to copy, d to cut, s to delete (but it makes it enter insert mode too, so there is probably another way I never bothered to look up for).
I started trying to use vim emulation this week and 'L for right' is the best way to describe my experience so far. It's great when it works out, but damn some of these keybinds are alien
I play videogames in the ijkl format so this confused me for a bit. I think that K will take me down and J will take me left. I will take me up. But L is the exact same so I never had trouble with that key. L is always right.
I feel like remembering them relative to the up/down keys is easiest, if you already know those. (J/down is easiest because its your index finger and has the haptic bump on it) then H is *left* of those keys, and L is *right* of those keys.
My personal favorites: ciw - change inner word cs - change surrounding to ysiwtp - add surrounding html tag to word under cursor The last 2 require the surround.vim plugin
@@Chiny_w_Pigulce lol yeah haha. I dont write html as is though, i write React which uses jsx which is html-like syntax so its basically javascript, html and css (with styled-component library) all in one file :)
Hi, you are in luck if you haven't progress further from basics because I recently made a Vim Tutorial Playlist. You can become Master of VIM by watching my playlist in 2x mode. I tried to cover most of the topics in smaller digestible chunks/parts. There's no shadow of doubt that using or at least getting your muscle memory of vim key bindings will go a long way. I myself learned vim when I was 22 years old. My first task was to master a text editor rather than any programming language lol It took me almost 6 months. Check my playlist, Hope you enjoy it. ruclips.net/video/SirSctawUVQ/видео.html
some good vim commands. cw = change word. ct[letter] = change to letter. dw = delete word. dt[letter] = delete to letter. ~ (tilde) = toggle the case of the letter and move to next letter (hold to do entire string)
0:03 Keyboard is a AJAZZ K500 model sold by FirstBLOOD from China, it's a niche model (if I don't say so myself, highly recommended w/ Cherry MX Blue switches!)
Vi and Vim have a lot more advanced commands, but 2 I wanted to point out since he was using I and Escape to get to the beginning of a line: Shortcut to go to the beginning of a line without entering Insert Mode: ^ (Shift-6 on a US keyboard). Shortcut to go to the end of a line without entering Insert Mode: $ (Shift-4 on a US keyboard).
Keep on learning! Whenever I feel like I know enough vim I come across something new that makes me go ‘I could be doing THAT this whole time??’ There’s so much gold in :help alone!
@@flamendless From Urban Dictionary, here's the best explain about soydev I can conclude so far: Soydev are basically devs who use GUI for everything in their work, from editor to other things, and never touched to something like Vim. They are very common in the "Silicon Valley" (I'm not 100% sure about this).
The best thing about vim is that I can edit vimrc to create my own key bindings and install only those plugins that I really use in my day to day life. The worst thing about vim is that it takes weeks to find plugins that I want to use and learn how to create your own key bindings
@@rosslewerenz9360 Yes but I think it's the other way round. In Vim, there are no extra plugins installed and you have all the freedom to install only those plugins you will need. In Vs code, you have a lot of uninstallable features and telemetry trackers which slow down vs code in comparison to vim. Vim's load time is almost unnoticeable while it takes time to load vs code. On the other hand, it's very difficult to find good plugins for Vim, and sometimes they do not even exist. For example, there are hardly any good plugins for Java development on Vim. And it's not as easy as clicking the download button to install those plugins. But vs code has an excellent marketplace and it's quite easy to find extensions as their search option is quite good as well.
this. the short comparison was clearly either recorded by someone who has never used a normal IDE in their lives, or it was specifically made to make normal VSCode look slow. take your guess.
My favorite part is 2:40 as comparation of perfomance. In VS Code he is using slow mouse with one missclick and other useless clicks instead of ctrl+delete and ctrl+backspace. I can't imagine any case Vim can fight IntelliJ IDEA products.
👏VIMTUTOR👏!! The best way to learn vim is by running 'vimtutor' in your terminal. Its a tool which will go over basically all of the built in features of vim by actually having you use them. When you're new to vim, doing this a bunch of times will familiarize you with the shortcuts very quickly. Cool video, but I feel like this has to be mentioned.
I found the With Vim / Without Vim to be misleading. The "With Vim" side start with the cursor already at the end of the opening tag line, while the "Without Vim" is randomly in the middle. If it was honest, the "Without Vim" would have used the mouse to select from the end of the opening tag line to the end of the closing tag line and deleted everything at once, it also require less accuracy with the mouse. By the way, natively you can : Navigate using arrows Use begin/end to go to the start/end of the line (begin will alternate between before & after the indentation if you keep pressing it). Use Ctrl+begin/end to go the start/end of the file. Use Ctrl+left/right arrows to jump to the previous/next word boundary. if you hold shift it'll also select. All of the above work with multicursor. Inser to toggle the input mode between "insert" and "replace". With that knowledge, I find that Vim addon to be a waste of time.
Yeah, it’s really hard to make good comparisons for that kind of thing. I don’t doubt that you can use the standard controls to write quickly. It takes quite a while to get truly comfortable with Vim, but I find it hard to live without nowadays. I absolutely recommend rebinding caps lock to escape. Contorting your hand to tap the escape key in the corner of the keyboard is unpleasant and slow as fuck. I do find myself tapping caps lock on other people’s computers when I try to dismiss a dialog box or exit a field though, which is always amusing.
NIce video! I also want to add, that if you practice blind typing, you can rebind movement keys from hjkl to your right hand home row (jkl;), which is much more convenient
You know.. what's stopping me from using my arrow keys? I can press the Home and End button to similar effect, and saving doesnt take that much time when you're spamming ctr + s every 5 seconds anyway
I love being a developer and enjoy programming, that's why I don't want my fingers glued to the keyboard in order to squeeze my productivity, specially for my employee.
Yah, totally. I love Vim, but not because it "increases my productivity". I don't want to be programming 100lines/minute. I want to have fun and do the things right
My friends told me to start learning programming with some easy IDE and a beginner-friendly language like Python. So I choose Vim and started learning Assembly.
Also this functionality: ^ - to move at the beginning of a line without insert mode $ - to move at the end of a line without insert mode O - to insert a new line above the one the cursor is at and get into insert mode o - like O but for the line down w - to jump from next word to next word e - like w but places the cursor at the beginning of the next word b - to go back word by word { and } - to move up or down by paragraph/block ( and ) - similar to { and } but steps from beginning of block to end of block and vice versa v - press it once and move your cursor to start selecting Ctrl + E - to scroll down Ctrl + Y - to scroll up / - is like your find functionality ( is the string you're searching for), after that you can jump form instance to instance with n (next) and N (previous) there are also ways to have split screen with multiple files open and navigate through them, I don't remember how that's done. Honestly, if Vim had autocomplication out of the box, I'd use it exclusively.
One small hack is you can go to normal mode from any mode without directly pressing the esc(which is roo far) Just press Alt+ any other key(except ctrl, shift, caps etc) You can also make combination to use it more efficiently like If you are in a middle of a line and you want to type in the next line, normally you would do esc + o But what you can do is just press alt + o which has the same effect but more efficient This works because pressing alt + any key == esc + that key
Or just remap CapsLock to ESC - jfj to ESC is a good idea too... or jjj jj isn't a good idea - might want to type 'hajji' one day if seized by a desire to do a racism.
@@thestopper5165 actually its not a remap, works in all vim like editors like nvim without any mapping and configurations and the hack can be used in many ways to make more efficient. The above mentioned example is way more easy than to type jfj and then o to change to a new line. Not just o, any key can be combined with alt to create the effect of 'escaping and then typing the key' alt + j/k to suddenly go down/up while typing alt + p to suddenly paste while typing etc
0:03 the keyboard is a Retro RGB keyboard sold by FirstBlood Gaming as Ajazz K500, comes in various Cherry MX keycaps. No bloated software is needed to use the RGB, it's straight plug-n-play out the box. Highly recommended.
It's *"+p* though - not just *+p* (for me it's remapped to leader-pp because that's faster and has no SHIFT, whereas "+p is two shifts). Likewise, leader-yy is "copy selection to the system register AND to vim's standard *"* register", and leader-yc is "copy last command-line to *+* and *"* " Remaps ftw. I hate it when I can't hit ESC-ciw in a text box to replace a word - even with vimium installed. EvilCorp's sites disable vimium by default, it appears.
Quick tip: turning a 2 into a 22 can happen on either side of the cursor. Works for 11,33,44 also. I'm not sure beyond that as I've been to aftaid to venture that far from home.
Using Vim has nothing to do with being a true software engineer (2:03). Also, most of the time is spent thinking about the problem not typing. Saving 1 second does not reduce the development time or cost (2:41).
@jeff pentagon When you have a such a big file, the first suggestion is to break it down into separate files for a multitude of other reasons. But in case you can't because it is a legacy project or something, then you can use a variety of much faster methods to navigate: 1) the outline representation of the document that shows the symbols 2) CTRL+F to search 3) CTRL+G to go to an exact line number 4) using a bookmark extension All of these are way faster than scrolling and scanning the code by eye.
0:42 *“…and at some point, you’ll likely find yourself dropped into vim with no way to escape.”* Yep! That, “get me out of here,” clip sums up my experience accidentally opening Vim. I switched back to Linux a few months ago after years of using just windows, and I got Nano and Vim mixed up. I realized my fatal error as soon as I saw, in stark contrast to Nano, the lack of a keyboard bindings cheat sheet at the bottom of the editor screen.
I am more comfortable using: home / end button to change the cursor position to the end / beginning of the line, ctrl + right / left key to change the cursor position to the beginning / end of the word
Exactly. He lost me at this point. I don't really see the benefit of VIM after watching this video, apart from running it in the shell to code on a remote system via ssh. I mean, I would get it if the argument was like that he just prefers the experience of using VIM. Like some (including myself) like to listen to music on vinyl. But I don't see how VIM could increase my productivity. I hardly use my mouse in editors like VS Code.
@@linkndark yep unfortunately not a "great" video about vim, I guess :D a lot of great features yet not complex could have been shown (ciw, ca" { } ...). I'm not convinced someone that is not using Vim would want to discover the tool more after the video!
@@linkndark I chose vim because of the way it treats edits as transactions. If I tell it to change some text I can be sure I won’t accidentally lose some closing parenthesis or a semicolon or something like that and that gives me confidence. With other editors unless there’s a linter in place I often feel like I have to double check my work before moving on.
instead of `:q!` use `ZQ` `:wq` use `ZZ` also worth mentioning: `o`: new line below, puts you in insert mode `O`: new line above, puts you in insert mode `.`: repeats the last action you did
even after getting over the barrier to entry of learning vim, I still feel more comfortable using regular controls in VS Code I will happily use (n)vi(m) if I only have access to a terminal though
@@TheEnde124 One big difference is that NeoVim has support for Lua plugins inbuilt. Vim does not have the same inbuilt, iirc you need to compile Vim with a certain flag to enable lua support. Other than that, Neovim uses ~/.config/nvim/init.vim instead of ~/.vimrc There's mostly no difference in functionality to an end user. Keybindings are the same, config directives are the same, etc. I personally use NeoVim.
@@TheEnde124 Its default settings tend to be more sane and less obtuse to modern users. Vim tries very hard to keep the same experience as back in the 90s, so you need to change a lot of settings to make it user-friendly in 2020.
Fireship's ability to teach me things in minutes the same thing I've learnt over years of trial and error only makes me conclude that there aren't enough good souls that could make you a manual of "how to get to speed" on any given tech topic.
I tried to get into vim multiple times. The thing is, I'm way too used to VS code default editor, and I feel I would have to relearn a lot when I can already do very powerful stuff with the default editor (multi cursor, copy paste lines, replace all instances, etc)
I’ve tried the VSCode Vim plugin, and to be honest I wasn’t impressed. IDEAVim is spectacular and works very well with the IDE. It even properly emulates Vim’s asinine regex syntax instead of just sticking JS regexes in vim commands. Yes, the syntax is objectively horrific, but I’m used to it, so the VSCode plugin tripped me up every time.
EidosX I was like you, I knew Atom code editor inside and out, used it over 4 years... But after what happended to Atom, I decided to jump into VIM. You will see my point of view when VS Code will disapear and go under in the future... You will be in my shoes and see how it feels, and then you will get it why people learn VIM.
the replace all syntax is pretty terrible, but copy-pasting lines and multi-cursor usually end up faster once you're used to the keybinds. I have keybinds set up to automate the shitty search-replace syntax, it's bound to "s" to replace the current word across the whole file.
I have yet worked with a coder who spends the majority of their time with their hands glued to a keyboard. Often times, it's best to take breaks to get better inspiration, or to not get stuck in a rut. Plus with most coding cycles, it's not about how fast the code is written but how well it is, so just because you're glued to your keyboard and you're pumping out code fast doesn't mean that it'll be good code.
@@crackwitz it's about having consistency in your keybinds. If I know how I can find and replace or multiselect in vim, I can do it quickly in every text editor that supports it
one mode I like is replace mode using the 'r' key, since I can copy some code then use replace mode to make slight changes rather than repeating backspace.
I just started learning to code a few months ago and I always wondered why sometimes my VS Code would let me type and other times it wouldn't. Turns out the Vim extension was installed somehow, I have no idea how.
Back in 1995-96, Linux (Slackware) came on a magazine cover CD with essentially no instructions, and I had essentially no *nix familiarity. It took a week to find the command to delete a file, indeed I'd managed to get X running (back in the days of Xconfigurator and a text config file of scan frequencies and so on) before that. My original solution to getting stuck in vi was Ctrl-Z to put it in the background (I discovered this via the ubiquitous mash every key algorithm). Then trying to exit the shell caused an error 'jobs still running'. From that I guessed the command 'jobs', and later via 'man jobs', I discovered 'jobs -l' and then 'kill -9', and finally I had an effective way to get out of vim. Years later, when there were tutorials on the net, I took the time to learn it properly, and now, along with VS Code, it is my main editor.
Another unmentioned perk of vim (and other terminal based editors I suppose) is being able to easily edit files through remote sessions. This is invaluable for doing maintenance on servers. I have a bunch of different headless raspberry pis on my home network and a few different friend's networks that I administer completely through my terminal.
I respect and admire those who’ve put in the time to learn vim… but any good IDE has remote debugging/SFTP editing built in. For the rare occasions I haven’t had an IDE to hand, nano gets the job done with almost zero learning curve 🙃
@@rcnhsuailsnyfiue2 It has its limitations. I mostly use VSCode for my job editing code on a remote VM since I have to have a bunch of different files open at the same time. Vim keybinds are still nice though.
I scoffed at vim for years before I decided to watch how people actually use it. When it finally clicked I felt that it’s kind of crazy that its way of working with text didn’t grow beyond just one editor. Turns out vim is actually good enough for other editors to be converted with plugins to behave like it.
Rather than starting by creating an arbitrary amount of empty lines, just learn the ‘o’ key to insert a new line and enter insert mode. and learn ‘dd’ to delete the current line.
For some reasons i find vim editor is a bit harder to use than other editor but i really love its key bindings feature. Vscode + vim key binding = AWESOME.
Back when i was studing SO management when a teacher asked to send a screenshoot of the cat of an output or an edited /etc file to correct our absolute messes, i learnt fast that sending an screenshoot of a file open on Vi instead cat, earnt easy points with them. I was reluctant to swap from nano to vi until my eyes started to get tired all the time, so i used vi for the silly reason "it has colors" and little i knew that it was quite a legitimate reason on the big picture.
I've been using vim for a year now, mostly because I don't know how to exit it.
you just power off your computer, else there is no saving you
Old
:!sudo rm -rf /
@@spicybaguette7706 lolmao
@@spicybaguette7706 jokes on you, I use doas
100 seconds prolonged to 12 minutes because he couldn't exit it.
I realized 1 minute and 11 seconds into the video that it should be almost done now, and saw that it's 12 minutes long.
Vim improved my productivity a lot.
Now I can get compile time errors way faster than before.
lmao
Fail faster, bro.
fail faster learn earlier
And more, if you type before thinking, I spend way more time thinking than typing, especially with snippets
@@danielrdrigues My greatest thoughts while coding happen when I bust out the pen and paper to evaluate my design before I code a logical error that is impossible to debug. Either you catch the error while designing, or you easily catch where your code doesn't align with your sketched design.
“You might find your self in vim with no way to escape”
You just described every interaction I’ve had with vim ever.
esc, colon. then q if you've made no changes, wq to save and quit, q! to force quit without saving.
Every time I think I have sent a file to nano and it winds up in Vim. And I inwardly sigh and curse the terminal Gods.
@@SomeRandomDude821 i use ctrl z.
@@kshitijrajgude Then vim will still run in the background. Type fg at the shell prompt and it will be back as you left it.
@@achimwasp holy shit no fucking way
What's funny is how many upvotes on stackoverflow the question of how to exit VIM has (4k+).
The big question which comes to mind is: How did they get there when they were locked in the console? 🤔
@@Squee7e They are asking for a friend
@@Squee7e through their mobile phone
@Kanashimi Or be like gnu nano and use CTRL + X to quit and then a prompt for saving
@@Squee7e they used vim to ask the question
What is being referred to as "command mode" in the part after the 100 seconds, is actually called normal mode. Command mode is what you enter when you hit colon ( : ).
exactly
yep, this was a mistake in the video
read the documentation. :h command-mode. command mode and normal mode are synonymous. you’re talking about command-line mode.
Hitting colon is pretty uncomfortable for all participants.
(I'll make my own way out...)
I love how he uses the VS Code terminal to demonstrate it.
I knew that would get called out, but did not expect it so quickly
@@Fireship 😂 hey I currently want to purchase your courses. Will I access everything previous such as Flutter and others if I subscribe this month for quarterly.? Are they downloadable? I'm new to your platform slack but haven't purchased a single before. Kindly help
@@Fireship why didn't you use the vim extension for VSCode? Edit: I didn't finish video
To be fair vim for VSCode isn’t always 100% working with key bindings. So it’s fine to use vim in the integrated terminal
@@Fireship Why are people so orthodox with editors like emacs and vim? . Why not encourage the use of vscode itself? .Vscode would have saved hours of time for most of the users even with less experience.I don't think outdated editors like vim / emacs would have made a difference even if it didn't exist today.
Title: 'Vim in 100 seconds'
Me: sees that the video is 12 minutes long
Also me: *something's wrong, I can feel it*
@@emacsfanatics4939 Opinion
Ikr, had to rewind the page to be sure.
Imagine if it took him that long to figure out how to exit Vim.
Actually, most of that is the Beyond 100 Seconds, the 100 Seconds part ends at 2:18. That's STILL around 38 seconds off 100 seconds.
It's this feeling I've got
The beyond 100 seconds part has less information than the 100 seconds though...
Someone had to say it, I love Fireship's videos because of how dense in knowledge they are. Whenever he brings out a guest they always move at a glacial pace in comparison, which is fine, but it's not Jeff's style at all. Feels like I'm watching someone else's channel.
I think the same and in my opinion it kicks me out of the flow when the 'master' (at their topic) talks slower or not precise!
Don't get me wrong, it's still great content but it was better when he made the videos all himself. I also know this is a lot of time and work especially to keep up with his information density throughout the whole video
vimtutor and :help user-manual is all anyone will ever need.
Small tip: you can also navigate to line numbers via {n}gg, where {n} is the line number you want to go to (ie. 5gg). Alternatively, gg goes to the first line, and G goes to the last
{n}G does the same as {n}gg
I had to pause for a second when I read this because I've always done it with G
I used vim in 2005 for the first time in Linux and used CTRL+ALT+DEL to reboot the server to get out of it 🤣🤣🤣
`killall vim` ;) on another console
sudo rm -rf / also works
@@spicybaguette7706 I was a total noob back then.
@@spicybaguette7706 rm is fancy, but won't actually terminate the vim process, CTRL+ALT+DEL is still needed for full effect :D
@@spicybaguette7706 That's a dangerous joke. Someone might actually try it.
I like how in the "Without Vim" example he does the editing extra slow and tedious so that the vim method is faster xd
yeah lmfao people who are even somewhat capable can edit code as fast as vim
Yeah, I like how in the with vim part he even had a typo and without vim he did all perfect
@@egg-mv7ef Sure, show me a common way to do something like
cs'" -> Change surrounding single quotes to double quotes
ci" hello! -> Change stuff inside quotes to hello!
People who are somewhat capable to quickly edit code use some sort of modal editor. Everyone else thinks they edit code as fast, when in fact they don't. You don't even have a quick way to do what vim macros do. Hell most people have a tough time joining multiple lines, when in vim you can just use J.
Vim acting is faster for editing but can be slower for writing. But visual vim (idk what its called. Vim gtk? Not sure) lets you do stuff with the mouse as well
> _"visual vim lets you do stuff with the mouse as well"_
@@loonathefoxgirl6375 the "visual vim" u are talking about is called gvim (graphical vim) - i have tried that, but it ain't a very good piece to use. i couln't figure out how to save settings in it. like font size or even what are the shortcuts to zoom in it
Fireship really has become a learning brand
and a learning meme
"Everytime you touch the mouse your productivity decreases"
Me, a long-time FPS player: Ha !
OSU players:
Next : Linux in 100 seconds and beyond
I have a variety of linux videos planned, too much to cover in just 1 video.
@@Fireship wohooo i can't wait, i'm really excited about it 🔥
Linux in 100 seconds or less
@@Fireship How about Windows in 0 seconds?
@@noahnolte7288 😂 blue screen
I'm a hardcore vim user and was literally just telling my friend that I need a text editor alongside vim which is better in YAML and XML editing, previously I never needed to edit files in those formats.
I think that this configuration is exactly what I was looking for! Thank you!
I've used Vim here and then. But just in general for the way I write code I've never felt using a mouse was a bottleneck. I understand people who like it though. There's a certain charm once you get into the swing.
HOW DO YOU GET INTELLISENSE?
i don't even type 50% of my code. I type the first two characters and intelliJ finishes off the line. Is this even possible with vim?
@@brianevans4 Yes. At least with neovim there are a variety of LSP plugins available. The most common one is coc. It's not the most trivial thing to setup, but it works pretty well.
But even vanilla vim has some basic completion functionality by using Ctrl-N or Ctrl-P keys, but it only matches raw words.
@@brianevans4 yeh ... just use coc
Yes it depend on workflow. When writing a python script it can be tedious to use mouse just for going to a line for indentation or simple fix.
yeah, my brain is the bottle neck when it comes to code
The biggest advantage of vi/vim over every other editor is it's incredibly powerful text processing (which by the way you can apply from within a session or via a command-line if you're running via batch).
Imagine beeing so fast at coding that you have to worry about the delay of touching your mouse... 😅
Edit: Wow thanks for all the likes!
THIS.
This.
This.
@@deepanshu1955 sure! I love it too! I‘m using it because I am working a lot with embedded systems which do not have an UI. 😃
i guess if you don't touch your mouse you will be much faster anyway
The guy who created vim just died. Rip
The creator of vim just died. Rip Legend.
I'm loving this series beyond 100 seconds, keep it up 👍 , VIM really make your produtivity spikes, like 10 seconds per day, it's incredible.
no, it's not 10 seconds a day. it's 10 hours a day LOST in learning this whole vim-fu acrobatics and repeating commands and keybindings.
Then it's 10 more hours a day lost on getting verbal revenge on others humiliating them for not using vim.
4 hours are left to play VimBeGood, Vim Adventures and Nethack and trying to understand why the J key has a touch typing marker on every keyboard and not the H key...
@@linuxrant what you're describing to me sounds like a skill issue to me
@@linuxrantYou do not understand! Using Vim makes you unique compared to those puny basic IDE fools! I gotta feel special to code efficiently, daddy issues seeping in.
@@linuxrantBro is spitting facts
Another pro-tip that I one used and since never went back: wether you use VSC or IntelliJ (and stuff): Disable "multi tab" so only one tab is displayed and learn the shortcuts that show you the last files you opened (CTRL + E for IntelliJ) and to search for files / classes. That somehow forces you to use the keyboard much more often, because using the mouse becomes so painful with just one tab. And in the end it boosts your productivity by A LOT! Thank me later 😉
fun fact: the 'hjkl' mapping for vim is surprisingly similar to the arrangement of arrows in Dance Dance Revolution, which is always typically Left, Down, Up, Right.
Dance dance revolution came after vim btw
And many early rogulikes including but not limited nethack, angbane, DCSS etc has the same key mapping
@@aravindpallippara1577 interesting to know.. what do you think is the real origin to 'hjkl'? did it all come from vim? or somethin else entirely?
@@cindrmon
HJKL They keep your right hand in middle center of the keyboard.
It is all about being in 100% control all the time.
And having bleding edge efficiency
@@limitless1692 yea true
Next: use DDR dance pad to control Vim
You should note that a and A are separate commands. I have met people that thought the command to append to the end of the line was shift+a, which it is not.
An interesting side effect of learning the vim navigation keys that I've noticed is that you start to notice them all over the place. They work on Facebook and twitter for navigating your feed for example.
what do you mean, how else are you supposed to type "A"??
@@samuelwaller4924 I'm not sure what Daraul meant but, interestingly, vim doesn't care what keys you type, but rather what character is being typed to the terminal. Yes, typically Shift+a will result in typing 'A', however if you happen to have Caps Lock enabled, and press the 'A' key without shift, vim would recognise it as user typing uppercase 'A', so it would appending to line ending. In this scenario using shift would actually result in regular mid-line appending.
As a result, if you have different keyboard layout, you would use different keys to do the same thing in vim.
❌Point mouse to your target word near-instantly with precision honed from years of hand-eye muscle memory
✅Spam up arrow until you get to your line, then spam right arrow until you get to your word
The speed thing is mostly a myth. Some inputs are faster with a mouse, other a keyboard. Use the right tool.
That’s why the arrow keys / hjkl are actually not used that often in Vim. There are almost always better ways to precisely move the cursor where you want it.
It's more about eliminating the hand movement of switching between keyboard and mouse.
I have been using Vim on my own, and while I wouldn't consider myself fluent, just being able to delete or yank lines without touching the mouse has made editing text files much faster.
shift+arrows -> del It works in every redactor.
@@oberguga you mean ctrl shift
@@fredrikmudas no.
Hold shift and use arrows to select text, then del it.
@@oberguga On vim it's (also ?) v + arrows to select, then y to copy, d to cut, s to delete (but it makes it enter insert mode too, so there is probably another way I never bothered to look up for).
I started trying to use vim emulation this week and 'L for right' is the best way to describe my experience so far. It's great when it works out, but damn some of these keybinds are alien
maybe he should have said L for Last
I play videogames in the ijkl format so this confused me for a bit.
I think that K will take me down and J will take me left. I will take me up.
But L is the exact same so I never had trouble with that key. L is always right.
I feel like remembering them relative to the up/down keys is easiest, if you already know those.
(J/down is easiest because its your index finger and has the haptic bump on it)
then H is *left* of those keys, and L is *right* of those keys.
@@jonathanlevin7660 Wait haven't I seen you before??
@@keshi5541 uhh, maybe? 🤷🏻♂😅
I have used vim fulltime as a cs student for the last two years, and didn't know about +p. Just goes to show vim is a bottomless learning experience.
Do you know about gf or gd? Lol
My personal favorites:
ciw - change inner word
cs - change surrounding to
ysiwtp - add surrounding html tag to word under cursor
The last 2 require the surround.vim plugin
@@dandandrorivolleyball using vim for html is like shooting an ant with a tank
@@Chiny_w_Pigulce lol yeah haha. I dont write html as is though, i write React which uses jsx which is html-like syntax so its basically javascript, html and css (with styled-component library) all in one file :)
you can also use shift+insert.
Do you know how to copy (ctrl+c) in vim without using the mouse? I don't
This video taught me the basics of Vim; and now using as my main text editor ever since!
Hi, you are in luck if you haven't progress further from basics because I recently made a Vim Tutorial Playlist. You can become Master of VIM by watching my playlist in 2x mode. I tried to cover most of the topics in smaller digestible chunks/parts.
There's no shadow of doubt that using or at least getting your muscle memory of vim key bindings will go a long way. I myself learned vim when I was 22 years old. My first task was to master a text editor rather than any programming language lol It took me almost 6 months.
Check my playlist, Hope you enjoy it. ruclips.net/video/SirSctawUVQ/видео.html
vim is indeed like an instrument, it'll take a long time to get good at it but once you do it becomes a really fun hobby.
If you don't care to remap , works as well and is a bit more convenient to hit than - at least for me.
Hah, I wish the limiting factor of me releasing software was letting go of the mouse / not typing fast enough
some good vim commands. cw = change word. ct[letter] = change to letter. dw = delete word. dt[letter] = delete to letter. ~ (tilde) = toggle the case of the letter and move to next letter (hold to do entire string)
I've been using Vim for the past 2 months and I'm really enjoying it 😄
0:03 Keyboard is a AJAZZ K500 model sold by FirstBLOOD from China, it's a niche model (if I don't say so myself, highly recommended w/ Cherry MX Blue switches!)
Vi and Vim have a lot more advanced commands, but 2 I wanted to point out since he was using I and Escape to get to the beginning of a line:
Shortcut to go to the beginning of a line without entering Insert Mode: ^ (Shift-6 on a US keyboard).
Shortcut to go to the end of a line without entering Insert Mode: $ (Shift-4 on a US keyboard).
Note ^ jumps to the first non-blank character, while 0 (zero) moves to the beginning of the line. Subtle difference.
After this video I got some enthusiasm to dive in Vim. Took a Vim course and now I feel comfortable with it)
Keep on learning! Whenever I feel like I know enough vim I come across something new that makes me go ‘I could be doing THAT this whole time??’ There’s so much gold in :help alone!
"you're no longer a soydev..." I know which channels you're watching lol
Which ones? What's soydev?
@@flamendless Luke Smith
Please don't r/whoosh me
_bald man screaming to his selfie stick in the woods_
@@flamendless From Urban Dictionary, here's the best explain about soydev I can conclude so far: Soydev are basically devs who use GUI for everything in their work, from editor to other things, and never touched to something like Vim. They are very common in the "Silicon Valley" (I'm not 100% sure about this).
Default RuneScape character
The best thing about vim is that I can edit vimrc to create my own key bindings and install only those plugins that I really use in my day to day life.
The worst thing about vim is that it takes weeks to find plugins that I want to use and learn how to create your own key bindings
Vs code can do both of those things
@@rosslewerenz9360 Yes but I think it's the other way round. In Vim, there are no extra plugins installed and you have all the freedom to install only those plugins you will need. In Vs code, you have a lot of uninstallable features and telemetry trackers which slow down vs code in comparison to vim. Vim's load time is almost unnoticeable while it takes time to load vs code.
On the other hand, it's very difficult to find good plugins for Vim, and sometimes they do not even exist. For example, there are hardly any good plugins for Java development on Vim. And it's not as easy as clicking the download button to install those plugins. But vs code has an excellent marketplace and it's quite easy to find extensions as their search option is quite good as well.
Vim may be handy if you have
this. the short comparison was clearly either recorded by someone who has never used a normal IDE in their lives, or it was specifically made to make normal VSCode look slow.
take your guess.
My favorite part is 2:40 as comparation of perfomance.
In VS Code he is using slow mouse with one missclick and other useless clicks instead of ctrl+delete and ctrl+backspace.
I can't imagine any case Vim can fight IntelliJ IDEA products.
I’ve been using Vim in VS Code for almost a year now. I now can’t imagine coding without it.
👏VIMTUTOR👏!!
The best way to learn vim is by running 'vimtutor' in your terminal. Its a tool which will go over basically all of the built in features of vim by actually having you use them. When you're new to vim, doing this a bunch of times will familiarize you with the shortcuts very quickly.
Cool video, but I feel like this has to be mentioned.
I also like "boost your coding fu with vscode and vim" (google it; it's free)
Basically all the built in features of vim...... HAHAHAHAHAHAHHAHA YOU FOOL
@@CaptainWumbo care to explain?
Mnemonics I use if they help:
h: home (left)
j: jump (up)
k: kneel (down)
l: last (right)
Nice
If you install vim on your system, you can write 'vimtutor' as command and it has a brief but powerful introduction on vim.
R.I.P Bram (If you didn't know that, he was the creator of Vim and died on 3rd August 2023)
Literally everyone who opens vim for the first time:
Opens google -> How to exit vim?
thats why i use nano because the more familiar control c works
I almost cried the first time I accidentally vimmed into a file and couldn’t CTR-C out if it.
I didn't use google, I just turned off my computer.
@@fabricehategekimana5350 LOL
If you press ctrl-c in vim it tells you how to quit.
I found the With Vim / Without Vim to be misleading.
The "With Vim" side start with the cursor already at the end of the opening tag line, while the "Without Vim" is randomly in the middle.
If it was honest, the "Without Vim" would have used the mouse to select from the end of the opening tag line to the end of the closing tag line and deleted everything at once, it also require less accuracy with the mouse.
By the way, natively you can :
Navigate using arrows
Use begin/end to go to the start/end of the line (begin will alternate between before & after the indentation if you keep pressing it).
Use Ctrl+begin/end to go the start/end of the file.
Use Ctrl+left/right arrows to jump to the previous/next word boundary.
if you hold shift it'll also select.
All of the above work with multicursor.
Inser to toggle the input mode between "insert" and "replace".
With that knowledge, I find that Vim addon to be a waste of time.
Yeah, it’s really hard to make good comparisons for that kind of thing. I don’t doubt that you can use the standard controls to write quickly.
It takes quite a while to get truly comfortable with Vim, but I find it hard to live without nowadays. I absolutely recommend rebinding caps lock to escape. Contorting your hand to tap the escape key in the corner of the keyboard is unpleasant and slow as fuck.
I do find myself tapping caps lock on other people’s computers when I try to dismiss a dialog box or exit a field though, which is always amusing.
note for 'r', you can do shift+r to continuously replace characters, instead of just replacing one
wow, awesome!
Video: Vim In 100 Seconds [12mins]
*The classic vim trap has defeated this series*
NIce video! I also want to add, that if you practice blind typing, you can rebind movement keys from hjkl to your right hand home row (jkl;), which is much more convenient
That would mean losing ; for repeating the last movement, won’t do that for sure :)
You know.. what's stopping me from using my arrow keys? I can press the Home and End button to similar effect, and saving doesnt take that much time when you're spamming ctr + s every 5 seconds anyway
I love being a developer and enjoy programming, that's why I don't want my fingers glued to the keyboard in order to squeeze my productivity, specially for my employee.
Yah, totally.
I love Vim, but not because it "increases my productivity". I don't want to be programming 100lines/minute. I want to have fun and do the things right
I learned Vim about 2 years ago and I just can't code without it. Sometimes I wish everything had vim-like support.
4:13 kinda ironic that he would use the mouse instead of just pressing Enter to select the command, in a video about Vim...
My friends told me to start learning programming with some easy IDE and a beginner-friendly language like Python. So I choose Vim and started learning Assembly.
Also this functionality:
^ - to move at the beginning of a line without insert mode
$ - to move at the end of a line without insert mode
O - to insert a new line above the one the cursor is at and get into insert mode
o - like O but for the line down
w - to jump from next word to next word
e - like w but places the cursor at the beginning of the next word
b - to go back word by word
{ and } - to move up or down by paragraph/block
( and ) - similar to { and } but steps from beginning of block to end of block and vice versa
v - press it once and move your cursor to start selecting
Ctrl + E - to scroll down
Ctrl + Y - to scroll up
/ - is like your find functionality ( is the string you're searching for), after that you can jump form instance to instance with n (next) and N (previous)
there are also ways to have split screen with multiple files open and navigate through them, I don't remember how that's done.
Honestly, if Vim had autocomplication out of the box, I'd use it exclusively.
( and ) moves by sentences
One small hack is you can go to normal mode from any mode without directly pressing the esc(which is roo far)
Just press Alt+ any other key(except ctrl, shift, caps etc)
You can also make combination to use it more efficiently like
If you are in a middle of a line and you want to type in the next line, normally you would do esc + o
But what you can do is just press alt + o which has the same effect but more efficient
This works because pressing alt + any key == esc + that key
Or just remap CapsLock to ESC - jfj to ESC is a good idea too... or jjj
jj isn't a good idea - might want to type 'hajji' one day if seized by a desire to do a racism.
@@thestopper5165 actually its not a remap, works in all vim like editors like nvim without any mapping and configurations and the hack can be used in many ways to make more efficient. The above mentioned example is way more easy than to type jfj and then o to change to a new line. Not just o, any key can be combined with alt to create the effect of 'escaping and then typing the key'
alt + j/k to suddenly go down/up while typing
alt + p to suddenly paste while typing
etc
Thanks for this awesome video about VIM. I was wondering why you've not made any video on this topic so far. But finally, it is here. 😃😃
0:03 the keyboard is a Retro RGB keyboard sold by FirstBlood Gaming as Ajazz K500, comes in various Cherry MX keycaps. No bloated software is needed to use the RGB, it's straight plug-n-play out the box. Highly recommended.
Love ur beyond 100 seconds section of your vids :D Your style of editing is superior
0:48 NOOO! The easy way to quit is ZQ or if you want to write and exit it is ZZ
1:58 you don't have to write the filename you can simply use %
I just wanted 100 seconds, yet you still managed to make a 10+ minute video AND get me to comment on it....
You definitely understand your platform.
The plus register was a great tip, thanks! I use vim (in various editors) for most of my coding/typing and consistent system clip has been tricky 👍
It's *"+p* though - not just *+p* (for me it's remapped to leader-pp because that's faster and has no SHIFT, whereas "+p is two shifts).
Likewise, leader-yy is "copy selection to the system register AND to vim's standard *"* register", and leader-yc is "copy last command-line to *+* and *"* "
Remaps ftw.
I hate it when I can't hit ESC-ciw in a text box to replace a word - even with vimium installed.
EvilCorp's sites disable vimium by default, it appears.
Quick tip: turning a 2 into a 22 can happen on either side of the cursor. Works for 11,33,44 also. I'm not sure beyond that as I've been to aftaid to venture that far from home.
Using Vim has nothing to do with being a true software engineer (2:03). Also, most of the time is spent thinking about the problem not typing. Saving 1 second does not reduce the development time or cost (2:41).
@jeff pentagon When you have a such a big file, the first suggestion is to break it down into separate files for a multitude of other reasons.
But in case you can't because it is a legacy project or something, then you can use a variety of much faster methods to navigate:
1) the outline representation of the document that shows the symbols
2) CTRL+F to search
3) CTRL+G to go to an exact line number
4) using a bookmark extension
All of these are way faster than scrolling and scanning the code by eye.
0:42 *“…and at some point, you’ll likely find yourself dropped into vim with no way to escape.”* Yep! That, “get me out of here,” clip sums up my experience accidentally opening Vim. I switched back to Linux a few months ago after years of using just windows, and I got Nano and Vim mixed up. I realized my fatal error as soon as I saw, in stark contrast to Nano, the lack of a keyboard bindings cheat sheet at the bottom of the editor screen.
Thanks now i can't leave
title: Vim in 100 Seconds
also video: 12m long
he couldnt get out of vim for next 10 minutes
I like this beyond the 100 seconds approach. Please do more!
I am more comfortable using:
home / end button to change the cursor position to the end / beginning of the line,
ctrl + right / left key to change the cursor position to the beginning / end of the word
I wouldn‘t mind him not talking for 4 minutes about moving the curser
Exactly. He lost me at this point. I don't really see the benefit of VIM after watching this video, apart from running it in the shell to code on a remote system via ssh.
I mean, I would get it if the argument was like that he just prefers the experience of using VIM. Like some (including myself) like to listen to music on vinyl. But I don't see how VIM could increase my productivity. I hardly use my mouse in editors like VS Code.
@@linkndark yep unfortunately not a "great" video about vim, I guess :D a lot of great features yet not complex could have been shown (ciw, ca" { } ...).
I'm not convinced someone that is not using Vim would want to discover the tool more after the video!
Yeah, he didnt sell it very well
@@linkndark I chose vim because of the way it treats edits as transactions. If I tell it to change some text I can be sure I won’t accidentally lose some closing parenthesis or a semicolon or something like that and that gives me confidence. With other editors unless there’s a linter in place I often feel like I have to double check my work before moving on.
instead of
`:q!` use `ZQ`
`:wq` use `ZZ`
also worth mentioning:
`o`: new line below, puts you in insert mode
`O`: new line above, puts you in insert mode
`.`: repeats the last action you did
I loved vim for so long to abandoned and use emacs full time
I just love keyboard only apps
Neovim (Vim) is by far the best editor ever existing!
Vscode with the VIM plug-in is also great.
even after getting over the barrier to entry of learning vim, I still feel more comfortable using regular controls in VS Code
I will happily use (n)vi(m) if I only have access to a terminal though
What's the benefits of using neovim over vim?
@@TheEnde124 One big difference is that NeoVim has support for Lua plugins inbuilt. Vim does not have the same inbuilt, iirc you need to compile Vim with a certain flag to enable lua support.
Other than that, Neovim uses ~/.config/nvim/init.vim instead of ~/.vimrc
There's mostly no difference in functionality to an end user. Keybindings are the same, config directives are the same, etc.
I personally use NeoVim.
@@TheEnde124 Its default settings tend to be more sane and less obtuse to modern users. Vim tries very hard to keep the same experience as back in the 90s, so you need to change a lot of settings to make it user-friendly in 2020.
Fireship's ability to teach me things in minutes the same thing I've learnt over years of trial and error only makes me conclude that there aren't enough good souls that could make you a manual of "how to get to speed" on any given tech topic.
I tried to get into vim multiple times. The thing is, I'm way too used to VS code default editor, and I feel I would have to relearn a lot when I can already do very powerful stuff with the default editor (multi cursor, copy paste lines, replace all instances, etc)
I’ve tried the VSCode Vim plugin, and to be honest I wasn’t impressed. IDEAVim is spectacular and works very well with the IDE. It even properly emulates Vim’s asinine regex syntax instead of just sticking JS regexes in vim commands. Yes, the syntax is objectively horrific, but I’m used to it, so the VSCode plugin tripped me up every time.
EidosX
I was like you, I knew Atom code editor inside and out, used it over 4 years...
But after what happended to Atom, I decided to jump into VIM.
You will see my point of view when VS Code will disapear and go under in the future...
You will be in my shoes and see how it feels, and then you will get it why people learn VIM.
That's true. Only way to properly learn vim is to say "fuck it" and strictly use it for several weeks.
the replace all syntax is pretty terrible, but copy-pasting lines and multi-cursor usually end up faster once you're used to the keybinds. I have keybinds set up to automate the shitty search-replace syntax, it's bound to "s" to replace the current word across the whole file.
Quitting without saving and with saving being so similar, shivers my timbers.
I have yet worked with a coder who spends the majority of their time with their hands glued to a keyboard. Often times, it's best to take breaks to get better inspiration, or to not get stuck in a rut. Plus with most coding cycles, it's not about how fast the code is written but how well it is, so just because you're glued to your keyboard and you're pumping out code fast doesn't mean that it'll be good code.
Vim exists for efficient coding; not fast coding.
I swear this video was only 100seconds long, but then the dude came up and magically the duration increased
That extension is amazing. I only used the basic vim commands for when I needed to edit a file as sudo. Now I can use them in my main IDE too
Install nano. Nobody should have to suffer vi/vim.
@@crackwitz it's about having consistency in your keybinds. If I know how I can find and replace or multiselect in vim, I can do it quickly in every text editor that supports it
one mode I like is replace mode using the 'r' key, since I can copy some code then use replace mode to make slight changes rather than repeating backspace.
still can't say if he said "i am your god" or if he said " i am your guide"
VIM must've been made before they invented user experience
I just started learning to code a few months ago and I always wondered why sometimes my VS Code would let me type and other times it wouldn't. Turns out the Vim extension was installed somehow, I have no idea how.
Vim and all its emulations are malware.
The creator of VIM Bram Moolenaar sadly passed away earlier this month.
iR.I.PEsc:wq
these videos are my crack
Notice how in the example at 2:43 he types noticeably slower in the non vim example?
"Now like any good developer we need to copy and paste code from stack overflow"
Me : Oh yess ! Thanks for complementing I'm a very good developer. 😂
Back in 1995-96, Linux (Slackware) came on a magazine cover CD with essentially no instructions, and I had essentially no *nix familiarity. It took a week to find the command to delete a file, indeed I'd managed to get X running (back in the days of Xconfigurator and a text config file of scan frequencies and so on) before that. My original solution to getting stuck in vi was Ctrl-Z to put it in the background (I discovered this via the ubiquitous mash every key algorithm). Then trying to exit the shell caused an error 'jobs still running'. From that I guessed the command 'jobs', and later via 'man jobs', I discovered 'jobs -l' and then 'kill -9', and finally I had an effective way to get out of vim. Years later, when there were tutorials on the net, I took the time to learn it properly, and now, along with VS Code, it is my main editor.
Another unmentioned perk of vim (and other terminal based editors I suppose) is being able to easily edit files through remote sessions. This is invaluable for doing maintenance on servers. I have a bunch of different headless raspberry pis on my home network and a few different friend's networks that I administer completely through my terminal.
I respect and admire those who’ve put in the time to learn vim… but any good IDE has remote debugging/SFTP editing built in. For the rare occasions I haven’t had an IDE to hand, nano gets the job done with almost zero learning curve 🙃
@@rcnhsuailsnyfiue2 It has its limitations. I mostly use VSCode for my job editing code on a remote VM since I have to have a bunch of different files open at the same time. Vim keybinds are still nice though.
@@jonathanpritchard6464 I’m spoiled by JetBrains, but appreciate everyone has what works for them 👍 What’s your line of work?
Just wanna say that "ZZ" in normal mode is save and exit, and "ZQ" is exit without save.
No need to go into command mode for that
I don't really see a point to use the vim (emulation) extension when there's a neovim extension that has a complete neovim in the backend.
Thank goodness I learnt about the key repeat - cheers for addressing that first in the beyond segment
I feel like in 2021, using Vim says "I started coding before you were born"
I used to think that too. Try it and most likely you'll be surprised how much time (and machine resources) you can save.
I scoffed at vim for years before I decided to watch how people actually use it. When it finally clicked I felt that it’s kind of crazy that its way of working with text didn’t grow beyond just one editor. Turns out vim is actually good enough for other editors to be converted with plugins to behave like it.
@@byakka Or its because they want those developers to start using it, and having an extension that accomplishes that is beneficial.
Rather than starting by creating an arbitrary amount of empty lines, just learn the ‘o’ key to insert a new line and enter insert mode. and learn ‘dd’ to delete the current line.
For some reasons i find vim editor is a bit harder to use than other editor but i really love its key bindings feature. Vscode + vim key binding = AWESOME.
Back when i was studing SO management when a teacher asked to send a screenshoot of the cat of an output or an edited /etc file to correct our absolute messes, i learnt fast that sending an screenshoot of a file open on Vi instead cat, earnt easy points with them.
I was reluctant to swap from nano to vi until my eyes started to get tired all the time, so i used vi for the silly reason "it has colors" and little i knew that it was quite a legitimate reason on the big picture.