Vim is a text editor just like notepad but when I open it I can't type anything why because it uses a different typing philosophy that's been admired by many software developers and still even today after its release in 1991 it has a massive cult-like following that's their official website the reason speed typing with Vim means you don't need to move your hands anywhere else but the middle of the keyboard which makes it a lot more fun to type supposedly so let's test it out now the only thing I know about coding is how to create
animations with python using a library called manim and for doing that I've always used Visual Studio code what is this animation interesting I'm not sure where I use this one anyway so instead of using visual studio code I'm going to try to use Vim to create one of these animations now obviously we're going to need an animation to create so I'm going to whip that up first should look like a shield stroke color white maybe slightly thicker cool let's quickly yoink a color palette coolers pretty good website for color palettes oh that does look pretty
good let's put the colors here lapis lazuli oh this one's from Minecraft color is not subscriptable oh Colors Let's regenerate looks terrible okay this is the animation I'm going with it's like a shield probably wait I thought of an improvement there you go now there's a shield and then it transforms into yoink yep that's what we're going to be creating so instead of using vs code for this I want to recreate the exact same thing inside of vim and this brings me to my first roadblock which is that I have absolutely no clue about how
to even get started with it how to use Vim stack Overflow you can simply type Vim into the terminal to open it and start a new file okay Vim has different modes unlike most editors you have probably used ooh you begin in normal mode which is where you'll spend most of your time once you're familiar with them to return to normal mode after changing to a different mode press Escape okay sounds pretty simple it's a good idea to map your caps lock key to escape as it's closest and nobody really uses the caps lock key
oh I already have my caps lock key remapped not to escape though to save your file ensure you're in normal mode so I have to press escape and then enter the command colon W to save and exit use colon X okay so let's open the terminal and do Vim make it a little bigger where is the text okay there was some text and it disappeared so I'm assuming that now I am in normal mode can I type in hello no I can't escape okay and to quit I should do colon Q enter no right since
last change add exclamation mark to override do I just what's e oh as soon as I try to resize the window the text goes away noted so colon Q enter no right since last change do I just press enter or exclamation mark enter no previous command interesting so how do I now go back to my terminal do I do this q and exclamation mark oh yes okay already professional oh and maybe I can use my immense terminal knowledge to also create a new python file through the terminal because the first thing I need is to
create a python file like this one with an extension. piy so that I can go inside of it and start writing the python code okay so if I remember this correctly CD is for CDs nut sorry I mean change directory and right now I'm in my home folder so I'm going to do CD and then let's create this python file inside of something like downloads so I'm going to CD into downloads and to create a file I think I need to use the touch command touch yoink dop boom okay and now if I want to
see everything that's inside of my down downloads folder I can do LS which means list and it should list all the files operation not permitted great so what if I go into my downloads folder normally oh we have the yoink dopy file now I'm not sure why the ls command doesn't work but it probably has to do with permissions so that random programs don't sniff around inside my file system so let's actually delete this from downloads oh I should have done it through the terminal and let's create it somewhere else so to go back I'm
going to do CD do dot CD space do dot yes then WD to print working directory which should be my home folder woohoo look at that terminal knowledge okay and let's LS here to see what we have here I guess I can clear this and just create a new folder inside my home folder so to create a new folder I think I need to do MK dur for make directory and I'm going to say yoink okay and now if I LS we have the yoink folder here inside of my home folder so if I go
inside of my home folder there it is there's the new folder beautiful let's put it to the side and so next I'm going to do touch yoink Pi which should create a empty python file inside of this folder uhoh oh I just created this folder but I didn't go inside of it so now it created this file inside of my home folder yes there it is so now to go inside here I first need to change directory into yoink and then touch to create the file oh I mean touch yoink dopy yes okay this is
going well already I managed to quit out of vim and create a python file through the terminal so let's try to open this file now I assume I still need to be inside of this directory or a folder where the python file is so I'm going to do Vim y.p boom it says it here okay now how the hell do I type something is it going to be the insert mode which is entered with a for append after cursor okay so if I put in a insert okay can I do from manim import snowflake I
guess that's working okay so I guess let's just write the code def construct self wait no class yoink scene def construct self this essentially tells manim to create a new scene or a new animation file and what's underneath is what I want to create so let's add some simple text on the screen text yoink and then I also have to tell it to play something on the screen so self. playay write and T to write out the text okay so let's escape this okay and then I need to save and exit with colon X okay
Enter so now if I go here inside of the folder and open this python file with text edit I should see this yes now the question is how do I turn this code into an actual animation that I can see on the screen let's look for how to run code in Vim when you're writing some code in the terminal with themm how do you run it exactly I use the built-in terminal in a split I'm kind of shocked that I'm the first to say this I do the same thing I usually background Vim with contrl
Z run my code tests and FG okay what if I've had the foresight to run it in t-o what is t-o t-mo is a terminal multiplexer that allows you to manage multiple terminal sessions with a single terminal window okay so I can just open a new terminal window like this right and then switch between them like so nice Okay but how do I run the file how to run python file in Mac terminal you need python installed on your system that's good then you can run this in terminal in the correct directory python game over.
piy oh I don't even need to search for this I can just use the manim command oh I have a whole course about this how did I forget manim then I need to say the file which is y.p and the name of my scene which I completely forgot how I named so let's go into the yoink folder on this other terminal and open the yoink dopy file with Vim once again and I called this scen yoink with a capital Y of course boom let's go it's working the file is ready at this place so I'm
going to press command shift G on Mac which opens this window and let me paste in a path doesn't look like a path I don't think it copied it very well wait if I do this will it become bigger so I can't just copy this path from the terminal great okay let's quit vim and let's find that folder inside of the terminal to make it look super cool and there it is yoink MP4 let's actually go there normally much faster here's the animation file how do I open it through the terminal do I just yoink
MP4 open yoink MP4 yes and phenomenal stuff okay so one more thing that I want to do is to somehow make it highlight my code like this inside of vs code everything is nice and colorcoded so for example a string is color red a variable is this blue color and I like that so let's see if we can do this inside of Vim before we start creating that animation Vim color highlighting the permanent procedure is as follows for Vim edit the this file by typing the command this okay let's open a new terminal tab paste
this in okay append the following option syntax on Save and close the file test it by running Vim command f. sh okay so to append I press a and then type in syntax on then colon X to save and now if I go into my yoink folder and open the yo. python file with Vim oh yes there is highlighting okay beautiful a for append and then I'm going to delete this wait I can't undo how to undo in Vim any character typed in normal mode will be interpreted as a Vim command press U colon U
or colon undo to undo the last change so colon U wait Escape colon U enter ooh okay one more thing I noticed is that I can't delete by holding option and then backspace or control and backspace on Windows if you do this it lets you delete word by word so one word at a time obviously this makes it much faster so I want to figure that out as well how to delete word by word Vim DW you to delete a word so okay say I want to delete the word yo here I would have to
press escape to escape the insert mode and then do d w Wait D does something wo wo wo wo wo colon U colon U colon u i undid a bunch of stuff the letter D does something if I press it not sure what it did okay what if I do colon DW boom not an editor command okay no problem a to go to insert mode and then if I go here shift DW DW no of course it doesn't work okay let's try this again delete word after or around cursor in Vim d a w delete
the word under cursor C aw delete the word under the cursor and put u in insert mode ooh so now I'm in the normal mode I press a to go into insert mode I move to this word I press escape to escape the normal mode and then C aw to delete the word or C aw without that yes and now I'm again inside of the insert mode and I can type a different word or the same word okay this is definitely different from vs code let's explore some more of these commands and I'm actually going
to save them somewhere so that I don't forget oh I have not even reach the tip of the Vim iberg yet so turns out you can actually copy with Y and then paste with P probably also what the hell are VI keys wait how did he highlight stuff so I can press W and you'll notice that it's like highlighting as it's go as it's going I can highlight with W or can I W just jumps to the next thing ooh jumps to the next thing so how do I do I select stuff V lowercase begins
regular visual mode and works similar to selecting text with a mouse use H and I or this is L to expand the selection left and right to include more words okay so first I need to press V Visual and then J and L to select J selects forward and K selects backwards Okay so we've entered the visual mode let's leave maybe and just maybe I should look for a Vim tutorial for noobs now I must say if you're watching this chances are you care about your productivity which is just being able to do what you
want to do in a shorter amount of time and whether you're a working professional or have your own business what's very important to being able to unleash that productivity is being organized I bet you're a bit like me and you love to be organized but you rarely are and to help you with that I want to introduce akif flow this video sponsored they've recently rolled out the rituals feature which allows you to plan out your day and review it at the end down here you can select daily planning and you'll be able to see your
inbox that includes stuff from the different apps you connected to aif flow for example slack or email and on the right you'll be able to create tasks that you want to do for the day I like to leave some empty space when I plan out my day to account for all the things I didn't expect to happen but I always try to do at least one non-negotiable hour of working on YouTube videos and either meditating or learning something new so I usually add those on the right side then once the day is over you can
go back and select daily shutdown where you'll be able to review your day seeing all the tasks you did and the stuff that you didn't do this lets you view your entire day from a bird's eye perspective and see the areas where you did great and those that need more of your focus if you've never seen all of your tasks from a bunch of different apps in one single place that lets you efficiently organize them then aif flow can help unlock this for you as you saw I'm not a huge fan of hyper organizing every
single minute of my day but when I'm able to see what I did during the day it helps me notice the little things I waste a lot of time on and I usually don't realize I've been wasting time on those activities if I don't pay attention so by reviewing my day at the end of it it helps me avoid the time wasters and I can have more time to spend elsewhere like gaming with friends or spending time with my family now there's this absolutely killer feature called the command bar it's like Spotlight search on Mac
OS a universal search bar that can do pretty much anything within akif flow I love using it to quickly create and schedule tasks within my calendar you just put in a Time click enter and it's there for example if I want to create a new task in my Google cend calendar I click command K to bring up the command bar put in the vertical slash to let it know that I want to add something into my calendar name my task say when and I can tell it how long I want to do that task by
putting an equal sign and then saying how long I'll do 2 hours and once I click enter that task is automatically added into my Google Calendar very fancy you probably have also noticed the smoothness akif flow is a joy to use at least for me because I can appreciate all the playful animations and really intuitive design they have a keyboard shortcut for almost everything and once you get used to using it it gets you organized and gets out of the way what there was a kangaroo just running by that's what we're dealing with and if
you're unsure what some of akif flow's features can do there's an exclusive one-on-one onboarding call you can take for the akif flow team to help you get started and help you set up your akif flow in minutes if you want to check them out I'll leave a link in the description now back to themm oh what happened here just a couple tutorial later and I have a bunch of commands written down and this only seems to be scratching the surface now I didn't actually try a bunch of them so let's do that the first one
I found out is when you're in the normal mode the one that doesn't let you type instead of pressing a for the insert mode and then navigating to the end of the line you can make it do that immediately with shift a and now I'm at the end of the line now if I want to delete this entire line I can press shift s and it deletes it and puts me in insert mode so that I can start typing something here now I want to undo so escape and press U on my keyboard professional anyway
I also learned that you can combine multiple commands together so for example if I enter the command mode with the colon I can do write and quit which is the same as X I think write and quit would save this file and then quit vim and if I only do write it will only write this file and then if I do Q it would quit but if I do W quit it will write and quit wow o yes when you're in normal mode there's actually a way to delete stuff so if I come to a
letter and press X it will actually delete it I just pressed U to undo and if I want to delete the entire line I can press D twice DD that removes the entire line beautiful anyway instead of just going and trying to use all of these I want to try to accomplish something a little side quest I've just realized that I don't actually know how to run a normal python file so I'm going to exit this then I'm going to list everything in this folder actually I'm going to open this folder and I want to
create a new python file here so touch test.py should have appeared yes let's open that with Vim test and here I want to do something with python and try to run it let's print out a square of snowflakes for I in range 5 print snowflakes and now how do I run this file so let's actually save and exit and do I just do python test. Pi no good to know how to run python file in terminal Mac you can execute your file by using this Python and the name of the file you can also run
the file by moving to the path and typing in Python game over interesting python test.py command not found python if you have python 2 version you have to run this command but if you have Python 3 version you have to run this command maybe I have the Python 3 version oh good to know and here are all the snowflakes beautiful so I learned that I forgot how to delete files through the terminal or M file name that's a dangerous command r m test.py and it's gone okay so the next thing that I want to do
is export this animation in 4k because right now if I go into media and get info on this file it's 1080 of course we want the best possible quality and for that I need to create a config file that I know how to do in vs code but I don't know how to do that with Vim let's create a new file called manim do zfg oh that's here and can I edit this file through Vim yes okay insert mode and I need to do CLI and quality equals 4K quality escape to escape the insert mode
call in X to save and exit and now if I render this animation it should be in 4k so I'm going to say manim then the name of the file which is yoink then the name of the scene which is also yoink and scoo yes there it is it's in 4k now there's a new 4k folder and if I get info on this file it's in 4k didn't actually use any of these keyboard shortcuts so that was that let's go back into the yoink file and explore some more of these we have h j k
and l Keys which moves the cursor in normal mode doing this the first time is absolutely confusing because H goes left J Goes Down K goes up and L goes right and they're all placed horizontally on the keyboard now why would you want to do this with these Keys instead of the arrow keys there's a good reason for that remember how I mentioned that Vim users like to use the keyboard and if you type rather fast you probably know what the home row is it's essentially the best position where to put your fingers on the
keyboard so that it's easy to reach the other Keys the F and the J Keys usually have little grooves on them so that you can find them with your index finger and so if you type a lot of code your hands probably rest around the home row and moving them to the arrow keys takes just a little extra time and that's why Vim allows you to move with h j k and l Keys which are essentially right next to the home row but getting used to this in the beginning is super hard I'm using 100%
of my brain power to move here also why does J go down and not up I would have expected it to be left up down right but it's left down up right and it's insanely hard to get used to this but if someone does get used to this I can see how using Vim would be extremely fast okay a couple more interesting keyboard shortcut the letter V enters visual mode which lets you select text and for example now if I cut this out DD to cut it out I can go into the insert mode add
a new line here then escape the insert mode and press P to paste it in yes okay there's a random colon here I can use x to cut it out okay DD cuts out this line and this line and this line and I'm doing this super slow but I can see how someone used to themm would be able to edit code insanely fast ooh also control 0 puts you in normal mode for just one command so if I'm using the insert command I can press CR o to go back to the normal mode and press
something like the letter U to undo and then it immediately jumps me back to insert mode which lets me type something that's also really useful oh yes GG good game takes you to the top of the file and shift G takes you to the end so if I have an insanely large file I can press GG and it teleports me to the beginning or shift G which teleports me to the end and I can start typing here I still haven't figured out how to delete the entire word and not one left letter at a time
I know how to delete the entire line I have to go back to normal mode and then press DD it will delete it so let's find that out as well delete word after or around cursor d a w Wait I explored this one before didn't die okay so I'm on the word play I leave the insert mode with controll o I say c a w and then I'm back inside of the insert mode again so I can say hello okay ooh there's so much stuff to remember here and this is only scratching the surface okay
let's delete this and this and let's actually create that animation Al if you're in the normal mode pressing zero will jump to the beginning of a line and pressing shift four will jump to the end of the line these two shortcuts don't make any sense because zero is on the right side of the keyboard and it jumps to the left and the dollar sign why would that be the dollar sign anyway so let's go here and start building L the animation which I totally forgot how to do so let's open Visual Studio code and yoink
it from here if I copy this can I just contrl V ooh yes I can but it didn't paste with the correct indentation U to undo then I for insert mode colon now I want to paste it in here so it doesn't remember the indentation okay now I have to fix the indentation but I want to do it with keyboard shortcuts that I just learned so escape to enter the normal mode then zero to jump to the beginning I for insert and tab to increase the indentation or I can just do it like this much
easier o wait can I do it for everything if I go into the visual mode I should be able to select then I should be able to go into the insert mode or not wait wait wait wait wait okay visual mode select everything then I can cut this out with DD then if I go into the insert mode click tab then Escape insert mode P to paste it should have pasted with the right indentation right not sure what happened here so I'm going to undo three times okay how do I increase the indentation of multiple
lines of text visual mode I select all of these interesting Vim increase indentation of multiple lines place the cursor on the first line you want to indent press V to enter visual mode use the arrow keys JK keys to select the lines you want to indent yes press the right thing to indent the selected lines boom okay this is definitely going in the shortcuts folder o and now I can use this command colon exclamation mark to run a command within my terminal and then it will come back to Vim so if I do colon this
and then say manim and the name of this file and the name of this scene which is yoink this should export this animation without me having to escape and then go back into it oh yes the file is ready at this place and now if I press enter I'm back into V okay and let's see if that file is actually there there it is if I open it it should be the new animation oh wait a minute this is not the actual animation oh I only wrote the code here but I didn't actually save it
so if I do colon W it will write this to the file and then if I do this again it should export this file oh inconsistent use of tabs and spaces in indentation whoops so there is an error here somewhere is there something wrong here oh there was an unnecessary comma here okay does it work no actually how do I add lines inside of here the command is set number I think I can do it inside of the configuration file right okay I'll just use set number okay so line 14 is where we have a
problem let's redo all the indentations then colon W to write colon exclamation mark same command and does it work yes okay it's rendering the animation and I think this should be good so if I open this file now I can already see that it's the right animation W okay beautiful and it's in 4k now one thing that definitely missing here are code suggestions so in vs code if I want to add different parameters to a command for example if I place a comma here it will suggest what other attributes I can Define for text so
for example I can Define the stroke withth or add a gradient and so I'm not sure if that's possible inside of Vim let's Google that Vim code suggestion start typing something and then press contrl n key combination to get vim's Auto completion suggestion okay so if I go into the insert mode and start typing T2 equals text hello if I escape the insert mode and press crln no that just gave me a new line Auto completion in Vim use crl n to get a list of word suggestions while in insert mode oh I should have
been in insert mode so crl n ooh okay now these are definitely not the suggestions I was expecting show suggestions in Vim Mac try COC and Vim it uses language servers to provide Auto completion which is exactly what vs code also uses oh yes so this is is a different version of Vim that has the suggestions okay not going to install that now also one more thing that I want to try to do is learn how to comment stuff in vs code I can do it with command and question mark and it comments everything like
this how do I do that inside of Vim what's a quick way to comment outlines put your cursor on the first this character press contrl V and go down until the last commented line and press X okay so I need to insert the comment character then I go into visual mode select the rest that I want to comment that will delete all the characters vertically oh this is for uncommenting for commenting go to the first line you want to comment press contrl +v this will put the editor in visual block mode so essentially select a
bunch of text now press shift I which will put the editor in insert mode and press the common symbol then press Escape give it a second and it will insert another character on the other selected lines okay I want to go into the visual mode select everything shift I for insert mode and put a hashtag symbol here and then Escape no okay let's do that again V select everything here shift I insert this and Escape maybe it only works within the visual block mode so if I do shift V visual line select everything now shift
I then hashtag and Escape no that is definitely interesting how do I comment multiple lines in Vim go to the first line you want to comment press crl V and select until the last line that seems a lot simpler contrl V select until the last line then press shift I and the hashtag symbol Escape shift I hashtag symbol Escape o now it works okay now to uncomment I'm going to do crl V for the visual mode then shift I # symbol once again and Escape no that just added double comments how to uncomment now exactly
select the same way as before and then press X to delete the selected characters okay select all of these oh the block select mode just selects vertically without selecting anything else here okay that makes sense and I just press X and it's uncommented okay it's been a couple of days during which I consumed a few videos from the primagen and became a more well coconut oiled themm machine the primagen so here are a bunch of new tricks I learned which now increased my speed of using Vim from 0.01% of my normal typing speed to 0.011%
massive Improvement of course I'm still insanely slow and I also figured out that I can use Vim keyboard shortcuts inside of obsidian so let's go over a few of these things first I found this website called the Vim sheat sheet which essentially just lays out all the them keyboard shortcuts in one single page you know just a few keyboard shortcuts that you might want to remember so I picked a few of these up from here and also the Prima videos who is the most notorious Vim user Z baget what am I doing Z and here
are the things I learned first I can use B and W B jumps backwards one word and W jumps forwards one word so it's essentially exactly the same as when you're typing normally but you hold option on your keyboard and then you can jump between words by pressing the arrow keys it's the same if you hold control on windows so those are the B and W keys they jump over a word now here e jumps forward to the end of the current word I still haven't really used this one but if I press e now
it should jump from the W to the D boink beautiful okay but first we need to talk about this command line motion I learned this from the primagen essentially w b or e or motions so in this case they jump over words if I press B it jumps back backwards if I press W it jumps forwards but turns out inside of them I can combine a command with a line and then a motion in this case I'll just combine the command with the motion so for example the command I want to execute now is delete
this word and the command for delete is D so if I press D and then W it will delete the entire word because it deleted what my cursor jumped over now if I press U it will undo the same the other way I can press D and then B which will jump over this word and so I'll combine a command which is delete with a motion which is jump over the word so if I press B the a is gone beautiful let's move on to a few more keyboard shortcuts F and T finds the character
in the current line so for instance if I go to the beginning of this line and press F and then C right after it my cursor should jump from here to the letter c so f c yes there it is and again just like before if I want to say delete everything from the beginning up to the character C I can go to the beginning with zero then press D which is the command for delete and now I have to say what I want to delete and and I want to delete up to the character
C so I'll say F to find that character and then C and it got rid of everything including the letter c undo that so this can be insanely powerful once you get used to how to use this the next one is O which inserts a new line above the cursor well that's below the cursor so let's replace this with CW and say below beautiful DD to delete this line and let's go down actually let's open up a program that will show the keys I'm pressing on the keyboard so now if I move left it shows
what I'm pressing let's move it over here okay here are a bunch more keyboard shortcuts that I learned not going to go over all of them but I will go over a few of them oh that was a capital O before so never mind capital O inserts a line above the cursor so if I press shift o it will insert it above my cursor and if I just press o it will insert a new line below my cursor that makes sense also if you have line numbers or even if you don't have line numbers you
can specify how many lines you want your cursor to jump so for example if I wanted to jump from here to line number seven I can say 7 J which will jump seven lines down obviously my math wasn't right and it jumped by seven lines so we ended up on line number eight now I really want to play this game called the Vim be good game made by you guessed it the primagen it's essentially a game that's meant to teach you how to be a well coconut oiled machine with Vim now I have no clue
how to use GitHub Vim be good is a plugin designed to make you better at Vim by creating a game to practice basic movements in instructions are at the top of games installation must use neovim 5.x use your favorite plug-in manager to install only works on NVM that's neovim I think the only true Vim what's the difference between vim and Neo neovim is based on the Vim code base so it retains many of the performance advantages of Vim one major difference between neovim and Vim is that neovim better supports asynchronous plugins install NM Mac neovim
home can I do this through the package manager Brew install and Vim does that work I think it is working professional user Brew upgrade this is going to take 5 million years okay neovim is installed so let's see if it works the same as regular Vim oh that was slightly slower okay what's this white bar at the bottom not sure the line numbers are also gone is it set number yes it is so I think it's the same as Vim but it's not the same wow so to play this game I must use my favorite
plug-in manager to install what is actually the best plug-in manager I use plug and everything works fine beautiful installation download plug. VM and put it in the autoload directory click here to see instructions okay do I just copy this and paste it in my terminal oh something happened you can automate this process by putting the command in your Vim configuration file as suggested here should have probably read this before place the following code in your Vim RC before plug begin call oh I did this for vim and not Neo Vim great so I think I
have this installed usage add a Vim plug section to your Vim RC or config neovim something for example this okay let's copy this and also let's go here so I want Neo Vim into this place and inside of here I want to put this okay list your plugins here so now if I go to Vim be good and then put this in here boom and then write this can't open a file for writing no such file in directory H wait can I not write this file maybe it doesn't exist can I do colon x no
how to create an Vim config file here okay so if I copy this and open up a new terminal and then if I see D into here it says that there's no such file or directory so MK dur and Vim to create the Neo Vim folder and then I need init mate. Vim file so I can create that touch init vim and now if I just go back and paste this in no suchar file or directory what oh now it wrote it for some reason okay so let's quit this let's quit that as well okay
let's go back into the code project I'm insanely confused let's go into command mode and do Vim be good boom not an editor command I just want to play the Vim be good game please okay you are in an empty file so first execute the following Vim be good this will Echo the available set of games okay maybe I need to create a new file like this just Neo okay now if I do colon Vim be good boom never mind again maybe the installation of the plugin didn't work so let's do neovim and then let's
go into this location boom yes we have call plug-in begin list your plugins here this is the plugin how to install plugins with plug into neovim download vm. plug and put it in the autoload directory that's definitely not what I did so here is plug. VM I'm going to open this copy all of this and go back to the tutorial so inside of the config and Neo Vim folder he makes a new folder called autoload so let's do that here MK dur Auto load he made another directory called vim-plug clear everything and now we have
the autoload folder here the init.vim file and the Vim plug folder beautiful okay then he goes into autoload let's make a new file called plug. Vim boom and then I want to paste everything from here into this folder okay stuff is happening okay right and quit beautiful now I have this file with all of this code inside of the autoload folder oh and he put the init.vim file inside of the Vim plug folder can't I just leave it inside of the N Vim folder though let's delete the vim-plug directory so now I only we have
the autoload folder and this Vim file so I'm going to go inside of it the init Vim file and inside of the plug begin command he put the directory of the autoload folder and something else there and I have nothing inside here so I'm also going to put that there you know what I'm just going to copy what he typed slash config and Vim autoload SL plugged oh the init.vim file starts as soon as Vim starts that's valuable information oh I need to First install all of the plugins with the plug install command already up
to date okay so I have the plugin here and if I now do them be good it works yes okay finally I have spent so much time just trying to install this so now we have a few games delete from the list to select so I can play all of these games the first one I want to try is the hjkl game to help with the movement so all I need to do is go here and click DD to delete it okay game starts in 3 2 1 remove the X with using only h j
k and l and X remember this is for you to be better using the arrow keys only makes you dumber trust me I am a Scientist x x x round 10 out of 10 boom where do you want to go next delete the line menu replay or quit let's go back to the menu and let's explore another game oh select the difficulty easy medium hard nightmare o go go left left left okay struggling hard oh well okay no it's up up right okay down right there no no oh no no no no no replay okay
10 out of 10 completed successfully average 2.57 something let's try another game what about words game starts in 3 2 1 use W and DW to delete the different word in the line jar jar bar so I need to go to oh that changed so I need to delete Dar now so w DW okay that's pretty good so far oh www DW wait w w d W that was stressful let's definitely replay this completed successfully let's go back to the menu and explore the other game c i open parentheses or this is a bracket I'm
not sure how it's called replace the content of the outer container or the executable container of the if statement W with bar example wait this is just a bunch of random symbols I don't understand oh these are two separate columns okay if Fu then QX if Fu then bar so I need to replace Q ux inside of these with bar and here I assume it's a different example so everything here inside of these brackets needs to be replaced with bar I have absolutely no clue how to do this okay instead of doing the game let's
open up my python file and try to practice this without the game so here I can insert this and enter some text some more text and enter and close these I use the arrow key that is not allowed LH I delete delete Escape LX beautiful so how do I now delete this do I enter visual mode and then select everything below and then say DD no not sure what I'm doing let's go here visual mode select here and then to replace something isn't it c a w oh it's just C so bar okay so first
I need to get inside the parentheses then select everything press C and type in bar let's do this one more time so what if I'm at the beginning what's the fastest way to get to this a here I need to be on this line then fa a visual mode select everything and see bar okay that's good and let's play the game wait that was a rookie move I need to do 10 down God damn okay let's delete this game starts in 3 2 1 so where's the game oh it's down here so if here wait
that's no no no no no no visual mode down c bar visual mode c bar wait oh I missed that one visual mode X bar oh sh 10 completed successfully there's no way I completed every single one successfully let's replay this round 10 out of 10 okay this game was difficult let's go to the relative game I think this will be about relative line numbers oh Mr priman I think your game has a few bugs or I just suck them be good probably the lad boom test your ability to hop by relative line numbers to
win the game delete the line that says delete me oh but I need to turn on relative line numbers how to enable relative line numbers in Vim or neovim for neovim edit the init Lua file usually at this location let's quickly do that boom and here let's add a new line that says Vim V relative number true paste that here and write and quit does it have relative line numbers now or I can just say this relative number equals true cannot open file true what does that mean so if I go into relative are there
line numbers no oh the configuration file always kills me okay so what is wrong here the next time you open Vim or neovim the configuration you added should see relative line numbers enabled oh do I also need normal line number set number I think yeah set number so everything here should be good then okay so let's actually quit out of Vim in general and let's do neovim again enter then let's do Vim be good and I don't think there are line numbers here or are there there are okay but these are just regular numbers not
relative numbers so why does that not work okay let's quit out of neovim let's open neovim error detecting while processing the config file line8 no match wo so it doesn't see this wo for some reason why or do I need to move everything here up top let's try to do that with keyboard shortcuts so first visual line mode down and then D then Escape go to the beginning with GG then shift o to insert a new line back to normal mode and P to paste yes save this go back to neovim quit neovim go back
in and it still says the same line three no match wo okay can't I just do set relative number instead of set number or set this let's try this and if I add more lines yes these are relative line numbers so the way these work as of my understanding is here it shows which line you're currently on so right now I'm on line number nine and what happens if I went to jump for example over here this would be line number four but here it says five and it's because instead of showing the line number
it shows how far away it is from my mouse cursor so I can say five and then up to jump to this line not sure why it selected everything it must have been in the visual mode so let's go back into Vim be good and try to do the relative game there's so many numbers now so here I want to jump five lines down and delete 10 lines up delete that was pretty good let's go back to the menu we've already done the movement game what's wacamole use Vim movements to locate the character with the
arrow under it as quickly as possible then invert the character's case to win YouTube comment sections are all almost always encouraging and uplifting Brandon is the best one so I need to move my cursor to the end and make it uppercase so FC delete uppercase whoops so FX insert mode oh didn't make it delete insert mode okay wo this game is destroying me zero out of 10 completed successfully that's a perfect score quick replay maybe okay let's try to get the Perfect Score so f b x i capital b f VX Escape insert to the
right to the right YouTube okay F LX Escape insert l oh my God nine out of 10 completed successfully this just broke my brain completely I'm definitely coming back to this game later and let's do random so is it going to pick a random game out of all of these yes okay visual mode up c bar oh it's random within random okay to the right x i n Escape go to the X left X oh my God this is difficult that was 10 out of 10 oh but my fingers and my brain hurt so much
let's go back to the menu and let's make this a little more interesting and let's do random nightmare mode there's absolutely no chance that I will get at least one so let's aim for one out of 10 score boom I just deleted everything that was Panic f a semicolon semicolon no okay uh W oh well okay uh 10 delete okay there's one there's one WR X insert e nope f h okay well six up delete f h x I never mind Escape five down oh it's over boom four out of 10 on nightmare mode that's
a professional score right there okay let's leave this game for now now I'm pretty sure there's another game like this on the Vim website Vim game practice Vim Adventures yes this is the one learning Vim while playing a game press any key to start oh I can just walk anywhere there is a maze remember words are not words interesting hello there's a built-in help system in this game if you ever need full explanation and example on what a key does or how it's used type help followed by the key for example try help J help
J J is a motion okay that's good so did I just come here for no reason can I do 10 up oh I don't yet have the U button there's a key I got the key there's a chest boink oh that did something moving up or down to a shorter line moves you at the last column in the shorter line oh so just like in Vim can't go here to reach the treasure chest you should know words are separated by spaces you need w e and B buttons capitals to navigate words oh okay okay okay
so I need that Treasure Chest so B what do you mean I don't have the B button yet I suck at this game so what keys do I have h j k l and the semicolon wait can I not beat the first level here but I got four out of 10 on nightmare random mode in the primagen game says a lot about the primagen game I guess just kidding oh okay I need to go here and do j a bunch of times and then I'll end up there that was the whole thing okay and boom
I reached the final guy very good Shadow one you learned the HJ akl skill go on this took Way tooo Long than it should have taken there will come a time before open source's Golden Age and the Darkness is deep what to fulfill the prophecy you have to understand Vim words finding w b and e will help you navigate words wait what does e do forward to the end of a word wait there's a key there got the key and B motion moves backward two and three there we go a smoking hot babe at the
top okay let's end this game for now but basically you can use these games to train your Vim knowledge I also figured out that I can use Vim in vs code so let's try to experiment how this works as well let's open this project that I used within Vim everything seems to be going wrong here how to use Vim mode in vs code there is a Vim extension install so I can move up with K and do this x go up DD go up DD go up even more go to the beginning of this line
insert mode delete the indentation Escape shift G deletable bunch of lines tab t equals text but why do these indentations not work it's strange oh that's because they're indented twice oh so that's the Vim experience ladies and mental gen now obviously I'm still a complete Noob when it comes to vim and I have no clue what I'm doing I'm also extremely slow with it but I can definitely see how it can become an insanely fast text editor or code editor for someone because there's so many commands and keyboard shortcuts that can get things done without
even having to move your hand to another place on the keyboard let alone your mouse but there is a steep very steep learning curve in the beginning if you've been using visual studio code then reprogramming your brain to use Vim is definitely going to take some time and from what it seems like the keyboard shortcuts that I have written down here don't even scratch the surface of what you can do with them oh and there's one final thing I forgot to mention Psych