VIM is one of the most used applications on Linux and the vast majority of people know at least enough to open up VIM Do their edits and get out of them But there's so much more to VIM than just you know that bare minimum There's so much more you can do and you you've probably seen YouTube videos where VIM experts have gone through and just done amazing things with them and doing edits and a huge documents and Substituting things and using macros and all this high-end Wizardry and like wow I want to be able to do that and I'm one of those guys I want to be able to do that too, but I look at where I am now with them compared to why was like where I was like a year ago and It's night and day so I think VIM is very much one of those programs where over time you learn more and more and You you just kind of look back and realize well I really know quite a bit about VIM even if I'm still not one of those people who can do all that magic in terms of editing and stuff So what I'm going to do today is Give you 50 tips and tricks Give or take a few I've counted them a couple times But it turns out I can't count that high, but I'm pretty sure there are around 50 Tips or tricks that will help you be a better VIM user This is going to be quite a video and I'm going to go through them fairly quickly So let's go ahead and jump in but before I do hit that like and subscribe button if you haven't already I really do appreciate it everybody who's already subscribed to the channel. I appreciate everybody. We've just gone over 4200 Subscribers and you're all awesome. So be awesome and hit the red subscribe button if you want to see more content like this So now let's go ahead and jump in. I'm really really bad at those call outs. That's why I don't do them very often but now Matt the video is going to be like three hours long if you don't stop, you know doing this Alright anyways So the first one on I want to show you is something that happens outside of them There are many ways to open up a document. There's the traditional way of VIM document name or whatever But let's say you wanted to open up a document to a certain line number Let's say for whatever reason you're constantly making changes to the same file and you know which line number you have to change It's easy to open up them to that line number. So if I do this do and VIM config These are my DWM configs by the way and you'll notice that I can't actually type today I can do this and then do plus say line 34. So this is this should open up My config.def.h file to line 34 now. It's possible that this doesn't work for me because if you have a setting in your VIM config file that Asks them to remember the position of the document after it's closed so that when you come back It opens up at the same spot what this will actually do was it will take that spot It was saved and add 34 lines to it. So that sometimes happens to me This will only work for me if I'm at the top of the document when I've closed it the last time I'm pretty sure I did that so it should work and in this case it didn't work I was apparently at the bottom of the the line So that's the reason why it didn't work for me But for you as long as you don't have that particular setting that I happen to have This will actually should open up the file to line 34 It seems to be a little bit finicky with some settings that you have in the VMRC file. I Should also note that I'm using end VIM these tips or tricks should work just fine whether you're using vanilla VIM or neovim So the next one I want to talk about is cursor positioning So let's just say I want to I'm looking at the screen and I want to change the position of the cursor I can actually go through and change the line number if I want to by going to this thing or I can do Something else like 10 J. I can jump 10 lines if I wanted to but let's just say I wanted to move the Position of the cursor on the screen. I don't necessarily want to go to the top of the document But I want to go to the top of the screen I can do that by hitting capital H and that will take me to the top of the screen If I wanted to say same at the top of the screen And I wanted to go to the middle of the screen I can hit capital M and that'll take me to the middle of the screen So the next one I want to talk about is the letter D and the letter D does a ton of different stuff Let me actually turn on screen key here So like I was saying the letter D just does a ton of stuff and as you can expect D pretty much stands for delete so if you're at the beginning of a line here and you want to delete the whole line DD will delete the whole line and That works for The same way you can do for a ton of other stuff So you don't have to be at the beginning of the line You can be in the middle of the line if you want let's just say we're down here And we want to do DD here that deletes the whole line It probably happened quicker than you can see but it deleted the whole line now let's just say You want to just to delete this word DW deletes the word But it will only work if you're at the beginning of the word So if I'm at the in the middle it'll delete from the cursor to the right It won't delete the whole word. So DW for delete word will only go through and delete the whole word if you're at the beginning of the word Otherwise it deletes from the cursor all the way to the end. Okay DL Will stand for delete letter this will delete the curve So whatever letter the cursor is on if you hit DL, it'll just delete that letter Okay, so that's the letter D There are a few other things you can do with D as well if you want to do say you want Let's just say I want to delete three lines So I could do three DD and it will delete three lines. I could do five DD five DD oops I can I have to actually you know do this right five DD and delete five lines now I can also do the same thing with words. So I'm gonna do five DW and I'll delete five words So that's really cool and really powerful if you want to go through and your editing stuff and you want to you know Do things really fast Similarly C is also very important. So let's just say I want to change this word here const underneath the cursor I could hit and get into the insert mode and you know delete it like that Like a you know a complete noob or I can just do change word and it will delete the word and go And put me into insert mode and then I can change the new word to whatever, you know, if I wanted to do that So that's change word the other things for That work would delete will also work with change. So if I wanted to change this letter I could do CL that will delete that letter and get me into Insert mode so I can just change that one letter. I can go through and do Five change word and delete five words and put me to insert mode So I can do that as well another really cool thing I have Some stuff here in parentheses. So I have ST here in parentheses If I wanted to change the stuff inside the parentheses the words inside the parentheses I'm gonna do change inside parentheses and I'll delete everything inside the parentheses This also works with so if I undo this and I can do I go back to the beginning Here I can do change inside Curly brackets braces or whatever hell you call them. It'll delete everything everything inside the curly break brackets And that's really really useful. That means you don't have to go through and you know delete Everything manually, so we just go through and undo that now I will cover undo here in a while, but just needless to say you was undo Okay, so that is the letter C and like I said change inside of stuff will pretty much work with anything We'll work with single quotes quotes parentheses brackets square braces all that stuff change inside and then press that key And you will be able to change inside those things now I do believe if I'm in the center here and I do change inside scroll brackets actually that does work I thought maybe I just did from the cursor, but it actually does work just fine. Okay We're just getting started so strap in The next thing I want to talk about is quitting and saving your documents So everybody knows colon wq and colon q That's the way them tutor teaches you how to do it and there's nothing wrong with using them them tutor way It's perfectly legitimate to this day. I still use that very often However, there is another way to do it. So let's say I want to get out of this document I don't really want to save it just in case some of those changes I made earlier You know mess things up so I can do Capital Z capital Q and that will quit the document without saving now if I go back into this And I want to save it now. I do capital Z Z and that will save and exit So that is a really cool way of just getting out of a document whether you want to save it or not And it's easier at least one stroke easier than doing the colon wq thing. Okay, the next one that I want to talk about is going to a specific line number so in this document here I have a hundred and ninety five lines and Say I wanted to go to the line 100. I can do that by doing colon 100 and hit enter that'll take me to the 100 line. So that's really easy You can also jump a set number of lines by hitting Something specific. So let's say I wanted to jump 10 lines. I can do 10 J and they'll take me down 10 lines Let's say I wanted to go up five lines. So we do 5k and they'll take me up five lines Just on the same note. This will also work in visual mode. So if you're in visual mode So let's just say you're in this visual mode here and you want to jump down 10 lines You could do 10 J and they'll highlight 10 lines. So you can use it in visual mode as well So the next one really only applies for your VMRC now This is part of my end VIM configuration file It will look a little bit different than what your VMRC will look like but it's basically the same stuff It's the same syntax, but it let's say I wanted to know what the word I map means in terms of them I pretty much know what that means. I'm mapping something for insert mode But let's say I didn't know that if I hit capital K, they'll bring up the help page or the man page for them and it'll give me a little bit of Information about what that means and you can do this for any key binding inside them It'll take you to the documentation for that specific command inside VIM. So that's really cool Everyone knows that I is insert mode if you even if you just know the basics of them I is always insert mode, but insert mode with the lowercase i works in a certain way So if you hit i and you have the cursor here on the O in in in this particular document I hit i it's going to put the Insert mode before the O before where the cursor just was it's always going to do that It's always going to work that way now. Let's say I wanted to put it after though So if you just use if all the time like I seem to always constantly do I'd have to go into insert mode and then move the cursor You know manually like a like a a neanderthal What you can do instead is use lowercase a and that will take your Cursor and put it after the cursor where the cursor was just a moment ago So that means you can just continue on from there Capital versions of those letters do two different things so capital I will put you into insert mode at the beginning of the line You're on and capital a will put you into insert mode at the end of the line you're on So now let's go ahead through and talk about pasting and copying now Copying and pasting in VIM is a little bit weird because it doesn't copy the stuff that you copy To your system clipboard unless you have it set up to do so I do have it set up to do so but not everybody does and I believe by default It's doesn't work that way. So when I'm talking about copying pasting or in this case yanking and pasting I'm really talking about words and stuff inside of them only it's not going to take that stuff and put it into a General system-wide clipboard for you to use. I just wanted to put that out there So let's say I wanted to to yank this line and by yank I mean copy. So if I just hit yy I've now copied that line and if I hit P. I've now pasted that line Exactly what was in the the copy buffer. So we can see this probably more Explicitly if I do something that has something with some space around us if I yank this line here and Go into insert mode and then paste this we can see now That's how it's pasted. So I did yy and it yanked the line and I did P and it pasted the line So if we do DD that would delete those extra lines Okay, so That is why why now similar to D and C Yank will also do things with words and letters. So if I just wanted to yank this word I could do YW and that will just yank that word if I just wanted to do just that letter I could do YL and Then do P and it just did that letter. So that's how yanking works and that's how pasting works The next one is a little bit more convoluted in expert mode we'll probably go back to some of the more beginner stuff later on but This stuff isn't really all that organized. I probably should have organized it a little bit better But this next one is like I said a little bit more expert mode. Let's say I wanted to replace the word Static with something different throughout the entire document. I can do that easily. So I do colon Percent sign S and basically what this tells Vim is we're going to be doing a substitution Okay, and then we give it the word that we want to substitute So in this case, we want to do static and you can see I have it set up so it actually Highlights static as I went along. So then I do another slash and I give it the word That I want to replace it with so let's Whatever Okay, and then I do another slash and I do G now G Tell if if I just did it without the G that would just replace the line that I'm on Okay, if I do G it will do it for the whole document So if we do if we go back up here, why I jumped to the to the bottom By default it just does that you can see every word that was static now says whatever and we can just hit U to Undo that because obviously DWM is not going to build like that But that's how you do a global search and replace in Vim It's really quite easy and it's not something you'll probably remember you'll probably have to look it up if you're like me every single time but Once you've done it a few times it should kind of get you in there. So the next one is A tip for editing your Vim RC file. So let's just say I'm going to go to my end Vim file So I'm going to CD into .config and Vim and then General and then I Vim into general dot Vim Okay, and then we go back to the top here and let's just say I've gone through made a whole bunch of edits to my Vim RC file I've changed colors. I've had some key bindings or whatever Now if you're going to do this manually in order to get those changes to a take effect You have to save your current buffer or your current file and re-enter it, you know, like manually However, if you have it set up a certain way you can go through and do colon source In my case, I'd be doing init dot Vim Which is my main neovim config file But for most people you'll what you want to do is do colon slash dot Vim RC Now I would have to give the full length the full path to my init dot Vim But that was just an example. You run that if I do .config and Vim init dot Vim and hit that and what that's going to do is reload live Your Vim RC file so that the changes you've made take effect without actually you having to go through and close it Now the cool thing about this is that you can go through and set up a key binding so if I go through and into my key bindings Uh folder here and then vim into key bindings. I have a key binding For exactly this so what this does is allows me to hit leader s So in my case the leader keys the space keys so I can do space s And that'll go through and do the exact same thing I had to type out with so if you go through or editing your Vim RC a lot Put this in your key bindings and that will allow you to go through and source your Vim RC file without having to close it all the time Just remember you're going to have to change this path. So if you're using regular Vim, it's probably just going to be Vim RC instead of What I have here now I have a plugin called nerd tree which allows me to open up a file manager that looks like this And it's really cool But you don't need that let's just say you don't want to have to add a whole bunch of extra plugins You can actually use vim's built-in file manager by going colon capital e small x And that'll actually go through enter into a file picker for you So you can actually we can go up a level here and go to say General again and then general dot vim and that'll open up And that's how you can navigate through your file structure without closing vim Doing cd and all that kind of stuff you can just do it from a built-in file manager right inside vim The next thing I should teach you Is how to open up a file from within vim? So let's say you've been editing this and you want to open up a different file you can do colon e small case e And then the path to the file you want to open and this can be a relative path So if you're in the same directory you can just type in Whatever file you're in but if you're not in that you'll have to give an absolute pass So in this case we'll do dot config Uh and vim init dot vim and that will go through and that will open up init dot vim from where we were Okay, so the next one I want to talk about Is when that is going to be life changing for you probably if you don't know it and that is Let's just say you you have a structure like mine And you're using neo vim or even vim because vim will allow you to create a vmrc like this as well And your stuff is all over the place It's in separate files and directories and all that kind of stuff And you don't want to have to go to a file manager, but you have the path right in front of you For example right here. I have this path If I wanted to go to this path normally I'd either have to open up the net tree Or nerd tree I'd have to open up the ex file manager that I was doing or I'd have to close vm And get there manually through the command command line Or I can just hit this key binding gf And that will take you to The file that you were highlighting. So that is Gf and it's really really cool. I use it all the time. It's so good now Let's say you've Want to switch two characters around this one's a really easy one. Let's say I'm making a comment here And I've mixed these two characters up. So in c Plus plus the comments are always slash star and then star slash But I mix these things up all the time. So I might have done star slash And then you know did the comment and then did you know slash star? And it's wrong because the mixed up So if I'm back here in normal mode if I wanted to get these right without actually having to edit them I can just do xp and it will actually switch them around now It doesn't work perfectly in this case because it actually adds a space uh Actually it didn't work at all And I'm not sure So if we do xp again, there we go that it worked then okay, and then we can go here And do the same thing here xp and it will change it to the proper place So that's when you've made one minor mistake and you don't want to go through and delete things and all that stuff Just use lowercase x lowercase p and it will switch those two characters around Okay, so let's say you've been in a buffer for a while now when I say buffer I'm basically just meaning you're in a file. It's more complicated Basically you can have multiple buffers open at the same time Which means you have multiple files open at the same time that can be in a split. You can be in a tab Whatever So I use buffer and file basically interchangeably. They're not exactly the same thing but just Bear with me for that, you know with that But let's say you've been messing around in a file for a long time And you kind of need to retrace your steps somewhere along the line you've made a mistake in the last few steps and you need to Find that Now you could just scroll up or scroll back down or wherever you've been you could do that manually Or you could hit ctrl o If you hit ctrl o That will jump you back and forth between where you've been Over a certain point now that will take you backwards in your history If you do ctrl i that'll take you forward in your history And that's really cool. So if you've made a mistake a few minutes beforehand And you kind of remember where you were but not really you can just hit those keep one of the those key bindings And it will take you backwards to where you've been in the document using your history okay At this point in the video, which has been going on for a long time. We're uh, not even halfway through I probably should not have made this 50 probably should have done 25 but We're committed now pope folks. Let's just keep going. We're going to keep chugging along At this point, we're going to get into some really cool stuff So if you thought the stuff at the beginning of this was kind of basic But you kind of toughed it out and you're still with a video. I thank you You've are about to be rewarded because there's some good stuff coming. So Let's say you want to put the output of command Into your document without having to go to the command line and copy and paste and whatever Let's just say you want to do that. So let's go ahead and What so let's go ahead and open up a new document here Let's just say I wanted to go through and Paste in the output of my zshrc file. I could do that really easily by doing this. So from normal mode What you want to do is do r oops excuse me. You have to do colon r And then do exclamation point And then the command that you want to do in this case. I want to use the cat command And then I want to do the path to the file. So in this case my zsh file is in dot config Zsh dot zshrc All right, and then if I hit enter What you're going to see is it's going to output The It's going to going to give me the output of the cat command of zshrc Basically what cat does is it just reads that file and gives me the output of that file And in this case it pasted it directly into my brand new file that I just created and you can do this with anything you can do colon R exclamation point ls and this will give me the output of ls from the directory that i'm in outside of vim in this case i'm in One of my nvim configuration files. I think so if I go through i'm in my dwm Uh file so this gives me the output of ls from that certain directory So that is really cool if you want to go through and edit or add the output of any command it works with ls it works with cat grep awk all that kind of stuff and it will take the output of those commands and put it into your file So there are a few cool things you can do with double exclamation points. So from normal mode If you hit double exclamation points like this, you'll see down here at the bottom. It actually changes it to colon period exclamation point. Don't worry about that. You can always get to this by doing double Bang bang as we say it's double exclamation point and there are a few things you can do with this So the first thing if you do bang bang and then type in the word date What that will do is it'll paste in the current date and time. That's really cool. Uh, you can also go through And run the current line in the shell. So let's just say We have a command here. So in this case, we're going to do ls till the slash.config Slash zsh Let's say I wanted to run that command now For whatever reason you have this in a script or whatever. Maybe you have a cd or you have a Whatever command you're in that you have inside of a script and you want to run this without actually having to go through and run the whole script to see if it works or Maybe you just want to see what the output of it is you can actually run the whole thing the current line by doing bang bang and then sh And then enter and basically what that will do is it will will give you the Output of that particular command and just replaces that command with the output So in order to get everything that was in that file, I'd have to do this and then I can do bang bang bang sh and then enter and then it will give me everything that was in that directory It will run that exact command and it it will work with anything So let's say you have a list of something. So you have uh Let's just say you have A list of numbers and you want to sort them In this case, they're pretty much already sorted, but let's go ahead and make let's let's let's make a mess So they're not sorted. Okay. Let's say I want to sort these things I can do that by selecting them in visual mode. So just hit v and then go down So that they're all selected and then I can go through and do exclamation point sort And that will sort them A to z or you know ascending order. I believe is maybe that's descending order. I can never remember I always get all that stuff backwards It always happens. Anyways, uh, so that's that's one way to sort you can do the whole document that way If you have them, you know numbered or whatever or if you just have a certain amount of paragraphs that you want ordered by a to z You can do that Let's say you're in a file and you want to rename it And no longer pleases you that this file is named text dot txt I can go through and change that by going doing colon save and then the new name of the file So in this case, I want to name it matt dot txt And I can actually go through and show you that this worked By doing an ls here and I now have a matt dot txt here. Now, you know, it actually just copies it to this It doesn't move it just text dot txt is actually still there. That's not exactly how I expected that to work, but it Basically the same thing It's weird that it does work that way. Uh, but at least you've renamed it. Let's say we're in Matt dot txt And we want to open up Text dot txt in a split we can do that in two different ways now Split does exactly what it says it's going to do. It's going to split the screen into two different buffers So in this case, we can do sp text dot txt xt and now I'll actually give us a Split I didn't oh type the name right, but it'll give us a split of whatever file we opened up and we can just quit that by doing Uh, capital zq or we could kind of wrote it as well if we wanted to buy capital zz and We'll do this again with the actual name Text dot txt and we can now see that it opened it up in a this is a horizontal split now Let's say that's not pleasing for me. I want to do it in a vertical split so they're side by side instead I can do colon vs Vertical split and then text dot txt as well and that puts them side by side now the problem here comes in is there's Very weird Default ways of switching between these. I don't know what it is. It's something about control w and then the vim keys I believe that's what it is. I have a setup so I can just do control do control roll h and control j Control h and control l will actually switch between them Sometimes Anyways, that did work if you see the cursor up there it moved back and forth Okay, uh, but that you have to have that specifically set up in order for that to work So let's those are splits. Okay We're in the 30s. We've made it through the 30s So let's say we wanted to let's go ahead and close one of these splits here And let's say we wanted to move matte dot txt to a different Uh directory we can do that by doing okay, so I can do colon w And then the path to the document. So in this case, I want to do colon slash matte dot txt Then we can go to do that And now if we get out of this and go to our home directory and do an ls matte dot txt should be here somewhere Which it is right here. So so that is renaming or moving of directory to a different directory Moving a file to a different directory. I should say Okay The next one is A little bit about the global command. So let's go ahead and vim into our matte dot txt file there And we have all this stuff here Let's say I wanted to List all the contents with the word that So if I wanted to do that, I do colon jives for global and then type the word that And then do slash and I'll actually go through and find all the lines that contain that and then highlight them That's not really all that powerful. But what's great about this is if you wanted to do Any lines that create that and uh input so we at least know there's one line that has the words that and input in it We can do that and then backslash And then pipe and then do input And then do Forward slash and that will actually go through and highlight all the lines That have that one and there's only one right actually There is only that one line But you can see if you wanted to find all the the iterations of the line that have certain things in them So all of the lines are a variable of a certain name. For example, you could use a The global command in order to search for those if you wanted to so this is global search in this instance You can also go through and do this convoluted thing that i'm going to about to show you now I can't tell you how or why this works. Just i'm going to put this out there. I have no clue I don't know very many people who can actually tell you How or why this works so we're going to use the global command again We're going to do a slash and then we're going to do a carrot And then we're going to do a backslash and then s and then a glob, which is a asterisk And then the dollar sign And then we're going to do slash d now what this does Is it removes all blank lines? So if we do this it'll take out every single blank line from the document and just delete them So if i had to guess it's what it's going to do is searching for all those blank lines And then that d at the end is deleting them. So, okay, so Let's say we've done a search here for config So we know config Exists several times we've gone through and we've done some searching and we want to get rid of these highlights These highlights don't go away ever unless you tell them to go away So in order to tell them to go away you do colon No h and enter and they'll go away. You can also map this in your vmrc file or your key bindings rc file if you want to do that as well. So as you as you saw Searching is done through the slash. You can do slash config again And that will do the slash and enter and then you can navigate through these Forward with the n key Lowercase n and you can go backwards with the capital n Let's just say though you wanted to search for two words. So in this case we wanted to search for export and path So in this case we can do slash export And then the forward slash or maybe this is the backslash. Yeah, this is the backslash and then the plus symbol and then path If you can spell And this only actually appears twice so we can do next and next and next That's how you search for things to have a space in between them All right, let's say you don't want to actually go have to go through and type in The search term you want to do. So first, let's clear this other search noh Okay, and let's just say we want to search for the word path Okay, we can do that by hitting the star key So the asterisk key And that will just search for path throughout the entire document And you can go backwards with that same search by using the pound sign and that'll take you backwards In the document. So if we clear no, we're using noh and then we search for the word user We can actually do the pound sign and that will take us backwards It's only has one instance in this case Anyways, so if you had a whole bunch of those it would actually take you the other direction for that search term We're in the 40s. We're in the 40s. Well, we got 10 more to go Okay, so let's just say we've gone through And made some edits here. So Let's say we wanted at the end of every one of these we wanted to do dot txt Let's just say we want to do that. So if we go down here and hit the period key, it'll do the same thing now It's Not great because we use the little lowercase i so if we go here and hit lowercase a and dot dot txt And then we go down here and do the period again. It'll do it better. So we can go through and do this Cool, huh? So it all that does is the period just Redo's the last command on the line that you were on So that's just period. That's all it does.  You're doing some scripting and you have some parentheses here and Let's put some stuff in the parentheses And then uh, let's see. We also have a couple curly brackets here We have some more stuff and we have some braces here And stuff like that. Now, let's say we're back in normal mode and we're at the beginning of the line And we want to jump to the corresponding bright closed parentheses we can do that By using the press percent sign. So if we hit percent sign, it'll jump the cursor to the corresponding closed parentheses or bracket. So if we're on this, uh, If I can actually get Let's say I'm on this curly bracket here And I wanted to jump to the other one just hit percent sign It will jump us to that other curly bracket. The next one is really easy I've been using it all throughout the video is undo So if I wanted to undo some of the stuff to hit you and I'll undo a whole bunch of stuff If I wanted to redo that stuff control r redos all that stuff moving right along So, okay, so Let's say we're going to make this a bash script after all this stuff. This is the ugliest looking bash script I've ever seen there's not a single command in here. They would actually run for bash. Well Actually, that's not true. There is an if statement here. They would actually work I forgot that I had the zshrc in here. So that would actually work in bash So let's just say I wanted to put a shebang in here. So if I wanted to go through and do that I could do colon. Let's see hash mark bang slash bin slash bash But I don't want to type that all out I can actually go through and have them auto complete that for me. So from insert mode hit control n And then we'll actually go through and try to auto complete it for you. So you can use bash So that's really cool Now it doesn't work all the time and I'll only work with certain things and Sometimes it gets a little bit iffy and whether or not you're in a certain directory or whatever But for the most part it will actually auto complete stuff. So if you type if you're here slash bi You can go through and do control and again And it'll actually completely auto complete that for you. There's no other option. So if we do slash and then again It's not going to do anything because it needs a little bit to work with so if we do just ba again and do control And it will actually go through and do that again So that's auto completion without without a plugin So a lot of people install plugin in order to get that kind of functionality them has that stuff built in It's just not as good as some of the plugins. So anyways, that's really cool Okay, so the next one is a little bit about visual mode. So there's two or three here. So if you do Smaller case v. Oops, we got to get actually get back into into normal mode If you do regular v This does this letter by letter as you can see what I'm just Highlighting this letter by letter then I can go through and Yankee I can delete it using the D key and do whatever I want to do letter by letter if I hit capital V This selects it line by line now. It looks exactly the same But as As we get to lines that are longer, you can see this is selecting it line by line now There is another visual mode that is really cool. So let's just say I wanted to delete the first lines Of the next 10 lines here, but I don't want to delete anything but that first letter So if I hit control V That'll actually allow me to Select this by columns So I can go through and delete. Let's say I wanted to delete all these things. You know, I could do that so that is One that the control v selects by paragraph and it works well When you want to delete the first few Columns of a line So say for example, or the last few columns aligned if they're all in line with each other You can go through and delete all the extensions of something for you know It would kind of the it would kind of work where up here where we added a whole bunch of dot txt So if we could control v and go down here, it's not going to do exactly because as you see they're not exactly lined up But if we hit d we'll delete some of the dot txt's Uh, it works better if they're all lined up. They're all exactly the same So that is visual mode, uh in a nutshell So the last one also has to do with visual mode and there's four of them here So if I if you remember way back at the beginning of this video, which it seems like this video has gone on forever, which it has We talked about how you could change things inside of other things So we talked about how if you have parentheses And you had a whole bunch of stuff here and then you did change inside parentheses You can do that But visual mode also has something similar So let's just say you wanted to select the stuff inside the parentheses So you could do vi parentheses and it would select everything inside the parentheses It does the same thing with uh parentheses Was that where I call those parentheses? I meant uh quotes quote quotation marks. Good lord matt Video's gone for talk. So change inside quotation marks all that kind And it works that it works with parentheses it works with both kinds of brackets It works with single quotes. You can just go through. So let's do a couple more examples So let's say we have a bracket here and we got some stuff here So if we do vi brackets, it will select everything inside the brackets if we have parentheses here and we got stuff inside the parentheses we do vi parentheses it will select everything in the inside the parentheses we can also go through And select a whole paragraph by doing something similar like this So if we uh go down here where we actually have some paragraph a paragraph And we do vi p and it'll actually it actually counts as all the paragraph, but let's just say We have uh, let's see here an actual paragraph With with a space in between we go back up here And do vi p it will select the whole paragraph.  That is just Blowing my mind. I did not I wanted this to be under half an hour I don't know where it will be in terms of editing because there's a lot of stuff here that I can cut out, but good lord I shouldn't see when I was putting this stuff together when I was putting this stuff together I was shooting for a hundred tips and tricks. I am so glad I stopped at 50 I would have been here for days Wasting away out of thirst and everything. So anyways, that is it For this video if you stuck it all the way through first of all, you're a trooper because I pretty much didn't stick it all the way through I almost did and I almost stopped so many times So thank you for for sticking all the way through if you if you did hit the subscribe button because there's more of this overly elongated nonsense on the channel that you can be happy with If you have just hours and hours of free time You can follow me on twitter at the linux cast. You can support me on patreon and patreon.com slash linux cast Make sure you check out the debbie in long term review that I just did that was also a really long video But not nearly as long as this one it turns out You can definitely do that. You can check that out on the page at youtube.com slash linux cast Before I go I'd like to take a moment to thank my current patrons Devon chris east coast web gen 2 is fun too marcus maiglin sven jackson knife and tool josh will lee mitchell art center merrick camp mr Fox thanks everybody for watching I'll see you next time. I need a vacation


Okay, we're back, this is Dave Vellante and we're live here at Silicon Angles, the Cube's coverage of Hadoop World 2012, the Strata Conference, they've merged those two together, Riley Media and Cloudera have came to a partnership and we're here, this is our third year having the Cube at Hadoop World, the conference is expanding, our first year was 800 on top of the previous year which was 500, then it went to 1400, it's up closer to 3,000 now, I think the official number's 2,500. And we're here, we're covering all the action, this is the Cube where we try to extract the signal from the noise, bring you the smartest guests that we can find. And we're here with a very interesting company called Rainstore, the CEO is John Bantelman and John, welcome to the Cube. Pleasure, thank you. Great to see you, it's been a while since we've talked. We were just talking off camera, we I think met in California a while back, right? It was in Boston. It was one of the first BD events that Greg DuPlessis ran, so you guys have come a long way since then, we've come a long way, so why don't you give us the update, I'm here with my co-host Jeff Kelly, but give us the update on Rainstore. Well, probably our most recent news is we raised $12 million in the last couple of weeks, so we just went through a big fundraising. Interestingly, our investors are basically a major bank and a major telco, and that represents our market. So we deliver big data solutions to the enterprise. And what's interesting is we're deployed in companies that deal with carrier-class products, i.e. products that can't break. So for our software to go into production in organizations like, you know, the biggest telco in North America, one of the biggest banks on Wall Street, it means that we're delivering a very robust and capable solution to big data. I noticed on your website, you have a blog called Hadoop the Tape Killer, somebody we're at IBM's IOD conference this week, and somebody called Hadoop the New Tape. Well, I think it's a really interesting issue. So we're dealing with a client today. They have a very large, complex data warehousing infrastructure, it's 500 terabytes. The price is in the tens and tens of millions of dollars, and they have two to three petabytes on tape. Wow. And for them to manage and get access to their history, they need a much more capable and economic scalable solution. And I think there's an interesting proposition where companies have been forced to take very large amounts of valuable production data and basically kill it, because tape kills information, it kills information. Well, once it's there, you're never going to go get it, right? Well, two petabytes on tape recovery is not viable, right? Haha, they say backup is one thing, recovery is everything. But so, you know, it's interesting, John, I'd say four or five years ago, if you said you were in the database world, people would say, oh yeah, that's nice, and they move on to somebody else at the cocktail party. Database has become one of the hottest topics going. It's like a renaissance. What's going on there, and where do you guys fit? Well, I think big data has just completely changed databases. The databases are well established. Most of the technology, relational technology is more than 40 years old, and the requirements to scale, the requirements to move from millions of records a day to tens or hundreds of billions of records a day, moving from tens of terabytes to petabytes, every dimension of data's changed. And new innovation is absolutely required to meet customer requirements. So talk about that innovation generally, and specifically, rain store innovation, we can get into it a little bit. So the corneration around most platforms is scalability. So if you think about Hadoop, Hadoop is about distributed scale out. And generally, even though Hadoop gets a lot of press, Hadoop is generally about brute force. If you have a big enough data problem, and if you can throw enough machines so that you can solve the issue, what rain store brings is some, I don't know, intelligence and efficiency to that. So the first part that we bring is the ability to store data in a very unique and very efficient form. And our data reduction is 20, 30, 40, 50X. So that means that we're saving, we're reducing the data 90 to 99%. So if you take a petabyte of data, you put it in rain store, and you're physically taking 35 terabytes of disk, you've changed the problem. You fundamentally changed the problem. You made it much easier, much more manageable. And we've cut the cost, obviously. And we've cut the cost, and then most people then believe, because you're storing the data efficiently, it's going to be slow to access. And then after it's net. I was going to ask you, what's the performance impact? I would think, to me, intuitively, it would speed it up. It speeds it up. I mean, have you seen that consistently in your customers? We've seen that consistently. So we can run both MapReduce and FullSQL, full ANSI SQL. So you can connect with your table tool, you can connect with business objects. You can run an Oracle SQL statement that's a meter long. Again, it's rain store and it works. You can also, if you want to get at your data differently, you can use MapReduce and PIG, and you can do more complex, kind of multi-structured analytics of information. So rainstalk is you, both dimension, both accesses of dimension, but we're very smart at how we read the information. Yeah, so you're seeing this as a major trend here at this event and others, this sort of unification, bringing together SQL and the NoSQL world. You saw Adapt, won the startup award, Cloudera announced Impala. We've seen Hortonworks announced, you see that, Hortonworks announced Jeff with Microsoft. And there are others, MapR announced M7. So you're seeing this trend. What do you make of that and where do you see it going and where does rainstore fit? So I think there are, you know, this is where we have lived for the last five years, right? It's about dealing with big data and the enterprise. And I think Hadoop is suddenly trying to bridge between the world west of Silicon Valley, where startups are willing to rewrite everything in Java to try to distribute the software into banks and telcos and the broader enterprise. And the skills, knowledge and tools there exist. So if you're going to sell to an enterprise, the robustness and the ability to leverage those existing tools and techniques are key. So you've got to do something on top of SQL. You can't do something instead of SQL. Rainstore delivers that and has been delivering it for years. And other companies have announced products aren't working yet and we'll see whether they work. So, you know, another, you know. You want to name names there, John? No. How about you, Jeff? Well, so why don't ask you about how you're helping customers kind of make a transition from that old world of data management, you know, just where you just kind of got your relational database. You've got the very, very structured, rigid data models to this kind of new world. You've got platforms like Hadoop and what Rainstore does allowing you to do both BapReduce and SQL in the same environment. But still, there's got to be a transition period. And how are you helping your customers deal with kind of that legacy technology and make the transition, you know, by you got to minimize the risks and, you know, maximize your return on the new technologies like Rainstore and Hadoop and other things? Well, so Rainstore runs across a variety of scale-out platforms, so Hadoop is one. But you could equally run us on a cloud storage platform with a scalable set of virtual machines. We have deployments which run on scale-out NAS and a bunch of kind of Red Hat Linux service. So we operate across any low-cost scalable architecture. And what we're finding in the industry is there are some people who love Hadoop and there are some people who don't. Sometimes in the same organization. Well, I think the most important thing is to understand, big data is a problem definition. So depending on the organization, so sometimes we're going to an organization and their issue is like the data warehouse example, the data structure, it's already sitting in a data warehouse. The problem is scalability and efficiency. So we can directly take information, we can understand the DDL, we can take their existing SQL, we can plug it in, they're not changing the line of code and it works. That transition has allowed them to move to massive scale, very low cost. We have other examples that we're dealing with where we're one partner, for example, dealing with Homeland Security. The requirements of two million records a second. And querying across 10 trillion records in a few seconds. So Rainstore can manage and deliver massive scale and it gives the flexibility to the customer to decide. So as opposed to, we are very focused on working with standards. So pick as a standard, we'll support pick, we'll support it directly, don't change the line of code, SQL's a standard, we support SQL. Talk a little bit more about your secret sauce. You talked earlier about your data reduction. Are you doing deduplication, compression, a combination of those? It's a combination but the core capability is most databases, most traditional databases, store rows. So if you've got a trillion records, you've got a trillion rows and then you have to put two indexes on top so you kind of have two trillion rows of data that you're trying to manage. Rainstore stores patterns. So if you give us a set of records, we will store the unique values and patterns of values that make up that data. We do it purely algorithmically. So we are at a very gradual level to duplicating the information. I'm also doing it very quickly because we can ingest millions of records a second. So we store everything without repeating anything. And we do it completely scalably. So it's not a bad job that you're going back, obviously. So as records are streaming in, we'll take a group of records, deduct them and we store a file. That gives us a huge advantage over a conventional database because essentially the resulting dataset that's 30 times smaller, the IO pipe, appears to be 30 times bigger. So most databases, even Hadoop, get clogged trying to get information in. Rainstore's almost always CPU valid because we're making the data so small and we're able to read it without having to re-inflate it where we can move data around at a pace 20 or 30 times faster than most conventional databases. So that's, so as we described before, the way in which we store information drives performance. And you talk about some of your larger customers before, you mentioned Telco and some others. Talk about how they're using your product specifically. So in Telcos, one of the company's cases is that I want to capture every network event. So everything that's happening in my network, every drop call, every call tried. Every time somebody phases out because they move between antennas, I want to understand my network behavior. Typically those are tens of billions of vents per day. As we move to 4G and LTE, they'll become hundreds of billions of vents per day. That raw data is actually telling the carrier or the ISP what's happening, who's doing what, how the information, how the college, how their bandwidth has been consumed, how many people are going to video. So that's a key requirement. If you're going to manage customer experience, you've got to understand the usage of the phone. The data's phenomenal. Data's just amazing. And the ability then to both capture that at speed and analyze at a pace is a key requirement. And banks, the biggest requirement for us is how do you deal with 40% data growth on a reducing IT budget when you have ever-increasing requirements to keep information around forever to meet regulatory requirements. So this whole, if you have 100 petabyte data estate grown by 40% per year, and the goal in most Wall Street banks is to reduce budget, you've got to drive efficiency. And the experience that we have in those markets is literally we're making a 10x cost difference. We're literally moving the cost of that data management by a decimal point. So it's a business-driven, commercially-driven. Exactly, it's got to be business-driven. It's got to be business-driven. So talk a little bit about that. You know, we were at the IBM IOD conference a couple, well, yesterday, and it feels like a few days ago, Dave, but- Weeks ago. Yesterday and the day before. Somebody mentioned that, you know, if you treat big data as a science project, you're going to fail. You need to have a business problem you're trying to solve, a discrete business problem, and attack it from the business problem down rather than the technology up. Do you agree with that sentiment? And if so, or if not, how do you work with your customers to best leverage your technology, especially new and new customers who are kind of maybe new to the, quote-unquote, big data? We literally look for customers that have, so big data is often described as a technology stack. To me, big data is a problem, right? So if you've got to ingest a million records a second, that's a problem. If you've got to store a petabyte of data and it's going to grow by 40 or 50% per year, that's a problem. So we focus on customers who identify whether data management issues are, and that's how we, you know, we very much have taken an industry-focused solutions route to market, right? So if you're dealing with compliance and trading, credit card analysis, smart grid data. So while there's commonalities, you've got to focus specifically on the business issue to come to the vertical and into the specific company. Yes, as opposed to saying, go play with my software and what's interesting. We're talking to customers about solving focused and discreet business requirements. So what are you guys talking about at the event here? What's going on? What's the conversation like? What are you telling prospects and customers? I think a lot of our conversations are focused upon addressing enterprise-scale requirements around big data. That's simple. Is that simple? And so what are those requirements? What are people telling you? We needed to be cost-effective. We've checked that box. Yeah, we need to be cost-effective. Liability. Well, we need to operate with standards.  I've got to be able to do that scalably and effectively. I've got to replicate data across a wide-area network in order to address, you know, data security issues. So there are a large set of requirements which are really driven around enterprise needs. And that's where Rainstore, we believe, brings something to the big data party. Excellent. My last question, John, is, so we here, this is, like I say, our third year at Hadoop World. It started out as a lot of tire kickers, a lot of sandbox activity. It's evolving, companies like yours now talking about solving real business problems. Where do you see this going? Is the traditional world of analytics and big data ware, or let's call them data warehouses, is that going to give way to this world of Hadoop? Right now you sort of got the Hadoop tail wagging the dog. Do you see that equation flipping? Do you see those two worlds coming together? What's your vision for the future? I think the dynamics of this industry are changing completely. So two years ago, probably 10% of the people who we were speaking to were interested in the deep. Today, 80% of the POCs we're running are on Hadoop. So I mean, if you look at that in terms of, now I wouldn't say 80% of the deployments are on Hadoop. Many people will test out the product on Hadoop and say, well, I want to start off more conservatively. I'm going to run this on a NAS box. But Hadoop is absolutely the center of the conversation. I think Hadoop will challenge the data warehousing technologies. I mean, I think there's a, at the scale that data's now being managed, paying, you know, 20, 30, 40, $50,000 a terabyte when you're thinking petabytes is hard. So, and I think the technologies that we have, the technologies which are coming out of cloud error within parlor, although still early, people are going to say, do I really need to have two platforms and shuffle the information from my very expensive, very scalable Hadoop cluster into this very expensive appliance because I want to query it. And the answer will be, the answer is probably not. Well, Hadoop will do more and more and more and more of what the business requires. Well, we were at Oracle Open World a couple of weeks ago, Larry Ellison's keynote, he said, big data, meet big iron. And the implication was you're going to have, you know, a million and a half dollar infrastructure to succeed in big data. The world that you're describing is different. Well, it's not the world I live in. I mean, we are able to deal with, you know, if I can compress my data and run a petabyte of infrastructure on 20 nodes, 30 nodes, that's interesting. That's really interesting. And those nodes cost me 5K, it's really interesting. Yeah, I think Larry's, that's Larry's world. And I think... Larry bought a sunny, he's got to find somebody who's going to buy it, right? Well, he could buy his way into the big data world, but hopefully the innovation will continue without him for a while. I think, as you say, this is the most innovative time in data management. Yeah, no doubt. We believe we are part of that, but obviously there's a whole host of other companies coming up with brilliant ideas and great new products. There's so much out there. And the industry is going to be transformed. Yeah, excellent. Well, thank you very much, John, for coming on. Rainstore, keep an eye on these guys. Just raise the big round, congratulations on that. And congratulations on all your success and good luck, we'll be watching. Cheers, man. Thanks very much. Appreciate it. All right, keep it right there. We'll be back with our next guest live from Strata and Hadoop World. This is theCUBE. And I'm Dave Vellante, keep it right there. John.