Getting Started With Doom Emacs

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
so those of you that have been following the channel know that a couple of months ago I switched from vim to Emacs and I switched to the vanilla Emacs canoe Emacs with the default Emacs key bindings and I stuck with that for a few weeks because I wanted to learn Emacs you know the original Emacs before I started hacking on it and changing it well after a few weeks I realized the default key bindings for Emacs quite frankly suck really bad they're inefficient they're not very intuitive and quite frankly they're dangerous you could suffer from some serious carpal tunnel and repetitive stress injuries due to the crazy Emacs key bindings so I wanted to switch back over to the vim key bindings and luckily there are several distributions of Emacs out there many of them use the vim key bindings and one of the ones that I kept hearing about and I wanted to try is doom Emacs doom Emacs is hosted over on github and it is a very attractive Emacs distribution it's got a bunch of plugins installed it's very easy to activate the plugins you want deactivate the plugins you don't want just reading a little bit about what exactly is doom Emacs quote it is a story as old as time a stubborn shell dwelling and melodramatic Zimmer in Deus of the features of modern text editors spirals and to despair before succumbing to the dark side so what it is it's Ganu Emacs with evil mode installed evil mode is what basically turns Emacs the text editor into them so you've got all the vim modes and the VM key bindings but you get all the niceties of Emacs with Miam so you get things like maggot you know the git client and or gamma which is just fantastic for making to-do lists and outlines and note-taking you get things like mu for e which is the built-in email client in Emacs and aaww which is their built-in web browser you also have various shells built into Emacs you can even do some video gaming inside MX if that's what you want to do so Emacs is much more than a text editor but the text editor quite frankly is lacking when compared to them so this solves all the problems right it gives you the best of both worlds it gives you a max the text editor basically emulating everything you love about them but you get all those extra tools that are inside Emacs let's get started with new me max how do you get this thing installed so if I go back to the github page right up under the screenshot of doom Emacs you have the Quick Start Guide basically you run two different commands you need to of course get clone this repository so let me switch to the desktop and bring up a terminal so I'm gonna open up a terminal and let me go ahead and zoom in a little bit so you guys can see exactly what's going on so the installation instructions the first thing you need to do is get clone that doom Emacs repository so you type this command get space clone space the location to the doom Emacs repository space and then where do you want to clone this repository you need to clone it into your home directory slash Emacs dot d directory now if you already have Emacs installed and you already have a custom configuration in that directory that Emacs d-- directory back all that stuff up right matter of fact I would just rename your current Emacs dot d directory to Emacs d dot backup before you run this command that way in case you don't like doom Emacs and you want to go back to your old configs and you still have them otherwise this could overwrite your current configurations and you lose them if you didn't have them already saved somewhere so go ahead and get cloned the doom Emacs repository this may take a minute or two then go ahead and run this command your home directory slash D max D slash bin slash doom space install this actually runs the doom Emacs install script this may take a couple of minutes as well alright the install script is finished running one last thing to do is we need to run the command home directory slash xD slash bin slash doom space and instead of install we need to do refresh this refreshes basically your config file and everything that kind of auto loads when you launch new meme X it's almost like a recompilation you need to run the Refresh command anytime you make any significant changes to your doom Emacs configuration and the installation should be complete so let's launch doom Emacs for the first time and this is the default doom II match you are presented with very attractive welcome screen here it gives you some hints as far as the key bindings that are already set up your leader key which is the key that you're gonna use for many of your key combinations in default the new Emacs you do everything usually with the ctrl key or the Alt key or the Escape key and those are very hard on your pinkie especially that's why those key bindings are kind of dangerous and they can do some serious damage to your hand do me max uses the space key for most of its key combinations which makes a lot more sense for example if I wanted to open a project space PP so if I type to space speed P it would open up a project I don't have any projects to open up so uh get rid of that if I wanted to open up a file space period space period opens up basically our file browser here inside doom Emacs and if I wanted to I could just open anything how about I open up my bash or C file so dot bash or C and this should open up bash RC here inside doom Emacs now by default do me max again has evil mode installed by default so no more of the crazy control X control C control X control F you know meta X you know all those crazy key bindings and you know key combinations key chords is what good new Emacs calls so no we are using just your standard film key bindings so you know you can navigate with J and ill and H&K you know for up down left and right GG goes to the top of the document the first line capital G goes to the last line of the document GG again if I wanted to five capital G takes me to the fifth line gg back to the first line if I want to search for something just do a slash and then search for something how about my name I know it's in the document somewhere actually it was only on the second line I really didn't need to search for it anyway I can escape to get into normal mode I can ID to get into insert escape to get back into normal mode I can do something like shift V to get into visual mode so I can you know select some blocks of text anyway very typical film key combinations work here in do me max I won't cover you know how to do things in film using the film key bindings I've done videos on basic film tutorials before check those out if you're unsure about the vim key bindings I'm still learning all the doom Emacs key bindings but they are a kind of mnemonic they kind of make sense again the leader key is the space key so you do something like space WF or window V for vertical split so that would be the same as doing in vim which you could also do : and then vs for vertical slit and that would also get you a vertical split now to close a frame what you would do is again space W for window and then do C for closed so space WC to close so once again in space w v for vertical split and then I could do space period to get into the file browser and maybe open up another config file maybe something in I don't know how about the dot MX dot d directory such as the unit dot L now this is your new and yet dot al you know inside the Emacs dot d directory but this is not like the onion you've probably been hacking on if you were using a default instance of Emacs you are actually not supposed to heck on this config file this annette dot dl you really shouldn't be playing around with anything actually you shouldn't be playing around with anything in the Emacs directory' do me max creates a second directory that all your hex are supposed to go in it creates a directory called dot doom dot D and inside that directory there is also an anneal file and a dot config dot L file and those are the files that you hack on and edit and make all your customizations to you don't mess around in the dot Emacs dot d directory I type space period again to get to the file browser and let's go ahead and get into the dot doom dot D directory so this is the directory that has the config files that you are allowed to play with and customize the first one you want to take a look at is the annette dot l file inside doom d so go ahead and open that one and basically this is a very straightforward config file you see lines that are commented and some lines that are not commented the commented lines the ones that start with the semicolons those are the ones that have been commented out those are not active but if you want to activate those you just uncomment them you delete the semicolons for example first thing you probably want to do is find the lines for the various languages that are installed by default there you go down here to line number 97 and you have : lang and then you have a million lines that are mostly commented out but what if I want support for I don't know maybe I want some support for other languages like Clojure or common lists actually I probably do want to go ahead and the enable Common Lisp inside do me max so I'm gonna type by to get into insert mode and jumps just backspace to uncomment that line escape and then I'm just gonna move down the list and any languages I know I want to be enabled by default and do me max I definitely use Haskell so I'm gonna again I to get into insert mode and then I'm gonna delete those semicolons and probably enable some other stuff I know I'm gonna - I'm gonna want Lew they want some JavaScript and some of the web languages anyway I'm gonna uncomment a few of these lines at the bottom you've got things for email which email client do you want to use inside do me max if you want to use one by default they're all commented meaning they're not active I am actually planning on using mu for e at some point so I will go ahead and enable that yet some other apps that you could also enable such as the calendar IRC anyway I'm good with what I've got so I'm you're just gonna go ahead and do : right to write this and then I need to get back to my terminal I'm gonna close Emacs and then what I need to do is I need to run a doom refresh again because I made some significant changes to the config file especially the doom D and yet file anytime you make changes to that specific file especially do a refresh and the Refresh is complete let me relaunch Emacs and see if my changes took effect I should have sent text highlighting in a Haskell document now I know for sure by default that's not enabled but let's check and see if my changes are in fact honored so let me open up my ex monad HS file which is my ex monad configuration file and we do have very nice syntax highlighting now for Haskell documents so this is very cool and I'm sure the other programming languages I enabled glulam Python and everything else has really nice syntax highlighting as well now but the one thing I noticed right away for me personally I find the default font size a little small now I have pretty big monitors 24 inch monitors but still you know I'm in my 40s eyesight's not that great it's not horrible some of you guys probably have much worse eyesight than me and probably would find this font size depending on your monitor size a little too small so how do we change that how do we hack on this how do I change the font face not just the size but maybe I want a different font other than the one that's presented here by default let me go ahead and show you how to do that the first thing you need to do is you know what let's do space period again and go back to the dot doom dot d directory because again that is the directory that has two config files that we can hack on and the fall that you want this time it's not the Annette il the knit DL file is basically all you do is just comment lines uncomment lines you know that one is pretty straightforward the one you actually want to add up like your custom code two is the config dot e L file so let's open that and by default this file is empty so this is the file that you want to add your custom settings for example I want to change the font so I would add something like this here in my config alright when we're setting a new font face here because I like mono no key mono no key is a very nice - base terminal font and then I also wanted to change the color scheme now the color scheme the default do me max color theme is really really nice and for most folks 99% of you you're probably good with it actually I would be good with it but for sake of this video some of you guys I know are gonna want to change the theme there is a package installed in do me max called doom - theme and in that there is I don't know like 30 different color schemes you can choose from one of them is the Dracula color scheme which is the color scheme I was already using anyway and just plain vanilla Emacs so I'm gonna set the Dracula theme so I'm gonna go ahead and write and quit this do a refresh let me just relaunch Emacs without doing the refresh yeah I don't I don't need to do the refresh if I just add things to my config DL now if I change the Anil I need to do a refresh but just adding some stuff to the config that stuff took effect right away because already I can tell we have the Dracula color scheme so if I do a space WV yeah we get a split and let's open up some files and see if we actually have the correct color here so if I do a space period and I don't know let's open up the bash or see a bash RC does have the Dracula colors let's go to the other pane and open up something so this time I will you know what since we opened it a minute ago let's do the X Monad god HS yeah and this is the dracula colors i do need to play with it a little bit right now is showing tabs right here inside the bash or see these are tabs it's highlighting that looks kind of annoying to be quite honest and then it's got the arrows as will setting up your indented columns so it's easier to visualize columns I don't mind that but I don't like having the background highlighted on that so I might have to play with that a little bit let me space period and get back into the doomed D directory and open up that config DL file once again I'm gonna hack on this a little more actually I'm gonna hack on it a lot more so basically I added my standard kind of header to my config files here that I often add you know just letting people know the location to my YouTube channel and also the location to my get lab because I will push my doom configs to my get lab page for those of you that want to examine them also I mentioned what I really wanted to do was get rid of that annoying indention highlighting and what I did was I added this section here I'm setting the indent guides to show a Unicode arrow instead of the greater than symbol but I'm also changing it so it doesn't have that annoying background on it I also added some other configs from my earlier config from my new Emacs configuration I had some email stuff going on here I just copied that over so when I launch mu for e hopefully my email client does work so I'm just going to go ahead and write this so since we're in evil mode mill mode a simple : WQ for write and quit takes care of that and then let's go ahead and quit out of my X Mon EDD config as well and then we need to relaunch Emacs and see if our changes took effect and it is complaining about an error you should investigate and remove the cause of the error all right I think I fixed the error in my config file there yeah and the problem was some of the email settings that I'd said I pointed it to the wrong of a directory anyway so that is how you hack on doom Emacs so again if you want to enable or disable plugins you do the dot doom D slash and yet dot o file and if you want to add your own custom configs you go to the dot doom D slash config il file we're just doing some stuff very briefly so if I wanted you to just open up something again just space period and then just type the path and I want to go to and just open something if I wanted to do a vertical split I would space WV for a space window vertical split or if I space WC to close I also could do something like meta X which is your standard Emacs key binding and then run a program I enabled NiO tree in the doom D slash a nil I uncommitted a deadline so Neo tree works which is kind of like nerd tree in film so it's a pretty neat little plugin I also enabled up you guys saw me enable mu for e which is the email client built into doom Emacs and of course it's gonna ask me for my password for my email I believe capital J will jump to a mil box and then I want to jump to my email here Derrick at distro Tube calm which is my email address for the channel anyway this is all my emails i could read an email right here inside Emacs i don't want to do that right now so i will will close that if i wanted to i could open up my web browser inside do me max which would be e w w is the Emacs web browser it's asking me for URL of course i could do something like distro tube calm and it would open up my website it accepts the vm keep mining so page up and page down also work so how cool is that so that was just a very quick getting started with do me max I've only been in do me max for about two days but in two days I got to say I'm very very impressed with this distribution of Emacs because it is so hard to get stored with just standard vanilla good new Emacs because you have to basically write a config file from scratch in ilios do you happen to know a list most people are not going to know anything about a lisp as a programming language so right away you're probably going to search for a prebuilt Emacs distribution and there are several popular ones out there one of the most popular ones out there is one called space max I did take a look at it but it is very heavily configured I found it to be kind of slow found it to be quite bloated and much harder to configure than do me max knew me max it doesn't have a lot of bloat in it you know that and yet al file were you comment or uncomment lines it's a very easy way to enable plugins disabled plugins so I find doom he makes to be a very sensible project and I could see myself using doom Emacs for the foreseeable future as my text editor of choice now before I go I need to thank a few special people this show was made possible by Ansem chris daniel david DJ Stallman Donnie Dylan George Kaplan a Corbin Ian lambda Liam Mitchell Nate Eck Rob Robert Sean and Willie these guys they're the producers of the show these guys are my highest tier patrons over on patreon without these guys this episode about do me max would not have been possible the shows also brought to you by all those other fine ladies and gentlemen all those names you see on the screen that help support my work over on patreon I want to thank each and every one of those guys if you'd like to support the channel please consider doing so you'll find me at distro tube over on patreon alright guys peace [Music]
Info
Channel: DistroTube
Views: 143,077
Rating: undefined out of 5
Keywords: doom emacs, gnu emacs, spacemacs, evil mode emacs, vim emacs, emacs tutorial, emacs tutorial linux, emacs tutorial terminal, emacs tutorial ubuntu, doom emacs vs spacemacs, doom emacs tutorial, doom emacs windows, gnu emacs vs vim, gnu emacs windows, gnu emacs tutorial, vim versus emacs, vim vs emacs vs vscode, emacs vim mode, vim vs emacs vs nano, emacs or vim, emacs evil mode setup, install evil mode emacs, emacs evil mode vs vim
Id: dr_iBj91eeI
Channel Id: undefined
Length: 21min 31sec (1291 seconds)
Published: Wed Dec 18 2019
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.