Тёмный

Vim as your editor - Advanced Motions P2 

ThePrimeagen
Подписаться 364 тыс.
Просмотров 166 тыс.
50% 1

the full vertical goodness of vim along with some find and replace and a quick alternate use of vi*
IF YOU LIKE THIS, BETTER LIKE THE VIDEO BECAUSE I'LL TAKE THIS FAR IF THERE IS ENOUGH LIKES
Twitch
Everything is built live on twitch
Twitch : bit.ly/3xhFO3E
Discord: discord.gg/ThePrimeagen
Spotify DevHour: open.spotify.com/show/4MLaDrQ...
Editor
All my videos are edited by Flip. Give him a follow! / flipmediaprod He is also open to do more editing, so slide deeeeeeeeep into his dms.
Links
Linode: linode.com/prime
/ discord
Twitch: / theprimeagen
Insta: / theprimeagen
Twitter: / theprimeagen
VimRC & i3: github.com/ThePrimeagen/.dotf...
Keyboard 15% off bit.ly/Prime360 USE CODE PRIME360
Sections
0:00 Introduction
0:51 Two Quick Things
1:37 Deleting
2:53 Bonus, just for you
3:21 Yank Paste Dance
4:02 Why not Easy Motion?
4:50 Visual Mode Selecting Tricks
5:54 BLAZINGLY FAST Search & Replace
9:56 { and } -- A note
10:47 My Overall Motion Goal
11:20 PLEASE JUST LIKE THE VIDEO
11:43 SUPER SPECIAL, shhh don't tell plebs
12:40 ACKSHUAL OUTRO
#vim #programming #softwareengineering

Наука

Опубликовано:

 

16 июн 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 427   
@ThePrimeagen
@ThePrimeagen Год назад
Chief Edging Officer here. Real talk. Thank you so much for all the amazing support. I cannot thank you all enough. TRULY. You know everything I do is live on twitch? Where you can see me scream at you... BLAZINGLY FAST.
@noomondai
@noomondai Год назад
Thank you!
@nick_esqueda
@nick_esqueda Год назад
sus 🧐
@chamber3593
@chamber3593 Год назад
Thnx CEO of multi billion dollar startup.
@lastaccount500
@lastaccount500 Год назад
what do you mean ?
@NostraDavid2
@NostraDavid2 Год назад
Really cool
@powerslave12r
@powerslave12r Год назад
Love this series. Please keep em coming! Blazingly Fast. Love the laterally inverted plaque lol.
@ThePrimeagen
@ThePrimeagen Год назад
WE ARE TRYING
@powerslave12r
@powerslave12r Год назад
@@ThePrimeagen I shall send some coconut oil if it helps.
@amlanjyotilahkar1451
@amlanjyotilahkar1451 Год назад
the only person whose videos single handedly inspired me to dive deep into vim, learn some of the unusual stuff and gradually get good with it, congratulations to you prime for the 100K and also for these BLAZINGLY FAST contributions to the vim neighborhood. Keep the coconut oily movements coming!
@relax4o
@relax4o Год назад
Always watching until the end of your videos... there are just way too many priceless scenes that cannot be missed. And the purposed content is amazing as always. Great job, man. Also, congrats on the 100k and the plate. Deserved it!
@singularisart2491
@singularisart2491 Год назад
This is actually insane. I've been with you since 9k subscribers and it's amazing seeing how much you've improved! KEEP KILLING IT PRIMEAGEN!
@alfredoortega4933
@alfredoortega4933 Год назад
You ALWAYS have something new to show about vim, I am very impressed... every time I see you, I have got something amazing and blazingly to learn!
@gideon1884
@gideon1884 Год назад
Love the o tip for moving the cursor in visual mode. Another nice one to have is gv to reselect previous visual area
@kleanse
@kleanse Год назад
I was going to mention the “gv” Normal-mode command too. It’s very convenient after you made a mistake with Visual mode, such as selecting one line too few or too many as ThePrimagen did at 9:00.
@brick4667
@brick4667 Год назад
So glad you're doing this series. Your video on 'g' was the first of yours I watched and was blown away how f***ing entertaining you were. Not sure this would be vim-specific but it'd fit nicely in this series... a Regex series for things like the fighting kirby and any other oddities that go beyond the basic blob operator
@loeschg
@loeschg Год назад
have a link handy?
@nodidog
@nodidog Год назад
You can gp instead of just p to move the cursor to the end of the paste (rather than having to manually navigate). Works with P too, using gP
@calder-ty
@calder-ty Год назад
What I love about your vids is that they aren't pretentious "10 vim commands you don't know", but show so many cool tricks I've not used before. Almost every other video out there is the same 10 commands, probably all sourcing the same medium article on "obscure" vim commands.
@ernesto906
@ernesto906 Год назад
I finally started to using vim because of this series, this video is the first one that I have to "study" because IMO is the high level stuff, Keep the good work!!!
@jamesgourley2239
@jamesgourley2239 Год назад
This series is what I have always dreamed of. Thank you for doing this. The fighting one eyed Kirby is a game changer
@itshassanaziz
@itshassanaziz Год назад
Best vim course by far, you really dove right into it. Also everything is so fast haha, need to rewind 10 times to see what you just pressed, but it's amazing seeing firsthand just how fast a true Vim user can code. I'll keep practicing and hopefully will reach that level as well soon.
@tandlose
@tandlose Год назад
@ThePrimeagen best thing i did to my config was making w => e while in operating and visual mode. If you think about it, you almost always want to use w (include space) while navigating, but use e (exclude space) while performing an operation. So this mapping just combines the two with almost no drawbacks
@ustongs
@ustongs Год назад
I just found you and I feel soooo goo bc I already knew every single trick showed heere, I feel so proud of me 💌you are such an inspiration, keep goiing!!
@juanmacias5922
@juanmacias5922 Год назад
Bruh, your Vim videos are so mind blowing, looking forward to coming back and actually understanding half of what you did in this video lol
@dannelalbert7111
@dannelalbert7111 Год назад
I've learned more new things about vim in the last 10 minutes than I have in months. You're a beast primagen lol. Please keep this series going!
@ThePrimeagen
@ThePrimeagen Год назад
you are welcome ^^
@evadeflow
@evadeflow Год назад
Felt compelled to comment again after watching all the way through. Please make more of these videos! 🙏 This one was hella useful. I already have the muscle memory for the individual steps you showed in this vid, but just hadn't quite figured out how to string them together to assassinate the repetitive little manipulations we do all the time (like your example of setting the elements of that `data` array).
@ThePrimeagen
@ThePrimeagen Год назад
It feels so awesome when you get to it all together
@sergmont
@sergmont 5 месяцев назад
I cant believe people actually work like this, this is incredible. I'm taking the leap of faith into believing this is worth ti
@joshuaward4725
@joshuaward4725 Год назад
This series is awesome. Learning new vim tricks every episode!
@ThePrimeagen
@ThePrimeagen Год назад
:)
@ThePhiliposophy
@ThePhiliposophy Год назад
You are the only RU-vidr where I need to turn the playback speed down to 0.75x. I watch most tutorials at 1.5x. Blazingly fast was an understatement, dude. Anti-clickbait, that's what it is. Next time I expect a more honest title such as: "Absurdly hypersonic, scratch that, faster than light-speed Vim" I loved every second (which in my case was 25% longer) of this tutorial. Been using Vim for about 1.5 years and some of the tips in this video still managed to blow my mind! Thanks Prime, solid as ever!
@ThePrimeagen
@ThePrimeagen Год назад
Yayayayaya
@kristofferkristensen9142
@kristofferkristensen9142 Год назад
I watched this whole video in 0.25 speed and still had to go back a few times. Loved it. You just earned another subscriber. Time to check out your other videos.
@rodelias9378
@rodelias9378 Год назад
Thanks! This series is pure gold. Keep it up, please!!
@andyw732
@andyw732 Год назад
Suggestion for Your bonus tip At the end of the video: vi{ can be replaced by ]}, which will bring you to the end of a “scope”. I think you can repeat by using ; which will navigate to the end of the next (inner) scope
@lucastperez
@lucastperez Год назад
I have always used the vertical select mode to g+control+a, loved to learn that just selecting it with line visual is enough, so much easier! And the "o" to go back and forth in visual mode, also didn't know that! I guess it can be used with the extra tip and the end, if you are in the middle of a humongous json thing, you can do a vi[ and then "o" to go to the top as well.
@Wandering_Horse
@Wandering_Horse Год назад
Damn your vim skills are in god mode! Going to take away the % sign tip and work it. Thanks for all your vids, I still go back to the original 1-6 series to refresh skills 👍🏼
@subbunittala2012
@subbunittala2012 Год назад
thanks so much brother ..you are my inspiration ..started using it since 1 week ..just loving it ! ....thanks again from INDIA ..this vim skill is MUST NEEDED !
@nikensss
@nikensss Год назад
Damn, I like the g thing. Also, to go to the beginning or end of a function I usually go with [{ or ]}.
@yashashwinkarthikeyan1701
@yashashwinkarthikeyan1701 Год назад
loving these motions which go into a pair of parens / quotes and do stuff inside them.
@YannMetalhead
@YannMetalhead Год назад
It's like watching a Sorcerer revealing his secret spells. Thank you very much, that's awesome!
@7h3mon
@7h3mon 10 месяцев назад
Thank you for all videos about Vim Movements! I walked to the end!
@kevinwood5048
@kevinwood5048 8 месяцев назад
I’m on team built-in vim motions for the exact stated reason that they will likely work in whatever vim ide plugin you’re already using. Excellent advice!
@w0ntfix
@w0ntfix Год назад
I learned alot of great tips here, and I've been using vim for a decade. Thanks
@albertgao7256
@albertgao7256 Год назад
the rule of watching ThePrimeagen video, you like first, then pressing the play button
@ThePrimeagen
@ThePrimeagen Год назад
Good rule
@avimehenwal
@avimehenwal Год назад
I love your videos .... Now I have switched 50% of my workflows to nvim and can use it to get things done. Thanks to your video it's not that scary anymore :D
@tejeshreddy6252
@tejeshreddy6252 Год назад
Holy shit. This is one of most informative videos that are very entertaining on this entire site
@ThePrimeagen
@ThePrimeagen Год назад
yayaya!
@jongeduard
@jongeduard Год назад
Thanks! I did not yet know about that combination of the g key with that Ctrl a and x increment and decrement. However, I tried something really interesting too, might be worth sharing. And that is trying the 0x and 0b notations for hex and binary numbers, and it turns out that Vim recognizes that as well with this incrementing and decrementing. Very cool!
@Rudia1408
@Rudia1408 Год назад
Holy shit this video was mind blowing thank you!! Looking forward for more vim videos!!
@YashGupta-dr5re
@YashGupta-dr5re Год назад
8:40 Prime, I am really interesting in seeing a video about the vim sed commands! I have recently started using find and replace a lot in vim, especially where I used to do macros.
@BigToinE976
@BigToinE976 Год назад
Yeah me too
@SamClegg
@SamClegg 11 месяцев назад
Thanks for the great videos! I always enjoy discovering the intersection my vim workflows with those of other folks. I was a little surprised the you don't introduce `yap` and `dip` using the mnemonics for `a` and `i` that I think I remember learn them under: "delete AROUND para" and "delete INNER/INSIDE para". I always found the "around" and "inside" mnemonics useful, but I honestly can't remember at this point where I learned them.
@wizardofounce129
@wizardofounce129 Год назад
This series taught me everything. Thanks
@evadeflow
@evadeflow Год назад
Really appreciate your content, vim stuff especially, thanks!
@rickhackro
@rickhackro Год назад
Keep them coming! There is also " :.,.+{numer} norm " to apply a sequence of comands in normal mode from current line + {number}. For exemple, insert a semi-colon at the end of 3 lines: ":.,.+2 norm A; "
@rickhackro
@rickhackro Год назад
You can pre enter ..,..+{number} by pressing, in normal mode, {number} followed by :
@kylenelson5552
@kylenelson5552 Год назад
I am SO glad I stayed for the end of this video
@scottiedoesno
@scottiedoesno Год назад
I may have converted years ago at this point, but I always learn something useful from these!
@jaopredoramires
@jaopredoramires Год назад
I didn't even KNOW about p for paragraph and a in visual mode for "around". Nice to keep on learning movement! Finally in my "advanced" phase, I miss seeing new content, like this!
@claudiafischering901
@claudiafischering901 Год назад
Thanks a lot for this video. I
@chamber3593
@chamber3593 Год назад
Love your content and passion for sharing.
@frederickmichaud6783
@frederickmichaud6783 Год назад
Glad I watched till the end, but happier that caught a glimpse of the elusive plowghini.
@n0kodoko143
@n0kodoko143 Год назад
that background makes gruvbox that much more #hawt prime...glad I stayed until the end!
@icetmzz9074
@icetmzz9074 7 месяцев назад
hey great video do you suggest dvorak or any other alternative keyboard layout ?
@benjaminschultz6501
@benjaminschultz6501 Год назад
Glad I watched until the end. Loving the high-octane content! 😎👉🚀
@Taernsietr
@Taernsietr Год назад
This one was meaty, gonna have to rewatch a few times to note everything lol (and now it's probably a good time to learn how to use Treesitter)
@TheBusttheboss
@TheBusttheboss 4 месяца назад
This series really convinced me to start using Vim motions. Now I have Evil in my Emacs :)
@Grouiiiiik
@Grouiiiiik Год назад
As for your last tip, one thing I end up using quite often is O to jump at the first or last line of a selection without leaving the visual mode.
@unTanana
@unTanana Год назад
Absolute 🔥🔥as always
@mischavandenburg
@mischavandenburg Год назад
I love how you sprinkle :w everywhere
@Dongdot123
@Dongdot123 5 месяцев назад
I can't believe I'm touching and even learning vim again after I hated it for a decade, just because of this channel
@joffreybluthe7906
@joffreybluthe7906 Год назад
Great video, I never use the v in combination with the i{ or a{ but that seems super useful! Also I don't use the p(aragraph) which also seems pretty handy so thanks a lot Prime!
@pavel_espinal
@pavel_espinal Год назад
The "vi{" gold nugget at the end also works when editing massive HTML/XML/etc. documents on which you have no idea where a tag begin/ends. You can use 'vit' or 'vat' (select inside tag, or select around tag -or whatever the 'a' means), and it's a good way to jump between opening/closing tags. Pressing 'o' (like in "oily, coconut-oily") helps moving to the start/end of the selection. As always, great video, Primeagen. I felt walking through the Valley of Shadow of Death every time I had to edit an array.
@andyw732
@andyw732 Год назад
Even better gold nugget: ]} or [{
@pavel_espinal
@pavel_espinal Год назад
@@andyw732 Ty. I need to try that. I believe I saw that somewhere before, but didn't work for me 🤔
@earthling_parth
@earthling_parth Год назад
I am still learning so much by seeing Prime use vim 😍
@MaxPenderuk
@MaxPenderuk 5 месяцев назад
Dang, I love this coconut oiled shiny, amazing, super series💥 Thanks a lot 💪
@wesbragagt
@wesbragagt Год назад
Killer video! More vim tricks please. I’m curious how do you go about project wide refactors such as find and replace function names and such.
@nodidog
@nodidog Год назад
If you don't already know - 'verymagic' mode makes writing regular expressions easier (all keys have their special meaning by default besides alphanumerics and _), and it's negative 'verynomagic' is equally great for verbatim text
@petrpechkurov3095
@petrpechkurov3095 Год назад
Thank you, Mr. ThePrimeagen! I wish I had time to watch your streams!
@sabirbarahi8299
@sabirbarahi8299 Год назад
Vim god hath once again bestowed upon us new knowledge
@gustavofsantos
@gustavofsantos Год назад
This is gold 5k lines long)? I often need to edit such files, they are mostly configuration, but always find myself lost after jump some paragraphs, change files and so on. Maybe it's me (and I agree with my "noobyness"), but there is a way to efficiently store places associated with files and then jump between them? This is the way?
@ludawig_
@ludawig_ Год назад
You can try a plugin like "vim-bookmarks" or "harpoon". Works great for me.
@TheUmzugskarton
@TheUmzugskarton Год назад
I am also able to select a whole function using „vafV“. After watching the video I was playing around a little bit. Perhaps its a feature of treesitter? Also thanks for pointing out the function of the o key in visual mode! You improved my life.
@thecastiel69
@thecastiel69 Год назад
seat-belt sign is the beautiful motion
@jimmyjansen6221
@jimmyjansen6221 Год назад
Love the videos! Been a long time coming the 100k subs :D Would love a little more depth on these motions though, it sometimes goes so quick that I have to rewind and pay a lot of attention to follow what is happening. Would also hugely appreciate a video on quickfix lists... I never use them but heard they are super useful but never was able to wrap my head around them.
@lpanebr
@lpanebr Год назад
Glad I stayed till the end and got that nice trick!
@keonys1
@keonys1 Год назад
Great video Prime! Hey, which plugin is this that shows the signature of function you are in on the top of the current buffer?
@keonys1
@keonys1 Год назад
Nevermind I found it 🤣
@oliverchalkley1187
@oliverchalkley1187 Год назад
Amazing content dude! I would love to hear your thoughts/strategy on macros?
@ricardor8044
@ricardor8044 Год назад
Love seeing that gruvbox back baby
@SvenHecht
@SvenHecht Год назад
I recommend the "." command for the array asignments, at least if you use a single edit to do so: [uppercase I] [end] [esc]
@JakobWillert
@JakobWillert Год назад
Is this the Dr. Disrespect of the IT world? Nice content!
@alexwexov4298
@alexwexov4298 Год назад
Love these vids !
@lcarv20
@lcarv20 Год назад
I dropped my phone while watching this. Too much coco oil. Thanks sir, I am starting with vim and this is just needed. Would love one where you talk about what you think the “needed” plugins for a bare minimum vim setup are. Keep up the good work Maria.
@_baco
@_baco Год назад
This series could be in a playlist 😉
@iMagicGraalOnline
@iMagicGraalOnline Год назад
Me listening to Prime talking about VIM: "I like your funny words magic man"
@andersschramm9946
@andersschramm9946 Год назад
Very nice video! How is the text changing above as you type the regex s/\(\w.*\) etc ? Is it some kind of plugin? I get the same end result though
@andersschramm9946
@andersschramm9946 Год назад
Ah, it was nvim doing it
@payton6_
@payton6_ Год назад
Wow! I’m glad I stayed until the end!
@denzilv
@denzilv Год назад
Another banger! This one I'll have to rewatch a few times to get it because my vimming isn't quite at this level yet. I guess that's why I'm only Principal Janitor of TheStartup. 😅
@ThePrimeagen
@ThePrimeagen Год назад
Well... technically you are director of janitorial engineering...
@denzilv
@denzilv Год назад
@@ThePrimeagen I stand corrected, Mr. CEO. I will update my business cards and email signature appropriately. 👍
@pixelbogpixxelbog2090
@pixelbogpixxelbog2090 Год назад
I love this series
@kuijaye
@kuijaye Год назад
For pasting and then indenting, you could do >p instead of p>ip
@vallabhtiwari
@vallabhtiwari Год назад
I was watching vim videos, but what kind of amazing keyboard is that lmao
@ilChancito
@ilChancito Год назад
ufff such great efficiency, one can only hope.
@ethanb4058
@ethanb4058 Год назад
you can also do "dib" to delete inside any kind of parens/braces which I find is easier than having to think about what kind of braces you're in or reach for "%"
@kjeksomanen
@kjeksomanen 10 месяцев назад
Oh man I've slept on the "ib" motion and the like, good call
@juliopcrj
@juliopcrj Год назад
After you switched your layout to dvorak, did you also change your vim keybindings? Or did you just get used to the keys in different positions?
@tearsinrain2049
@tearsinrain2049 Год назад
just don't stop teaching, you're the best!
@ThePrimeagen
@ThePrimeagen Год назад
who says i am teaching? :)
@henrywang6931
@henrywang6931 Год назад
At around 5:30 mark, you could use nvim-treesitter/nvim-treesitter-textobjects which add functions and classes text objects. You could do for example daf to delete a function, or dif to delete inside of a function.
@ThePrimeagen
@ThePrimeagen Год назад
yeah, but i am trying to avoid motion changing items I really worry about building unusable habits.
@laupetre
@laupetre Год назад
Wooohooo !! Thank you for this video!
@anmolpandita290
@anmolpandita290 Год назад
🤯 THIS IS AMAZING!
@ofeenee
@ofeenee Год назад
if I remember correctly, I heard you mention something about making a course (not tutorials like this video) to teach new developers vim. Is such a course available anywhere?
@Souhail.
@Souhail. Год назад
Love the VIM content
@Mawkler
@Mawkler Год назад
5:20 Instead of doing va}Vd you can also do dVa} dV is line-wise delete. The advantage to doing dV instead of V...d is that you can repeat it in any pair of curly braces. Repeating V...d just uses the static visual selection, i.e. the same number of lines all the time.
@ThePrimeagen
@ThePrimeagen Год назад
much smart! i didn't realize you could chain it like that!
@thisisavinash
@thisisavinash Год назад
You are a vim magician 🤩
@sudqi
@sudqi Год назад
really cool video , keep it going
@crazyprofz
@crazyprofz Год назад
Thanks for this great tutorial sir. I see you are using dvorak layout. now I am practicing vim using dvorak. It is better to use default dvorak or programmer dvorak layout?
Далее
0 to LSP : Neovim RC From Scratch
30:47
Просмотров 1,2 млн
Vim As You Editor - Advanced Motions P1
9:44
Просмотров 229 тыс.
Я ТВОЙ ОТЕЦ #большоешоу
01:01
Просмотров 290 тыс.
How to Vim in 2023: Tips and Tricks
15:53
Просмотров 393 тыс.
ThePrimeagen Hacks My Productivity
3:30
Просмотров 36 тыс.
I Love Neovim But I WONT Use It | Prime Reacts
23:22
Просмотров 107 тыс.
1000 People Play Doom At Once
15:42
Просмотров 98 тыс.
The Ultimate Database Control. Right WITHIN NEOVIM
9:35
Git's Best And Most Unknown Feature
8:14
Просмотров 244 тыс.
Harpoon : Vim Conference 2021
17:08
Просмотров 105 тыс.
Vim As Your Editor - Vertical Movements
9:26
Просмотров 132 тыс.
Why I use Vim in 2022
6:33
Просмотров 479 тыс.