The mission-critical feature of this video is the display of the keystrokes in a large font. Well done.
@lanorothwolf21844 жыл бұрын
This is what learning how to tie shoelaces as an adult must feel like
@rivubardhan63763 жыл бұрын
Learning is just learning. Its nothing more than that. If you are ashamed of learning I would like to say go change your mentality.
@ayeansh3 жыл бұрын
@@rivubardhan6376 A Joke is just a joke. Its nothing more than that. If you are offended at a joke I would like to say go change your mentality.
@JasonGarcia243 жыл бұрын
kzbin.info/www/bejne/p37VmZdsZtFnfNk
@joefuentes29773 жыл бұрын
When I first discovered vim i thought something was terribly wrong with the program.
@oussamakhalfi17513 жыл бұрын
@@ayeansh xxx
@shreym033 жыл бұрын
2:10 Opening VIM 2:59 Exiting VIM 4:15 Save without quitting 4:25 Move with h,j,k,l 4:55 Going into insert mode 5:05 Going back to command mode 5:11 dd for delete line 5:40 Use arrow keys to move (not recommended) 6:00 G and gg for top and bottom lines 6:46 {,} to skip blocks of code 7:30 Using numbers to loop command 8:20 u for undo and redo 9:22 Cntrl+r for redo 10:05 yy for copying line 10:17 p for pasting line below 10:24 P for pasting line above 10:44 using dd to cut a line for pasting 11:24 use V for visual line mode to select lines 11:55 Do stuff with selected lines 12:15 o for inserting the new line below 12:45 O for inserting new line above 13:30 d+ to delete characters 14:55 w to jump forward words and b to jump backward 15:25 : to jump to specific line 16:01 0 for the beginning of the line and $ for the end of the line. 16:10 ^ for beginning word 16:40 W for jumping forward a word (ignore punctuation) 17:50 t+ and f+ to go to specific character in a line 18:22 % to go to specific block parenthesis 20:05 c+ for changing characters 21:01 D to delete from cursor to end of line 23:44 * to search for other instances 25:27 ; to go to the next instance of a character when using t,f 26:11 zz to center your page based on the cursor's position 27:10 a to insert from the right of the character, i to insert from left 27:36 A to insert from the end of the line, I to insert from the beginning of the line 27:52 x to delete a character which cursor is on 28:34 ~ to change the case of a letter 29:32 . to repeat the last executed command 33:01 r to replace a letter, R to go to replace mode 34:34 Commend combo to move a chunk of code from bottom to top 36:11 Commend combo to wrap a chunk of code 36:48 >> to indent line,
@shreym033 жыл бұрын
This is a great tutorial but since it is quite long I thought I'd note timestamps. If I missed something or I can word any of these better, let me know in the comments
@fokkedeboer23423 жыл бұрын
Underrated comment
@shreym033 жыл бұрын
@@fokkedeboer2342 thanks. I made it recently.
@mohamedirfan28163 жыл бұрын
This is really helpful bro, Thank you so much
@abdarafi3 жыл бұрын
I just manually searching the timestamp of the video if I forgot the vim command :( It's been 2 years up until and I found this comment is super useful. Finally! Thank you so much :)
@ajfromAZ5 жыл бұрын
You don't dig holes with bulldozers.
@StephenRayner5 жыл бұрын
Hahaha, yea but you know he means excavator
@abhinandanj81825 жыл бұрын
Never caught that. Lol though
@becausewin4 жыл бұрын
@@secwriteups completely lost it when he said this
@simopr094 жыл бұрын
he meant filling up a hole with a shovel or a bulldozer :p
@AlessanderEspinoza4 жыл бұрын
I came to the comments just to see if someone caught this.
@gonzalochristobal5 жыл бұрын
i tried vim before, and i looked into some vim commands, but watching them in action and with some use-cases is just way better for learning, of course i will not learn everything by the end of this video, but just knowing that those commands exists is so helpful thanks man!
@Loppy23454 жыл бұрын
I really wanted to watch this video, but I couldn't exit vim.
@ashishproc96364 жыл бұрын
Press ESC -> Then enter :q
@abhinabk82234 жыл бұрын
🤣🤣🤣
@arunavdey4 жыл бұрын
@henry stevens that is if you don't want to save your progress
@kevintlu4 жыл бұрын
👏
@MrREALball4 жыл бұрын
@@ashishproc9636 ZZ
@zeocamo5 жыл бұрын
if you want to format code select the code with shift+v and hit = to make the code perfect.
@Nathanwithz5 жыл бұрын
I like to use gg=G
@zeocamo5 жыл бұрын
@@Nathanwithz yes that nice to .. i map it to ,= in my vimrc
@lucianobarletta82834 жыл бұрын
I love this one
@reveluv88513 жыл бұрын
@@zeocamo nnoremap = gg=G is a better map as it returns you to your previous location
@zeocamo3 жыл бұрын
@@reveluv8851 ok, i got a almost like that too(i pickup a few things in the 18 years i use vim), but i was talking about a block of code here
@mflayer4 жыл бұрын
5:11 What you refer to "command mode" is callen normal mode. Command mode is initiated by pressing ':'.
@bawad4 жыл бұрын
that sounds right, somewhere along the way I got this mixed up in my head, thanks
@AA-jb5cs3 жыл бұрын
@@bawad you're a great humble guy
@stardreamse3 жыл бұрын
It makes it much easier with the proper names. Like also when you said “w” means save, then you can quit. “w” is for write, much easier to remember. And “f” and “!” takes you ‘on it’. First time watching this would feel like these characters are random. But you should instead say “f” will find in the line forward from your cursor, and as with most capital letter commands, capital “F” does the same thing but backwards from your cursor.
@nickr7533 жыл бұрын
@@stardreamse Similarly, the ‘t’ motion stops right before the character because it means unTil
@gnikdroy Жыл бұрын
"command mode" is "normal mode". You enter "command LINE mode" by pressing ":". Very common confusion.
@ablanchi5 жыл бұрын
The missing practical Vim tutorial! Fantastic video Ben!
@willd46863 жыл бұрын
Oh my God I've been barely touching what's possible. I might dedicate a 3 hour block of my day tomorrow to practice. I've been using vim for over a year now. I can't wait to use some of the things I'm learning in this video. I'm going to be so much faster. I didn't know about 't'. I've been only getting better as I Google things. Thank you!
@thedeveloper42075 жыл бұрын
I started using Vim because of you
@marufhasan93653 жыл бұрын
One cool thing I have learned recently that Crtl+C does the same thing as ESC, which saved me a lot of time when changing mode. Another thing is that you can jump to any line by typing 'gg'. That certainly makes navigation easier.
@MichaelSalo2 жыл бұрын
I'm surprised that gg behaves the same as G in this case.
@islapthebass3 жыл бұрын
Yeah, not sure what it is, but I think you're pacing for explaining stuff is perfect. You have a good flow without needless utterances. Not only that, but you kinda just get to the core + essential details without any of the needless BS. Thanks man :)
@yaseen.awazah4 жыл бұрын
24:21 "hah I was clicking with my mouse like a noob" xD
@kyteinsky3 жыл бұрын
well, you actually can: set mouse=ar
@glebdubs2 жыл бұрын
It's an hour long, and still incredibly dense with information. By far the best complete Vim tutorial I've found.
@alainterieur50044 жыл бұрын
my aim is to have enough skills to just remove my mouse driver and to use only my keyboard
@Titere053 жыл бұрын
Have you tried a tiling desktop environment?
@jamirvillarosa79243 жыл бұрын
unnecessary skills. browsing the web requires mouse. use a trackball or a laptop with trackpoint and you'll enjoy using mouse
@typedef_3 жыл бұрын
Not using a mouse in environments that were designed to be used with a mouse is like not using toilet paper.
@jamirvillarosa79243 жыл бұрын
@@typedef_ lol exactly.
@thinkthoughtthunk3 жыл бұрын
@@jamirvillarosa7924 Have you tried Vimium? You can't get away from a mouse everywhere, but for the most part you can.
@spikespaz2 жыл бұрын
"Alright I am going to be teaching you everything I know about Vim." What a good, promising way to start a video. Truly a lost art.
@frankie_goestohollywood3 жыл бұрын
Thank you for this!!!! I got stuck inside of Vim a few times and I never wanted to go back in there ever again ;-) I didn't realize until seeing these videos you made, just how fantastic it is - looking forward to learning it and using the vim extension for vscode to become more efficient. Now I'm not afraid to enter Vim.......for fear of getting stuck in an infinite loop...
@Guandjoy4 жыл бұрын
Great to observe your behavior, thanks. Things I've picked up here: - Esc binding; - Usage of `b`, `f`, `W`, `^`, `q macros`, '%' ; - `C` changes to the end of a line. - Block visual mode `Ctrl-v` seems compelling; - cVim plugin * Just recapping for myself :D And would like to mention: `S` - remove content from a line and switch to insert mode.
@bawad4 жыл бұрын
thanks, I'll give S a try
@Guandjoy4 жыл бұрын
@@bawad I just figured out that it works the same as `cc` :D But here is the thing which I found useful: `ciw` - change the whole word no matter where the cursor is; And one of many alternatives for `F2` and `CTRL D`: `/term-to-replace` => `cgn` => `new-term` => `.`
@yashmishra12114 жыл бұрын
Hi, Ben your video is commendable. It's even better than some of the more experienced people out there. One thing that I want to mention is that to delete a block of code enclosed within brackets d% can be used cause this will work even if there is no blank line separating that block of code
@Haqz172 жыл бұрын
Ben I am just letting you know my professor sent me here as a good tutorial for Vim. Congratulations you have made it!
@felipemellodosreis96532 жыл бұрын
Best Vim tutorial i saw on internet, and it's free. It shows many commands and some daily usage. Nice!
@colton35073 жыл бұрын
i cried at the macro. definitely going to learn and only use this
@sfoljatine0803 жыл бұрын
Great vimtutor!!! It would also be helpful if someone writes down list of all commands mentioned in this video. Just to revisit it to check if I forgot something important.
@nematjonabdulloev35685 жыл бұрын
Vim is a excellent text editor. It is like a whole new world of typing and thinking in text editors. I have tried a few sorts of them, such as NeoVim, SpaceVim. Now I am stick to SpaceVim. In my opnion it is more mnemonic-centric.
@desertsage68252 жыл бұрын
Been using Vim for at least half a year now, but there are still tons of things that I didn't know existed, so I've been doing a lot of things unelegantly. Thanks for showing the better methods!
@jordanb9363 Жыл бұрын
I would give this more than 1 thumbs up if I could ! Thanks Ben, really loved the refactoring segment to see you apply these commands instead of just showing what's what
@randomexodus19493 жыл бұрын
I don't know why your explanation just makes sense to me. Thanks a lot.
@victorglaviano3 жыл бұрын
You don't dig holes with a bulldozer, you dig holes with a backhoe!
@PaulSebastianM11 ай бұрын
T stands for Till, because it goes until it meets the character you specified. F is the opposite of that, as it goes Forwards [to] and stopping on the character you specified.
@HeitorYT3 жыл бұрын
1° time using vim: THIS IS DIFICULT 17392° time using vim: Just making my homework using vim
@REPOORTEHT2 жыл бұрын
My preferite combo is instead that for renaming multiple occurances of same word. Search word or go to word ------> *cgn ----> Write new word -----> Esc ----> Spam period until you have done
@Hassan-qn5gm5 жыл бұрын
I have learned a lot in one hour, that was awesome.
@stefanboehringer90583 жыл бұрын
Very nice tutorial on vim! I myself use emacs with evil-mode and that's a very nice vim emulator in the emacs eco system.
@YuanweiLao2 жыл бұрын
stopped at 30 min and that's enough for me now. Thanks.
@Ryu538984 жыл бұрын
Ct} can also be Ci{ (change inside curly brace)
@divinenature62204 жыл бұрын
will come back after i've learnt all the javascript frameworks :)
@QuiGonJam3 жыл бұрын
Ben, if you see this it would be beneficial imo if you used the chapter youtube feature to map the video timeline with the outline you set up here.
@QuiGonJam3 жыл бұрын
primary reason is I've come back to this video a few times
@nmnxe3 жыл бұрын
Nice video friend, got here by the mercy of youtube ai. personally use macros and block mode in refactoring C header files. Those are a total mess when doing. And I really love how you also align the starting and ending points between macros, that’s such a key tip to use every time that I can’t emphasise enough on. Final word, keep it on! This is a gem for beginners, to even know the thought process of programmer while doing it.
@ezekieeeeel3 жыл бұрын
Been two years. Awesome stuff. I wish I have heard of this sooner. Thanks, man
@ravasj3 жыл бұрын
Love how you give your own tips and how you use it too!
@StrangeIndeed4 жыл бұрын
Another shortcuts: ZZ - save and quit ZQ - discard changes and quit These have to be capital letters and you have to be in normal mode
@GHOST-dg5tk3 жыл бұрын
1:05 i think the shovel is faster at digging holes than a vehicle thats supposed to push things
@zinsy232 жыл бұрын
This is a very helpful video! It only took a couple hours tops before I became considerably more efficient with VIM than Nano because this was so well explained! I highly recommend trying out these commands as you learn them since watching this type of stuff usually doesn't instantly translate to getting good at it without actually doing it. Now that I've tried these things for myself, I plan to watch it without doing anything since I've tried everything now and I might catch a few missed details in the explanations. Personally, I recommend enabling relative line numbers because it makes it so easy and quick to jump a specific number of lines in the visible window. I created a .vimrc file in the home folder and added "set relativenumber" to it. I typed the "reset" command in the terminal to apply the changes, which I like to do for rc configuration files in general. I also swapped mappings for j and k since that feels more natural for me and restores my sanity. I added "nmap j " and "nmap k " in the .vimrc file. Note this won't apply to other modes like visual. I think there are other commands for that instead of nmap. This could be considered practice for VIM using that to modify the configuration file!
@CurtisDyer3 жыл бұрын
For me, the biggest game changer was realizing you don't need to use ESC to get back to command mode. You can use CTRL+C or, my preference, CTRL+[
@dpawensza2 жыл бұрын
The escape key randomly stops working on my kb, didnt know about this, very helpful. Thank you!!
@biomechanoid3 жыл бұрын
Here’s straight answer for 95% of people who opened that video - :q!
@muhammadmejanulhaque33054 жыл бұрын
Thank you so much fo rmentioning the last part of vs code and chrome extension...I really hate to touch mouse from typing keyboard....this video was really helpfull.... May Peace be Upon You...
@luqmanhamdan92853 жыл бұрын
I think Vim if not one of the most powerful text editor that many people underestimate.
@sam_music5553 жыл бұрын
Just for your knoledge: _you can move around also with arrow keys instead of hjkl_
@sam_music5553 жыл бұрын
@Average Linux User why?
@linuxlizard2 жыл бұрын
Thanks, Ben. The recording and macros are really useful !!! 👌
@FabricioLucianoCastillo3 жыл бұрын
At 17:37 Ben's computer being muted crying in pain.
@blendjams4 жыл бұрын
At 47:00 you could use daB to delete between the brackets including brackets. use i instead of a to exclude brackets
@owenwexler72143 күн бұрын
I’m giving learning Vim another more serious try currently. I get why they mapped movement keys to hjkl but I wish it was jkl; tbh because that’s literal years of muscle memory from both typo my and video editing that I gotta go against whenever I do hjkl but its cool I’ll get used to it. Vim Adventures, as head-through-monitor hard and frustrating as that game is, is low key helping a lot. Once I have Neovim set up to my liking and I’ve gotten at least semi decent with Vim I’m gonna try doing a small side project with just Neovim and a keyboard on my laptop without plugging in and without an external mouse at coffeeshops only.
@owenwexler72143 күн бұрын
Also obligatory: 2:59 OH MY GOD HE DID IT! 🙌🏻
@tuananhdo18705 ай бұрын
20:50 G 21:02 D delete to the end of the line 21:20 C delete to the end of the line and put to insert mode 21:40 ct} 23:43 * find 26:11 z focus the screen where your cursor at the center 29:33 . re does the last thing you do 36:08 O
@howtocyberwar8 ай бұрын
this is awesome! from an editing point of view, how did you track what you typed and added it in the video?
@notTh3Mag1c1an4 ай бұрын
Ctrl + Q for windows user. As there might be a conflict with using Ctrl +V as it pastes the last thing you copied instead of getting the visual block mode that you wanted.
@sspaeti3 жыл бұрын
That was awesome, really appreciated this video. Learned a ton. Thanks, Ben!
@webmaks3 жыл бұрын
More some beast features is "diw" - remove word in case your cursor is stay in the middle of the word, and second feature is regexp replasing via ":%s/old_value/new_value/g"
@fabhi3 жыл бұрын
You need a 5x option to watch Ben Awad's videos
@beckhamoregunwa9933 жыл бұрын
Can I still use this tutorial to learn neovim or is there too much difference
@jyachuo.org12 жыл бұрын
Damn I was just searching on how to exit Vim but thank you so much I will now pledge to the vim elitism and start becoming a vim elite myself
@zeocamo5 жыл бұрын
^ and $ is from Regex so it easy to remember evenyone know regex :)
@abhinandanj81825 жыл бұрын
I was wondering where this came from. I guess the creators did good by keeping this in mind!!!
@zeocamo5 жыл бұрын
@@abhinandanj8182 in the *nix world, people try to use stuff from each other, node file/dir commands is name from *nix programs for the same reason
@reveluv88513 жыл бұрын
Vim actually has it's own flavor of regex and you can use it to search words. So meaning regex is a good thing in vim.
@zeocamo3 жыл бұрын
@@reveluv8851 yes i know
@SogMosee5 ай бұрын
i recommend remapping { and } to shift+j and shift+k
@TiffanyNg1003 жыл бұрын
This will be my bible reading every night for next couple months
@rajarshivaidya4443 жыл бұрын
Five seconds into the video & I give +1 just for the clear audio. Very less VIM videos with clear audio on youtube.
@Marcsa199x3 жыл бұрын
Ben, why do you not use relative line numbers? Once I discovered them, it was a huge productivity/speed improvement in navigating vim.
@desertsage68252 жыл бұрын
Thanks for bringing this up. Never knew about this until now. What a game changer.
@edwardmacnab3542 жыл бұрын
For noobs , you should point out that the colon before q , as in " :q " , is to put vim into command mode , otherwise the q is just another piece of entered text , and if I'm not wrong :i should put vim back into text mode ?
@chandantk51353 жыл бұрын
Thankyou for such a wonderful video Found it really helpful I didn't know that vim editor could be so powerful it was something that I had never come across,keep posting such great videos 😀👍
@taulguedi6373 жыл бұрын
Finish! Thank you so much, Ben. I just want to see if I can become so good at Vim like I was playing Max Payne. Thanks again! :)
@yudianzhu86813 жыл бұрын
Now I know why others code much faster than me! Thanks!
@legionSpat5 жыл бұрын
you could use ^ for going to beginning of a line. And c i ) instead of c t ),
@simopelle3 жыл бұрын
How long have you been using Vim to reach your level of confidence?
@sanathnherath4 жыл бұрын
super awesome stuff. I think ,I am going to use VIM this time. keep it up. much love from Sri Lanka
@Ahmed-cy4jp3 жыл бұрын
This is so dope! I always hated the Macbook arrow keys, now I don't need them!
@cakeu3 жыл бұрын
> "Vim Tutorial" > Checks length > 1:04:44
@udemyaccount40822 жыл бұрын
0:30 I'm curious as to where the "it will pay off huge dividends over time" saying comes from. One thing I have noticed throughout people that are well-read on programming, is that we all start to cross reference the same books. Personally, I've heard you and Primeagen say things in this exact manner, "it will pay off huge dividends over the long term". I'm not saying that this had to come from somewhere, but if it did, I am curious to know as to where you read this. So that I can go read this as well. Thanks.
@froggy59673 жыл бұрын
Could you please share what keyboard that you use? It sounds really nice, must better than my Brown switch. Special the bottom out sound, it must be nice key caps.
@tertia00112 жыл бұрын
I prefer to dig hole with garden spade, not bulldozer. But I like Vim because it is a pure terminal-based text editor.
@anantgupta79163 жыл бұрын
Great video BTW Has anyone watched the preview of the video??
@Cons-Cat3 жыл бұрын
You can save and quit Vim simply with ZZ and ZQ to quit without saving.
@Ryu538984 жыл бұрын
It’s not allowed to use the arrow key in insert mode. This is really wrong in vim.
@RelianceIndustriesLtd4 жыл бұрын
sorry to let you know but the world is not the way you would like it to be
@fsociety31564 жыл бұрын
@@RelianceIndustriesLtd she's right though. nothing wrong with pointing it out; there's a reason for the split between normal mode and insert mode.
@kvebalas59314 жыл бұрын
It works well in my terminal. ¯\_(ツ)_/¯
@IgorogI10004 жыл бұрын
It works well in my terminal. ¯\_(ツ)_/¯ and i just use the arrow keys
@nobytes24 жыл бұрын
Is not optimal, sure, but it isn't wrong to each its own. But if you'd like to move in vim from the home row just remap arrow keys to nop.
@caiocaio13595 жыл бұрын
gg brings starcraft memories. LOL. Great video btw, didn't know vim and I'm already using it, thanks friend.
@bawad5 жыл бұрын
zerg ftw
@janglestick9 ай бұрын
great stack of commands chosen to get ppl up to speed and acting fluent with simple commands very quickly. I think this is the best one right now. it's ESCape ...ess-cape... not EX-SCAPE .. im sorry cant help saying it youre probably doing it on purpose anyway NICE DEKSTOP
@amitsharma59964 жыл бұрын
Thanks a lot dude... I’ve become a vimmer now
@bawad4 жыл бұрын
welcome to the club :)
@amitsharma59964 жыл бұрын
Ben Awad how about doing some deep node stuff like async and event loop videos?
@bawad4 жыл бұрын
maybe
@aymarfeed3 жыл бұрын
Really helpful! Thanks for existing :")
@ahmedschhaider47624 жыл бұрын
thank you really for this tutorial, This is really Cool, I tried it on windows and it runs very nicely, I hope you are OK these days, Take care, Best regards!!
@candlestickking113 Жыл бұрын
for navigating, how should our fingers be placed on h,j,k,l ??? Should I only use one hand for navigating??
@tibofordeyn1529 Жыл бұрын
Great and very clear video, thanks.
@ZoDoneRightNow2 жыл бұрын
Is there a reason that most people navigate with hjkl instead of arrow keys other than just being closer to everything else?
@thalescarl15893 жыл бұрын
Are you telling me that the guy who coded vs code stories gave a vim crash course?
@chihabahmed52072 жыл бұрын
any idea why the navigation are slow if I am using the terminal while they are fast on VSCODE ? I setup the key repeat and the delay until repeat on my mac but I would have press over and over to navigation instead of long press thanks
@HXYZZZ3 жыл бұрын
great job, this is an excellent video on Vim.
@kasabuckialexandr3353 жыл бұрын
Before watching this video I was scared by VIM. Thanks
@kokokoske68473 жыл бұрын
Dude, you are the king ♚ . Hello from Serbia !
@chiragsingla.3 жыл бұрын
I currently use Sublime Text just started watching this video let's see if I will change to VIM I am going to sleep for now
@Youshisu3 жыл бұрын
I watched only 10 mins, I admin this very good tutorial, I hope I will know how to leave insert mode at the end of it ^^ :D
@michalroesler3 жыл бұрын
Can You please tell what edit should be made in .vimrc to remap CapsLock to Esc key? Everybody talks about doing it, but no one showed exactly how to do this.
@rudrOwO3 жыл бұрын
at 53:57, why doesn't the regular insert mode (small i) work ? why must I use (capital i) ?
@joshbarros19953 жыл бұрын
Wonderful!!! Still actual on August 17th, 2021???
@someonehere43803 жыл бұрын
pretty much forever
@dragonek_gnu_linux_pl3 жыл бұрын
what a plugin u use to show what a key are u already print?