 I think two of the most important programs that every Linux user should learn is VIM and Emacs. VIM and Emacs are total game changers. I know for me when I first learned VIM I was amazed. It completely opened my eyes. It opened a whole new world of possibilities open to me because you know VIM changed the way I thought about text editing. It changed the way I thought about computers in general because of how much more efficient and how much more work I could get done quicker. And it's extensible meaning you can configure it to your liking to do exactly what you want it to do and it was just a complete different way of doing things compared to your old plain text editors like nano g edit notepad and windows things like that. VIM seriously it changed my life and that's why I promote things like VIM and Emacs on the channel so much is because I know if you guys give it a try they'll change your life too but you know one of the most common complaints I get from you guys that are trying out VIM or trying out Doom Emacs is hey this is hard you know I can't learn this stuff this is complicated this is going to take me years and years to learn and even after putting all this time into it I probably still can't learn it because it's just too dang complicated and I'm telling you it's not you could seriously learn VIM in about two weeks VIM is not very complicated to learn at all at least you know the basics of VIM and then once you learn VIM transitioning to something like Doom Emacs is rather easy because for the most part text editing inside Doom Emacs is done with evil mode evil mode in Emacs is basically a VIM emulation layer basically it's your text editor in Emacs is essentially VIM so if you already knew VIM then making the switch to Doom Emacs it's not hard at all of course the problem is documentation you know where can you go to read and learn all of this stuff well the cool thing about VIM so let's assume you're starting with VIM which is definitely where I would start VIM is installed on most Linux distributions I know Ubuntu doesn't have it installed out of the box so on Ubuntu sudo apt install VIM and then once VIM is installed VIM comes with its own instruction manual called the VIM tutor type VIM tutor all one word and hit enter and this instruction manual you're in VIM here and then you just go through and just read it tells you hjkl or the motion key so l moves me to the right h moves me to the left j will move me down k will move me up you know this is lesson one essentially right and then you just go and go through each lesson such as learning how to exit VIM by typing colon q and then you'll eventually learn how to delete characters with the x key so if I put my cursor over the f in fix and I hit x on the keyboard I deleted that character you to undo etc etc you'll learn you know almost all of the basics with VIM from the VIM tutor it again it takes about 20 to 30 minutes to go through the entire VIM tutor and then once you go through it you know it because you read it right and not only did you read it it tells you to actually type these commands such as dw to delete a word right you know this is a great way to learn something because if I go to the word move here and I type dw to delete word I want you to undo because you've had to actually physically do this to go through the lesson you will forever remember it it's like it's like learning to ride a bike right you never forget how to ride a bike once you took the time to actually learn it the same thing with the VIM tutor you're going to go through this for about 20 or 30 minutes and at the end you're going to know how to use VIM and after running through the tutor at that point what you should do is then force yourself to use VIM that day forward and after about two weeks of using nothing but VIM you'll have it right you'll have it down pat it'll get to the point where after a while you will become so used to doing everything the VIM way you can't go back to your old plaintext editor because now that way of doing things is the incorrect way because you've learned this new more correct way a much more efficient way that it's you know it's weird because when you first switch to VIM it's strange it's alien it's foreign you know things are strange because you're not used to moving in this weird way after a couple of weeks you learn to love moving the VIM way so much so that you can no longer do plain text editing the way you used to it's just it becomes physically painful like it actually hurts your heart to go back to the old way and then after that I think the next step the next evolution is then trying to transition to something like doom emacs because I think that is the next step in the progression right so this is doom emacs let me launch my doomconfig.org here this is my doom emacs config file it just gives us something to look at here now again the great thing about doom emacs because it uses evil mode if you know VIM you know text editing inside you know this document and you know all of your your standard VIM commands are going to work I'm not going to show you any of that I've done videos in the past showing you guys the basics of the VIM commands so check out those videos if you haven't seen them but I think the problem that most new doom emacs users have is just the entire emacs ecosystem because it's more than a text editor right it's got a file manager built into it it's got various terminal emulators it's got a shell you know it's got a web browser built into it and it's got games or you can play Tetris inside emacs and it's it's the whole ecosystem that there's so much to it how can you possibly learn all of this stuff and I think a lot of people don't realize that emacs is self documenting meaning every single function every single variable every single piece of code that's written in emacs list that has anything to do with emacs is documented inside emacs meaning you can literally look up everything there is to know about emacs within emacs itself so to look up any kind of documentation information on emacs there are various commands that begin with the word describe so if you do meta x inside emacs alt x on the keyboard you get your command prompt and type the word describe dash and you will see describe dash key describe dash character describe dash face describe dash font yada yada yada right there's a whole bunch of the describes there's describe variable describe function these are various describe commands where for example if I did describe function and hit enter it's going to want to know what function do I want to get a description for so I'm actually not sure what function I would want to look for something here I'm just going to search for something dear ed related maybe I want to look up dear ed dash tree dash up so that's a dear ed function and it will tell me exactly what dear ed dash tree dash up does tells me the arguments it is an auto loaded interactive list function that's found in dear ed dash aux dot el if I click on that link it will actually open that particular emacs list document where I can actually read the code where that function is defined and there is that function so if I had any questions about what that function is or what it does I mean I can look at the source code right here and see now let me close out that bottom split now do me max makes these describe function describe variable describe key binding commands very easy because in do me max we have key bindings that begin with space and then h for help and you can see after I type space h then I get the list of the next keys that I could hit including k for describe key if I needed to describe a key binding or I could do v for describe variable I could do f for describe function so space h f for describe function again and this time I'm going to look up something and I'll look up something related to iv I don't know I'm just going to find a random function because I get a list of every single function that emacs knows about and it's going to know about everything because again emacs is self-documenting every time anybody writes any kind of piece of code anytime I define my own functions and my own config files and things like that immediately emacs knows about them and they're available for lookup using something like describe function so if I wanted to read about iv dash read this particular function you know I get this bottom split here and it tells me all about it it's going to give me some information maybe some examples of how it's used and of course again it will tell me exactly where the source code for iv dash read is found is found in this file here called iv.el if I clicked on it you know then I could actually read exactly where iv read is defined which is right here and matter of fact when when you click on it it actually goes not just into that file but it finds the function that you were looking up inside that file so how cool is that so let me close that split so that's describe function that's probably the most common thing you'll do is describe a function functions are commands within emacs essentially uh you sometimes will use describe variable which is space hv inside doom emacs and this is where you can look up a variable definition for example maybe I wanted to look up a variable for or dash table dash any dash line dash rejects and it will tell me exactly what that value is currently set to and you see here is the value for it so that is a quick and handy way to get a variable definition now one i use sometimes is help for key bindings for describe bindings which i believe in doom emacs is space hb actually it's space hb b so two b's so one more b describe binding and it will give you a list of every single key binding that doom emacs knows about you can see space tab is the prefix command space return is bookmark dash jump and of course there's going to be like literally thousands of key bindings available there if you want to describe a specific key binding meaning i'm going to type a key binding i want you to tell me what that does you could do space hk for a key and then press the key that you need a binding for so maybe i want to do space h and then f and it will actually tell me what space hf is which is the described function command that we talked about earlier where we were looking up definitions for functions it's actually council dash describe dash function is actually the the program that that particular key binding launches so again emacs self documenting it's going to tell you exactly everything you want to know from functions variables key bindings key presses it'll tell you pretty much anything you want to just know doom emacs do space h for prefix and then the rest of the help commands are listed here in which key it will tell you exactly what you could search as far as some help documentation on now one of the things i do want to briefly mention is when you're learning vim and then you're learning emacs they're very different in the way they function and feel and this causes some people some frustration because with vim vim is something you just kind of end up in eventually you open a terminal you cd around a directory system you find a file that you were looking for and then you open it in vim you know inside that terminal that you were already playing with so basically vim is something you just kind of eventually find yourself inside where emacs is the opposite emacs you actually launch emacs and start inside emacs and do everything from within emacs right you never leave emacs you never just happen to end up in emacs no emacs is this thing you open at first and do everything from within emacs and it's completely different than vim and a lot of people find that workflow strange but not not because it's weird it's just because it's different it's not the vim way and uh you know when you're transitioning from vim to emacs you got to learn to do things the emacs way the cool thing about doing everything from within inside emacs you know just launching emacs and then just being inside emacs forever is it makes a lot of things so much better than the vim way of doing things for example you know how would i ssh into a remote computer using vim well what you would do is you would open a terminal and in that terminal you would ssh into the remote machine and then once you remote into that remote machine then you launch vim on that remote machine no not vim on your computer but vim on the remote computer hopefully it's configured to your liking and then you do everything on the remote machine on vim on that remote machine that's not the way it works in emacs in emacs you're never going to remote into a remote machine and then launch emacs on that remote machine a lot of people are often confused about this is how do you ssh with emacs well you just ssh from within your emacs for example this is emacs on my local machine now if i wanted to remote into one of my web servers all i would do is space period to launch a find file here if the find file command and basically think of it as a little mini file manager and you can see right now i'm in my dot config directory i'm in dot config slash doom because that's the directory that this file we were viewing exists so anytime you launch find file it starts in the directory that you're currently working in but i could navigate to anywhere on my file system so if i wanted to i could go to the root file system but here's the thing it doesn't have to be a local file system i could do something remote from within the file manager here inside emacs so what i'm going to do is i'm going to have that opening slash and then i'm going to type ssh colon and then name of user at ip address so i'm going to do root at distro dot tube is the domain name for one of my websites and if i uh at the end i need to do a colon for a location slash which is the root directory on that remote machine if i hit enter it's going to ask me for a password i'm going to enter my password and you can see it decrypted the gpg keys so everything should be good there now it's taking a second because it should have launched me into the remote directory there it goes so this is the root directory on that remote web server for distro dot tube and you can see i'm logged in as root at distro dot tube so that's how i ssh into a remote machine using emacs and really i am mentioned that because i get so many people that really are just genuinely confused about that they're like man how can i spend all of these weeks and months tweaking my emacs config but i have to remote into so many servers as part of my job you know emacs is not going to be on that remote server and they don't realize it doesn't matter this isn't like vim where anytime you remote into the machine you're using vim on that machine emacs doesn't work like that when you have your emacs set up emacs is forever what you work in your emacs on your local system you can remote into a million different machines you're going to use your emacs and by the way that program that i just showed you is a program called tramp tramp is built into emacs it's basically how emacs can ssh into remote machines and by simply just you know hitting space periods so getting into the file and then they're just typing an address make sure your address starts with slash ssh colon and then name of user at ip address now one other cool thing that tramp can do and this is kind of a hack but it does work is a lot of people have this problem in both vim and emacs where you open up a file that you don't have permission to edit and you start playing around with this file and then you go to write it and you can't write it because you were editing a read-only file well you know then you're kind of in a pickle right because you spent all this time editing this file and you can't even save it well the great thing about emacs and especially doom emacs is they actually have these custom functions that are built in if i do a search for sudo so if i do meta x sudo you see there are three different custom doom emacs functions one of them is doom slash sudo find file another one is doom slash sudo this file and then we have doom slash sudo save buffer what these are these are custom functions that use tramp because tramp has the ability you know if you find yourself inside a file that you didn't have permissions for tramp can elevate those permissions for you but basically leveraging ssh essentially and that's what these custom functions i believe in doom emacs are utilizing so this sudo find file command which they have hotkeyed space fu you know if for whatever reason i find myself in this file of course i have permissions to edit this file but let's assume i don't let's assume this is something in my root directory and i didn't have permissions for it space fu is the sudo find file command so basically this opens us up in the file manager again in the working directory and then i go and navigate to that document that i want to open up as root but maybe i don't want to leave the document i'm already working on maybe i just want to open up this particular document as root well remember if i do meta x sudo there was this command sudo this file meaning just give me elevated privileges on this file that i'm working on right now and that's space f capital u so if i right now do space f capital u it's going to ask me for my sudo password for the root user at local host so the root user on this computer system so all i would have to do give my sudo password and now i have sudo privileges editing this particular file so that's just a a little bit of why i really like a emacs compared to vim as far as who are elevated privileges when you find yourself god i find myself in these files all the time where i'm in slash etsy and i'm working on a config file and oops you don't have permissions and you know that sudo find file command inside doom emacs is is a real lifesaver and also the ability to ssh you know from directly inside emacs again it's one of those things that you know vim users kind of find weird is like you never leave emacs right you do everything inside emacs you got the file manager right yes ssh inside emacs i can do uh pushes to my git lab from inside emacs i can do everything from inside emacs where vim you're pretty much doing all of that other stuff at the command line and you're only entering vim when you need to edit text right vim is more of a strictly a text editor where emacs is more of a complete ecosystem that you log into and you live in all day but i got sidetracked a little bit there really what i wanted to show you guys was the documentation so for those of you again you're wanting to learn vim vim tutor takes you like 20 30 minutes vim tutor very easy you can learn vim seriously in two weeks and you don't have to be a rocket scientist to learn vim vim is very very easy to learn and that's one of those things once you learn it you know it and then after that if you want to transition to trying to learn doom emacs doom emacs it's a little bit more mature to learn you know there's a bigger learning curve but it's not hard again emacs is self-documenting every variable every function every piece of code inside emacs even the code that you write yourself part of your config files or custom plugins that you create or whatever everything that is written in emacs listness part of emacs is described inside emacs so there's never a situation where there's some information that's hidden away from you that you can't find that you can't look up and get the information that you need now before i go i need to think a few special people i want to thank the producers of this episode devon gave james matt michael mitchell scott paul west um out of order kami allan linix nitcha chuck commander angri kirk diokai david dylan grigory hyko casca lee max and mike nitrix erion alexander peace art in front of the red prophets demon willie these guys they're my highest tiered patrons over on patreon without these guys this ran about vim and emacs it wouldn't have been possible the show is also brought to you by each and every one of these ladies and gentlemen all these names you're seeing on the screen these are all my supporters over on patreon because i don't have any corporate sponsors because corporate sponsors they don't sponsor vim and emacs right nobody sponsors vim and emacs that's nerdy stuff right it's just me and you guys the community i depend on your guys support for everything i do so if you like my work and want to support me look for distro tube over on patreon all right guys peace vscode wishes it was emacs