Doom Emacs For Noobs

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments

Thank you dt been wanting to try doom emacs, I guess I'm a little intimidated by it. However I am familiar with vim. Not surgical with it or polished with manipulating it. But I have sum working knowledge of it. Using it to do basic level c programming and python3. You did a crash course Haskell in doom emacs. I followed along with our vim. No plugins or nothing.

👍︎︎ 3 👤︎︎ u/Ashli_unix 📅︎︎ Sep 19 2020 🗫︎ replies

Very good video, I'm still a vim guy though lol

👍︎︎ 2 👤︎︎ u/KaosFang_ 📅︎︎ Sep 20 2020 🗫︎ replies

I just cant justify the switch. I've only just recently changed to vscodium (from mousepad) for my big code projects, and these days I mostly use vim for config files since I cant seem to get copy paste working right that 10-15% of the time.

👍︎︎ 2 👤︎︎ u/10leej 📅︎︎ Sep 20 2020 🗫︎ replies
Captions
my text editor of choice these days is do me max what is doomy max well it's a distribution of gnu emacs but it includes some pre-configuration out of the box and some of the configuration that's included with doomy max includes the evil key bindings which are the vm key bindings which are fantastic and one of the videos i've been needing to make it's been brought to my attention i've made some do me max content in the past but i've never really made a doom emacs video for people that have never used vim because i've always just assumed anybody that would be interested in doom emacs has probably used either vim or emacs before in the past and that's not necessarily the case i'm getting a lot of new subscribers to my channel recently that want to check out doom emacs but they've never used vim or emacs so some of my videos in the past even though they're kind of basic videos i do expect people to have a certain knowledge level going in for example i expect you to already went through the vim tutor and know the vm key bindings before you ever get into do me max well i shouldn't do that so today i'm going to backtrack a little bit we're going to do a doom emacs for noobs so if i start from the very beginning let me switch over to my desktop and open up a terminal and you guys should open up a terminal because we're gonna install some software because before we can actually install and start using doom emacs we need to make sure that some dependencies are installed on our system now i'm on an arch-based system so i'm going to use pacman because that's the package manager in arch linux so sudo pac-man dash capital s to install some software we need to install the following dependencies we need to install emacs of course we also want get we also need rip grip we also need fd which is a find alternative and you also need the find command itself installed on the system but almost certainly you already have find already installed if you're running a good new slash linux operating system because it's part of the gnu core utils so install these dependencies here emacs get rip grip and fd and hit enter and put your password in now i already have these installed on my system so i will decline doing that install but once you have those installed now we need to actually install doom emacs to install do me max you need to run git clone so we're going to get clone a github repository in this case so do get clone dash dash depth 1 and then the url to the doom emacs repository which is at https colon slash github.com h listener slash doom dash emacs and then do a space and then the tilde character which signifies your home directory slash dot emacs dot d because we're going to clone this into dot emacs dot d i hope that makes sense i will of course put this command in the show description that way all you guys have to do is just copy and paste but run that git clone all right and then once it runs that git clone it put everything in dot emacs dot d we need to run the following command we need to run emacs dot d slash bin slash doom slash and this is a directory where all the doom binaries live and then the doom command we want to run here is install and then it asks do we want to generate this environment of variable file yes or no it really doesn't matter for most of us if you're on mac os i think it matters in a big way i don't think domain max will actually work unless you create that file on linux i haven't noticed that that matters at all sometimes i answer yes sometimes i answer no i don't know how that works on windows i've never actually run emacs on any operating system other than linux i don't actually use windows or mac i haven't used windows in probably 12 years or so and i haven't run a mac since the 90s at some point during the doomy max installation it's going to ask do you want to download and install all the icon fonts you're probably going to want to answer yes to that and you see it finished in 138 seconds so it took just over two minutes to install doom me max i think all i need to do now is simply launch emacs so how i'm going to launch emacs here is in my command prompt here my run prompt here you guys if you have a menu system you can look for emacs in your menu system if you have rophi or d menu open that if you want to launch it from the terminal you can launch emacs from the terminal regardless how you do it the command to run emacs here or doomy max in this case is simply to run the command emacs and this is how doom emax looks out of the box this is the stock configuration now let's talk about some commands to run space fr space fr that searches for recent files so anything you've ever opened in emacs in the past will be available for you if you do space fr that's a command i often use when i first launch doomy max because typically i'm working on something i've already opened before in emacs anyway now in this case because this is a brand new installation space fr does nothing but you could do this to get into deer ed the directory editor the file manager built into emacs do space period and then you get this prompt here it's basically your directory structure here this is the file manager what do you want to search for now i'm going to search for something on my system because i know i have a documents folder slash org for org mode documents that i typically put stuff here and then i'm going to look for this document i created for this video doom emacs for noobs.org i'm going to hit enter let's see if i can zoom in a little bit so you guys can see this and you can see this is already what we've covered on this video installing the dependencies and then installing doom emacs with the git clone and we ran doom install now there are other doom commands you could use other than doom install there's also doom sync you will run that command often anytime you change your doom emacs config file you typically are going to have to run doom sync to make those changes take effect in a permanent way especially when we start adding software i'm going to cover that later but you have commands like doom sync doom upgrade doom doctor for diagnosing problems doom purge for purging orphaned packages or packages that are no longer necessary doom help of course for getting help information now the full path to all these doom commands just like the doom install command is actually dot e max dot d slash bin slash doom space and then whatever command sync upgrade doctor purge now if you don't want to have to type the full path to the doom binary you should add the path to the doom binary to your path your shells path so in your bash rc or your zs hrc you should add this here what i have highlighted there export path equals and then home slash dot emacs dot d slash bin colon dollar symbol path all uppercase now let me open up a file manager here i'm going to open up thunar here on my system because let's talk about where all of these files were placed when we ran the installation so when you install emacs just regular gnu emacs which we had to because it's a dependency right so we installed emacs it creates this hidden directory in your home directory at dot emacs dot d and this is where all of the standard config files for emacs go you're not gonna want to ever play in this directory just pretend like that directory doesn't exist because we're going to be playing with inside this directory dot doom dot d this is where the doom emax configuration files are when we run that git clone and place this stuff here and they created these files for us config.el which is our config file our init.el this is the stuff that gets loaded when you first launch doomy max and packages.el and what that is is that's where you place packages that you want to install within doomy max and i'm talking about plugins and extensions now you don't necessarily have to have your do me max configuration in dot doom dot d you could actually in your home directory there's a folder called dot config go into dot config you could create a doom folder within dot config and then place your three configuration files in that config.elent.el and packages.el in that directory if you would rather use the dot config directory me personally i just go with what's default you know emacs always creates the dot emacs.d folder and doom when you run that git clone but by default it's set to use dot doom dot d so i just leave those in my home directory i know some people are pretty anal about that sort of thing they want all their config files in the dot config folder for me i don't care but if you do care you are free to move it the only thing is you can have a doom.d directory in your home directory and also have a dot config doom directory you can have one or the other but you can't have both so let me close this file manager and i'm going to zoom in a little more here inside emacs and let's talk about your three configuration files the init.el the config.el and the packages.el and i will actually open these up so i'm going to open up a second instance of doom emacs and i'm going to do a space period to get into the directory editor dear ed the file manager and i'm going to go to dot doom dot d slash init dot e l let's open up the init dot e l i'm gonna zoom in i might have zoomed in a little too far so reading a little bit on the right hand side where i had the note about init.el this is where you'll find your doom exclamation block you see this here doom exclamation and that's all this document is is that massive block that starts with doom exclamation and what this is is this controls what doom modules are enabled and in what order they will be loaded so by the file name init.el this is when you launch doomy max this is what gets loaded as soon as you launch doom emacs this file is evaluated early when you start up and because of that you shouldn't just add any configuration stuff to this really you don't ever really want to play with the init.el the only thing you do in the init.el really is comment outlines or uncomment lines because you should basically leave it as is the only thing you should do is you see the lines that are uncommented these are modules that are active the lines that are commented out which are the ones with two semicolons in front of them those are modules that are not enabled by default so if i go through here for example you see right here colon term and then i have e-shell shell term and v-term they're all commented out well you know what i like using the e-shell so i'm going to uncomment that and i do like using v terms so i'm going to uncomment that so now that i have those uncommented they will be available to me as emacs plugins when i restart doom i'm going to have to do a doom sync for all this to take effect but that's how that works and that's how you should do this you should just go through here and if you know what plugins you want what plugins you don't want just comment out the lines that you don't want uncomment the lines that you do want the really important ones though is this section here colon lang this is for the languages this is for programming languages you know the syntax and the tools that go along with them so whatever languages that you program in or script in all the time make sure you uncomment those lines so emacs lisp is uncommented of course you're going to be using a lot of e-lisp configuring emacs but some languages that i use on a regular basis i'm going to uncomment haskell i'm going to uncomment javascript i actually don't do much with javascript latex might be a good one to also have uncommented sometimes i do stuff with lua markdown is already uncommented org is already uncommented i do sometimes edit php files i play a lot with python i definitely want that uncommented i think the only other one i might uncomment it is uh yaml because sometimes i do edit yaml files so what i'm going to do is escape to make sure i'm in normal mode and then i'm going to do a colon wq for write and quit to quit out of that now that we've done what we needed to do with the init.el the next configuration file i want to tackle is actually the third one that i've got listed here packages.el so i'm going to launch another instance of doomy max here and this time i'm going to get into the directory editor and go to dot doom dot d slash packages dot e l let's launch that file and this file there's really nothing in it it is a whole bunch of comments but that's it so what you want to do is go to the end of the document and then type i or o on the keyboard to get into insert mode i'm going to type o because that gets me a new line and puts me into insert mode and then what you want to do here is list all the packages all the plugins for emacs that you want to use within doomy max and these are packages or plugins that were not included in the init.el so this is extra stuff so how you do this is you run this command so within parentheses do package exclamation point space and then name of plugin now of course you wouldn't put name of plugin you would put the actual name of a plugin so let's do this for an example so if you're a brand new doom emacs user and you've never used emacs or vim definitely install this package here package exclamation space evil dash tutor and then hit escape and then do colon wq for write and quit now because we edited our init.el and our dot e-l let's go ahead and close this doomy max window as well it's asking me do i want to really close yes i do and then open a terminal but because we edited those files the init.el and the dot e-l we actually have to run a doom sync for those to take effect so i opened up a terminal and i'm gonna run this command dot e-max dot d-slash bin doom because i have to type the full path to the doom binary because again it's not in my shells path and then this command here sync and it's pulling down any extensions any plugins that i added to the packages.el file it's going to install them for me and it's real rebuilding doom emacs basically so the next time i launch it anything that i added to the init.el should be enabled and anything that i added to the packages.el should be available for us as well and i should mention that adding stuff to the packages.el file is the correct way to install plugins in doomy max on videos you guys have seen me install software using other methods and those other methods though are a temporary thing like if i do meta x on the keyboard and run package install which is command built into emacs if i do package install name of plugin it will install that plug-in for me in that session of do me max but when i restart doomy max that plugin won't be available right to actually make changes permanently the correct way to install plugins in doomy max is to use the packages.el file all right that sync has completed so let me close that terminal and i'm going to relaunch doomy max and let's see if our changes took effect and the easy way to figure out if our changes took effect or not remember we added evil dash tutor to our packages.el let's see if that plugin is available for us so i'm going to do meta x which is alt x on the keyboard and i'm going to type this command evil dash tutor and you see the very first option is evil dash tutor dash start i'm going to hit enter let's run through the evil tutor so this is the emacs evil tutor it is a tutorial on how to use the evil mode key bindings which are the vm key bindings that's basically a vim tutor it's just a gem tutor with emacs in mind because it's got some emacs specific stuff in here as well i don't want to turn this into a vim tutor or a emacs evil tutor but i will cover just some of the basics so if i page down on the keyboard one time in my case because i'm zoomed in so far but do j on the keyboard for down and eventually you will get to this diagram h j k l if i hit l i move right if i hit k i move up if i hit j i move down of course h goes left all right so now that you've figured out how h j k and l work these are the navigation keys that's really the most important lesson to learn i won't cover much of the rest but i will say evil mode emacs is very much like them and that it's modal and there's really two modes you need to know about it first you need to know about normal mode which you're automatically in and you know you're in normal mode if you can navigate with hjkl that's how you know you're in normal mode you can't just start typing a word and stuff happens right now if you want to get into the other mode that's very important insert mode hit i on the keyboard so if i hit i now i'm in insert mode you see it says insert at the bottom left hand side of the screen there now i can actually start typing stuff so if this is a line of text exclamation point i could hit enter and start a new line and then when you're done entering the stuff you want to enter you need to get back into normal mode hit escape on the keyboard get you back into normal mode and now i could j or k or l or whatever to navigate around now let's talk about uh copying and pasting and deleting let's talk about deleting first so if i wanted to delete a line i'm going to go back to that line i created i'm going to delete it dd or delete a line dd now maybe i didn't want to delete that line well in normal mode just type u for undo so dd to delete a line u to undo let's talk about copying a line yy for yanking a line let's and then if you want to paste it just p on the keyboard paste it p again would paste it again or period on the keyboard repeats the last command you just entered so those are a few very basic commands if i typed dw for delete word it deletes the word i was on if i type d dollar symbol which is the end of the line it deletes everything from my cursor to the end of the line for this in action i'm going to go into the middle of this line i'm going to do d dollar symbol and it deletes from my cursor to the end of the line let me undo that and what if i want to delete all three of these lines well i could do dd dd dd but that's inefficient let me undo a couple of times to undo everything what if i did 3 dd for delete three lines that works as well you to undo i could also do three yy to copy or yank these three lines and if i did a p for paste or put you see it actually pastes those three lines now for those of you that want a more in-depth tutorial on the evil key bindings or the vim key bindings what i strongly suggest is you run through the evil tutor or if you are a visual learner look for two videos i did a couple of years back i did the vim tutorial part 1 and part 2. look for those two videos on my channel i cover all of the basics as far as vim key bindings the last thing i want to discuss here i'm going to do a space fr for recent files and i'm going to get back into my org document that i created you know for purposes of this video by the way i will share this org document i created i will post a link to it or something in the show description if you guys want this it's really not a very lengthy document it's just some notes i had for the show here but the last configuration file i wanted to discuss we already talked about the init file and the packages file config.el that is the file where 99 of the time you want to make a configuration change to do me max the config.el file is the one you need to be playing with that is where you change like custom settings things like maybe you want to change the font size or the font face or some setting within a plugin that's already activated within doomy max typically you do that in the config.el so if i do space period to get into the directory editor here and i'm going to go to dot doom dot d and i'm going to open up config.el and zoom in this is what this file looks out of the box but again if you wanted to change some things you can for example i'm just gonna pick this empty space here i'm gonna type i on the keyboard for insert mode and i'm gonna run this command and you can run this command too set q space doom dash theme space and then a single quote and then the name of the doom theme i want to set here by default i think the default doom theme is called doom one or dark one or something but the one i want is doom dash pill night another thing i want to do is i'm just going to paste this line here for you guys to see set cue doom dash font we're going to set the font and for me i'm going to set the font to family mononoke nerd font i love the mononoke nerd font and i'm going to set it to size 15 because by default the doomy max font is a little small for me size 15 is about where i want it normally and so i'm going to paste these lines here now i'm going to do an escape to get back into normal mode i'm going to do colon wq for write and quit i'm going to open a terminal and i don't know if i really need to do a doom sync for changes in the config.el i know you have to do them anytime you edit init.el or packages.el i think config.el you don't necessarily have to run the sync but since it just it just takes a second to run the sync i went ahead and did it and if i relaunch doom emacs did my changes take effect yes i can already tell you that the font is a little bigger than the default font so those changes did take effect so let me do a space fr for recent files and get back into my notes here and i think that's all i wanted to cover here on this doom emacs for noobs video i hope i was able to demonstrate that it's not that hard it was very quick to actually get doomy max installed two minutes right when we got it installed and it's really not that hard to configure once you understand the three main configuration files the init.el the config.el and the packages.el you don't have to ever really learn e-lisp i mean it would be nice if you knew a little elisp you know to write a configuration file but you don't necessarily have to do me max really takes some of the pain points away right and i would say it even takes some of the pain points away from you guys that spend hours and hours and hours configuring vim there's no reason to have dozens and dozens of plugins installed in vm and to have a thousand line plus vmrc if you guys are spending all of that time configuring your vim you're wasting so much time just install doom me max because a lot of that stuff you're trying to get to work inside vim doomy max already has it out of the box now before i go i need to thank a few special people i need to thank the producers of the show michael gabe corbinian mitchell devin fran arch 5530 akami channel chuck claudio donny dylan george kell of devils louis paul scott and willie these guys they are my highest here patrons over on patreon without these guys this episode about doom e max for the noob 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 are seeing on the screen right now these are all my supporters over on patreon because this channel is supported by you guys the community if you'd like to support my work look for distrotube over on patreon alright guys peace i just tried to quit obs with colon wq
Info
Channel: DistroTube
Views: 58,126
Rating: 4.9455447 out of 5
Keywords: doom emacs, gnu emacs, emacs tutorial, text editor, emacs tutorial linux, gnu emacs tutorial, emacs evil mode, doom emacs tutorial, emacs vs vim, emacs (software), emacs vs vim vs vscode, doom emacs workflow, emacs configuration, doom emacs configuration, doom emacs installation, emacs tutorial for beginners, doom emacs for beginners, linux, gnu linux, linux text editors, linux ide
Id: iab2z21cRqA
Channel Id: undefined
Length: 25min 40sec (1540 seconds)
Published: Sat Sep 19 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.