Vim Movements P1 - Your First Moves

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
all right hi my name is the prime Majin i stream multiple nights a week usually Saturday Sunday Monday and Tuesday 7 p.m. Pacific time I love vim vim is awesome vim is good therefore I'm going to share somebody to my common movements that do all the time for you to be able to turbocharge your vim editing it's gonna be amazing just just trust me jab is up in the window which means that it's time now I'm gonna do a quick break for a quick one second we're gonna jump over and people always ask how am I so fast and Finn so I'm gonna give you the one and only live update hold on if you're using vim what are some of the best ways to get fast first off rule numero uno do not use arrow keys just know you got a break to have it even in this keyboard this fancy-pants keyboard I have where the arrow keys are right here which makes it really easy for me to want to use them don't do it do not rely on the arrow keys you just got to drop it just drop it now it's gonna make your life happy you're gonna switch over to I 3 and it just all works right you can just keep on using all the keys you're familiar with with vim and it's gonna be glorious you can set up a bunch of your quick ways you hop around in vim mapping to the same keys it will just work fairly uniformly throughout a lot of programs on Linux if you just get used to it alright so next one get used to the idea so I've already kind of gone with this the JK and the H and the L you have to yeah you have to be able to use those they're not that useful like I never use HML like ever I definitely use Jin K much much more but definitely just get used to using them it is totally worth it just to get there you'll get your basic movements down the one the nice part about you is a hi YouTube up famous yes you are when you use this you'll start getting annoyed because you'll be like I need to get over and you'll be typing it a bunch this is good the annoyance is good lean into this this is where you'll learn your next command BMW right B&W look see I just did D B B is jump backwards by word dub jump forward there's our other fancy ones like a jumping I don't use e jumping over all those other ones it's I just haven't I just feel like it's just too fine-grain at this current moment for me to care too much and so W will just jump forward one word at a time and this depends I assume all vim has the same uniform jumping but I know that when I've used other programs which controlled arrow jumping it's been different I think in vim if you control arrow jump it's equivalent to W a so I'm using control and jumping so there are the equivalent type items that's the next one you'll like that you're happy that you're using it I turned it off so you can't try to get me with those things ah so now that you're using that J and K and W B you'll you'll be mostly fine with the movements but trust me don't stay there don't be just happy with that you got a move on you got to get faster the next big one that I really really like is F F and T are the exact same ones so F will jump to a letter you press T will jump one before the letter you press so say I wanted to get over to my type definition which as you can see I'm returning number number an array of two numbers so I could just jump over right to it by pressing F opening bracket that is very nice i I just love it it makes me feel warm and fuzzy on the inside I use it all the time in fact I use it in conjunction with % so let's say I wanted to delete this entire function including the comment right here I will press shift V highlight the whole line go down one with J press F opening squirrely brace which you can see my cursor right there and then I'll press % which will jump to the end of whatever is the enclosing item that you're currently on and so that jumps all the way to the other one so now I can just press D I get both the comment and the function get about of here so I just love those kind of combination of keys it feels so good so F and T is fantastic so back before I did CI for any my deleting inside I do DT closing brace right to clue delete everything within this array so there you go that is like one of my favorite little my little favorite items and I use it all the time even for jumping sometimes I just want to go to the bottom of something I will just use it as part of my jumping if I'm already on there I don't know why I just love the % because of how specific quickly you can use it so that is fantastic is the ft % WB and then your standard movements with HJ or h JK h and l so then the next good one is I actually use this quite a bit sometimes when I like to just scroll through trying to look for something because I don't really remember what it's named I just remember its shape like I know it's down lower I don't really know where it's at and so sometimes I'll hop around some people use control control D control you that'll jump a half like a half page at a time or you can use opening and closing parenthesis or squirrely brace to jump like a block at a time which sometimes I like the block jumping because I'm just like where is it I know you're around here and if I see just a little bit I can just jump to it in a couple strokes or I'll search jump to it right so the next one is just jumping being good at jumping is very important so if I wanted to go down to half height you can either do you know like you could do a couple presses a block jump and then you're effectively there or which is a little bit better is you can just search for it right that is much much much nicer so those tends to be how I jump around is either I used block jumping if I don't really know what I'm looking for I just know that I know the shape I kind of know what it looks like I just don't know where or what's in it I use that a lot just because I it's an easy time for me to just kind of process or think about what I'm trying to do and then if I know where it's at I'll use that type of jumping so that really gets me moving pretty quick and if you don't know about this V we'll start highlighting right and so if I you start using W after I'm in V mode or highlighting mode or visual mode you'll just keep on highlighting if you use shift V it'll highlight everything right it'll highlight whatever line you're on if you press Y you've cut it press P you paste it press shift P you pasted up a line that's very very nice chippie very fantastic and something so that's kind of like a you know I don't do that very often you can you can D delete it and then re paste it so I'm using shift P to put it up I don't use shift P I'll put it back down right so that's kind of how you do those two things and then I think my favorite I know this is a little bit jumbled and jumping around but my I think one of my most favoritest ones I never get to use is U so if you do shift you you will applies it I've only got to use it like four times in my life and every time I get the chance to use it it makes me so happy on the inside one more a couple like quick fun nugget ones that you just don't get very often that people don't explain to you control a alright so right now on this line there's a single number which is the number two right they're dividing the screen width by by two if I press ctrl-a it will jump to that number and increment it by 1 which is fantastic and so then if I do control X it'll bring it back down so I can go control X and count back or as I can cope control a and count upwards another good one that I use all the time when entering in is o which does a newline indents you properly or if you have the right plugins in which I assume me everyone has the right plugins and indents you properly and you get your cursor in your insert mode very very useful or shift o which will take your current line shift it down one and put your cursor in there that one is also incredibly useful I use it all the time it's odd how often people don't use those ones or jumping like another easy jump in insertion mode is shift shift I will bring you to the first character inside the inside this line and then into insert mode and then shift a will bring you to the last character in a line in insert mode also extremely useful please come thank you for the 30 gifted subs onto YouTube channel thank you everybody enjoy the David Hasselhoff let's just jump over to a quick David Hasselhoff type just accepting accepting place thank you Thank You B scale we will now enjoy well over five minutes of David Hasselhoff this has been a presentation from two extremely large hands just for you guys out there I hope that you enjoy them I hope that you love all the goodness of them I personally just find it fantastic like I said I stream three nights a week usually sometimes for 7 p.m. Pt time Pacific Coast time definitely I have super manly hands don't like a chat Chad doesn't know they don't know if they're talking about is just definite there's nothing up there that you don't even have to worry about uh yeah that's about it hope you enjoyed the video thanks for tuning in thanks for checking this out hopefully it is everything you've ever wanted and if it's not leave a comment down below tell me what I did wrong tell me what I did right tell me why I did do see iw Wow uh I mean I'm sure there's so many people out there that feel you know they just feel like
Info
Channel: ThePrimeagen
Views: 48,863
Rating: 4.9474773 out of 5
Keywords: software, vim, programming, javascript, typescript, software engineering, web developing, web developer, software developer, developer, cpp, programmer humor, humor, reactjs, js, ecmascript, tc39, Netflix, Engineering, Engineer, Facebook, Amazon, Interviews, Software Interviews, vimrc, neovim, spacevim, vim c++, vim editor, text editor, vscode, vscode vim, vim plugins, coc.nvim, autocomplete, vim autocomplete, nodejs, twitch, stream, developer productivity, spacemacs, emacs, YouCompleteMe, You Complete Me, bash
Id: nnhqVDIx-go
Channel Id: undefined
Length: 9min 35sec (575 seconds)
Published: Mon Feb 03 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.