 Have you been thinking about maybe switching away from Vim over to Doom EMAX? Doom EMAX is a fantastic IDE, a development environment, a text editor. Really, Doom EMAX, once you get into it, can be life changing. It can completely change your entire workflow, the way you do anything, the way you use your computer. And the problem with Doom EMAX is it's rather new user-friendly to get into if you've had the right guide. And by the right guide, I mean, when you read the Doom EMAX documentation, it kind of assumes you know how EMAX works, like you've played with EMAX before, you're not a complete EMAX noob. But many people that try Doom EMAX are actually EMAX noobs. The reason they're installing Doom EMAX is because they assume it's a new user-friendly EMAX distribution and then they get into the documentation and they're just overwhelmed with so much stuff. Well, today I'm going to give you day one with Doom EMAX. Imagine today is your very first time using Doom EMAX. Follow along exactly what I do. I'm going to show you the really important keymindings you need to know about and the really important config files you need to know about on day one. And really, once you know this, you're set. So let me switch over to my desktop here. And this is Ubuntu 2204, the latest Ubuntu LTS. And then let me do a Control-Alt-T here in Ubuntu to bring up a terminal. The very first thing you want to do before you install Doom EMAX is actually to do an install of the EMAX program. So you need vanilla EMAX, standard GNU EMAX installed before you can actually install Doom EMAX because Doom EMAX is essentially a framework on top of EMAX, if that makes sense. So install EMAX first, that's one of the dependencies. There's a handful of dependencies for Doom EMAX, but almost all of them should be installed on your system. If it's a Linux system, they'll all be there by default. Typically, the one that won't be, of course, is EMAX. So install EMAX, and then now that I've got EMAX installed, I'm going to exit out of the terminal. And I'm just going to do a quick search here for Doom EMAX. And of course, you get the GitHub for Doom EMAX as the first result. Go to the GitHub page because we need the Doom EMAX installation instructions. If I go to the table of contents, you see install, click that. And you will see this code block here that is two lines. So we need to enter these two lines in a terminal. So what I'm going to do is I'm just going to copy that first line and control Alt T to bring up a terminal again. Let me zoom back in. And then I'm just going to do a super shift V to paste. And all this is, is a git clone. Now git is not installed out of the box on Ubuntu. I forgot. Ubuntu is kind of weird in this record that it doesn't have git installed out of the box. And now let me up arrow and now git clone the Doom EMAX repository. And then let me go get the second command, which is the path to the install script for Doom. And now that I've got that, let me go back to the terminal. And once again, control shift V to paste and run the Doom install. The Doom install is going to take about 10 minutes or so. Answer yes to all the questions. It'll ask you questions about installing a fonts package. You want to answer yes to that. It's going to ask you about creating an InVars file. Just answer yes to that. And because it's going to install several packages from the EMAX package manager. EMAX has a package manager built in to install various EMAX packages. This will take again about 10 minutes. And Doom EMAX finished installing. That took about 5 minutes. When I said 10 minutes, it takes about 10 minutes for me to install Doom EMAX because I use my own configs and I have a lot more programs that get installed with my version of Doom EMAX. But the base version of Doom EMAX installed, well you can see it finished in 4 minutes, 7 seconds. Now you do get some help information spit out here at the end of the installation. And one of the things it says is you need to run a Doom sync before you start using Doom EMAX. But when you type Doom sync, what happens? Nothing happens because there is no program called Doom on the system. Well actually the full path is .emax.d slash bin slash doom space sync. So you have a hidden folder in your home directory called .emax.d And in that directory you'll find a slash bin slash doom and then scripts for example sync. And what you need to do is you need to actually install or add the path to that particular script to your shell's path. And that actually tells you on the GitHub page. It's a good idea to add .emax.d slash bin to your shell's path. And that is exactly what we're going to do. So let me get back here and Ubuntu uses bash as the default user shell. So what I'm going to do is even though I've got .emax installed for now, I'm actually going to just open with vim the .bash rc and of course vim. It's not installed out of the box in Ubuntu. This is another strange decision they make. I'm not going to use nano. I'm definitely going to install vim. I guess I could have used a standard vanilla GNU Emacs, but I'd rather not use that either. Let me go into vim.bash rc. What I'm going to do is I'm just going to go down here, make some space, and I'm going to export path equals. I'm going to want the path to equal dollar sign home. That's a shell environment variable for our home directory. In my case it'll be slash home slash dt slash .emax.d slash bin. And then add a colon to the end of that and then dollar sign path. So basically we're saying we're adding Emacs.d slash bin to the already existing path is what we're doing there. So let me write and quit out of vim there. And now if I source our new bash rc. Now when I do doomsync, it finds that doomsync script, you know, and it's part of the path. So now it actually works. And now that we've run the doomsync, now we can actually launch doomsync. You can simply type Emacs and you will get doomsync. But that is not the preferred way. Most Emacs users actually launch Emacs. Emacs has a client server relationship, meaning there's a Emacs server, an Emacs daemon that can be run all the time. It's running in the background on your system. That way any time you bring up a client window, it launches rather instantly. Otherwise, you know, each instance of Emacs will launch as its own process, which is fine. But you know, each one of those will take a couple of seconds to launch where many people are speed freaks. They want things to launch immediately. So you may want to use the Emacs server. So that's what I'm going to do. So I would add the Emacs daemon to your startup hook for your desktop environment or window manager. I can't tell you how to do that on your particular desktop environment or window manager. Everyone is different. But every desktop environment or window manager has ways to auto start programs. So here in Ubuntu, if I just do a search for auto start, how about start up applications? There it is. Let me open this program and I'm going to add a new startup application. And the name, I'll just call it Emacs daemon. And the command to launch the Emacs daemon is slash user slash bin. I'll just give the full pass slash emacs space dash dash daemon. So two dashes daemon. And for the comment, I'll just write start the Emacs server and that. And now every time from here on out, when we launch into our desktop environment here in Ubuntu, the Emacs daemon should automatically start for us. So what I'm going to do is I'm actually going to log out and log back in and see if that actually works. So let me power off, log out, log out. And then let me log back in. And now I'm back in. So now if that worked, we should have the Emacs daemon running in the background. And now every time we launch Emacs, we should launch a Emacs client window, which is Emacs client all one word. If I just enter that, we get an error because you need some arguments with Emacs client. So I typically give Emacs client the following two flags. The first one dash C is necessary. This means open Emacs client in a new window, meaning its own frame. So don't try to put it in an existing Emacs frame. Make it a new window. And then I also give it this important flag dash A. This is an alternate editor command. For some reason the Emacs server is not running and it can't launch an Emacs client if the Emacs server is not running. What alternative editor would you prefer us to run? And I would prefer you to run just the standard Emacs command, Emacs without the daemon. Of course you could substitute another editor if you wanted. But now you see that actually works. And you see how quick that launched compared to before. So let me close that and rerun that. And of course it's behind the current window. I was wondering where our window went. It launched instantly but it launched behind the terminal window which is hiding it. Now obviously you're not going to type Emacs client space dash C, space dash A, space Emacs all the time, any time you want to launch an Emacs window. What you want to do, I'm going to do a control shift C to copy here. And then I'm going to do vim dash bash RC or if you're in ZSH, ZSH RC or if you're in fish find your config slash fish config file. And what I'm going to do is I'm just going to go to the end here and I'm just going to create an alias. So what I want to do is I'm going to alias Emacs equals and the command I want Emacs to equal is the Emacs client dash C dash A. Emacs command, let me write and quit that. And now let me source the bash RC. And now just typing Emacs launches the Emacs client. And you see how fast and pippy that is. Now there's one other thing we want to do. We don't actually have a graphical way to launch the Emacs client. I mean you don't want to open a terminal to launch Emacs, right? You want a button, you want to be able to maybe search through your applications menu and type Emacs client because by default the Emacs is that are here. These launchers launch standard Emacs without the daemon. So let's create a .desktop file to give us the Emacs client as an option when we do the super key here inside getting on. So what I'm going to do, I'm going to open a terminal and let me zoom in and I'm going to run a sudo find. So we're going to use the find command and I'm going to search the root file system. So I'm going to do a slash. I'm going to search the entire file system because I'm not sure where the Emacs .desktop file is but I'm assuming it's going to be called Emacs .desktop. And I'm going to do an insensitive name search. So dash I name Emacs .desktop, give it the sudo password and user share applications Emacs .desktop. So what I'm going to do is I'm going to sudo copy, so sudo cp and then I'm going to copy, ctrl shift c to copy, ctrl shift v to paste here in the terminal. I'm going to copy that and then let me paste again and where am I going to copy this to? I'm going to copy Emacs .desktop to Emacs client .desktop also in user share applications. So now that I've done that, let me cd into slash user share applications by doing ls somewhere in here. We will have that new Emacs client .desktop you see right there. Emacs client is the one we created and of course the original one is here as well. So now what I'm going to do is sudo vm Emacs client .desktop and we need to find the command that executes this. It executes with user bin Emacs and what it needs to execute is user bin Emacs client dash c dash a Emacs. That's the same Emacs client command as before. So let me write and quit out of that. Now let me do the super click key and see if there is an Emacs client. Now one of these is the Emacs client because now I have three options instead of two but they're not named appropriately. So let me get back into the terminal here and once again open the Emacs client .desktop file name Emacs GUI. Okay, so I'm going to change this to Emacs client GUI. And now when I do the super key to bring up our applications menu and I start searching for Emacs. Now Emacs client GUI is an option and that is definitely the Emacs client because it came up almost instantly. You can tell there's a definite speed difference between the Emacs client and just your standard Emacs windows. So now that you've got Emacs and DOOM Emacs installed you've got the daemon automatically starting every time you log in. You've created this run launcher so you can launch the Emacs client every time you launch DOOM Emacs. Really and this is a one-time thing. That took just a few minutes to get all of that set up. Now that it's set up you'll never have to do that again. Now actually using DOOM Emacs. Let's imagine you're a brand new Emacs user. You've never used Emacs. You know nothing about Emacs but you do know VIM, right? And DOOM Emacs uses Evil Mode which is a VIM emulation and it emulates VIM really, really well. Almost everything you know about VIM works inside Emacs. So how do you open a file or edit inside a VIM buffer? Well, you do command mode, right? You do a colon to get into command mode, colon E for edit and then just start typing the name of a file. For example, if I type .bas and then try to do a tab complete it'll let me know the files in my home directory here that meet that criteria. Maybe the bash rc is the one I wanted so let me just hit enter on the bash rc. It's very similar to VIM, right? The same way you open a file in VIM, colon E and then the path to the file works here in DOOM Emacs. But that's typically not the way you're going to open files in Emacs because there's an easier and quite frankly a better Emacs way to do this and that is the find file command. So in Emacs to rent any command that's available in Emacs you do meta x which is the alt key plus x. So meta x and then just type a command, find file is the command. When you do find file it opens this little file manager in this horizontal split here at the bottom of the screen and then you can just navigate the file system, find the file you want to work with, hit enter and it will open that file. Now find file is such a useful command there's already a key binding for it in DOOM Emacs space period opens find file. So anytime you want to open up a file space period and that's a lot quicker than colon E typing the name of the path because at least you get a file manager here and tab complete works in find file. So maybe I want to, I don't know, open something in .config you know I can tab complete .config and maybe the file I want to edit is in the auto start directory I'll tab complete that and there's an Emacs desktop file in the auto start directory and this is the file that was created when we did the startup applications thing for GNOME this is the file that automatically gets executed when you log in to start the daemon. I don't actually want to work with this file so I mean I could just colon Q to quit just like in VM and you know the window goes away but that's typically not how you want to kill things with Emacs because oftentimes you don't want to close the entire Emacs window you just wanted to kill that buffer you were working in and that's kind of what I wanted to do there I didn't want to kill the whole window so let me launch the Emacs client again once again I'll make it full screen and once again I'm going to do super period to get the find file command up and it remembers the path because why does it remember the path? Well remember the server's running right even though I closed the window Emacs did not close it has that daemon that server running the whole time so it remembered exactly where we were because it never really killed itself it closed the window but Emacs was still running so I could quickly get back into that file now if you want to kill a buffer because think of Emacs kind of as a window manager right think of everything you're looking at as a window inside a window manager so if I did a split you can do splits the same way as you do them in VM in VM you do control W followed by a key right so control W V for a vertical split that's the standard VM command that's also the standard command in evil mode in Emacs now if you want to close a split control W C to close now if you want to kill a buffer meaning I want this buffer to go away I don't need it anymore I'll never come back to this file I open this file by mistake and do me max to kill a buffer you do space B for buffer and then K to kill and that buffer goes away it didn't close the window this time it just killed that buffer and it falls back to the buffer we were on previously which was the dashboard here and now from here I could navigate to a different file to edit so I could do space period again to run the find file command maybe this time I want to get into the bash RC again I could do something here and maybe after I'm done editing the bash RC I want to do a space period and find a different file to edit maybe I want to go into dot doom dot D slash and yet dot EL and edit our doom Emacs a knit dot EL file well you see I actually did not type the path correctly I added two M's to doom and it's asking do I want to create that file it's actually going to create the file and the directory that don't exist for us in Emacs that's actually rather nice because sometimes you want to create a whole bunch of directories and sub directories and a file all at the same time that's kind of nice now in this case this was a mistake I just typed the wrong thing so I'm going to choose no don't create all that that's right it did create the a knit dot EL for us the one that doesn't exist it created a base template for us but this was a mistake so I'm going to do space B K to kill the buffer right space B K to kill the buffer choose yes because it wants to confirm that we wanted to kill that buffer and now let me do space period and then once again I'll do dot doom and this time I'll tab complete to make sure I don't mistype dot doom dot D slash and then and yet dot EL and this file here let me zoom in here this is probably the most important file on day one to play with when you're installing do me max what this is this is a list of all the base packages that are available in do me max out of the box they're not all enabled right because there's a lot of stuff and it would be rather bloated just enable all this stuff most people don't need most of this stuff right so most of this stuff is commented out but if you need for example language support for Chinese and Japanese right you could uncomment this here so I could get in to insert mode here just uncomment Chinese here and then what I would do is I would do space H R R to restart do me max and now I should have support for Chinese if that is what I needed so that that is how that work you just go and edit this file I will tell you exactly what I tend to edit just some of the things that jump out at me Neo tree is one most people probably want it's like nerd tree in them you have Neo tree in E max you have this terminal section here and I definitely want to enable most of these terminals actually because I do a lot with terminals I want the E shell and I want the term the term is like a standard terminal emulator it's really good E shell is like a shell it's like a bash shell right except it's written entirely in E max list so that's rather unique as well I want both of those for sure you have various spell checkers so you have syntax that is tasing you for every semicolon you forget and then you have spell plus fly spell a lot of people are going to want spell check so I turn that on and you have various tools for things like Ansible and Docker and things like that I'm not going to play with any of that languages it's probably the most important thing so what programming languages do you typically edit stuff in by default E max list is enabled so you'll have a syntax support and everything for E max list shell works out of the box a lot of the other languages though you need to go and actually enable when I enable all the time because I work in Haskell a lot is Haskell I do occasionally edit JSON files so let's enable that I don't do a lot with LaTeX but LaTeX is here got org enabled out of the box those of you that play with PHP PHP is here I do occasionally use Python so let's enable Python we have Ruby and Rust and Scheme you've got a lot of stuff here web I'm sure just standard web development stuff probably HTML, CSS things like that YAML is also here and we have email clients if you want an E max email client most people probably don't want one of these but there's three available the most common one is MU4E the first option and then we have other applications such as the calendar app E-M-M-S which is a music player that's the multimedia system the E max multimedia system IRC that is going to be ERC the E max IRC client I will enable that and let's imagine that's everything here in the init EL that I wanted installed and enabled all I would do what is the command to restart and re-sync doing E max from inside it remember space HR you'll use that command all the time that's a command to know space HR and usually you'll do this enough on day one because you're going to install some extra packages you'll probably forever remember space HR restarts do me max and the config finished reloading so now let me search for some of these programs that we enabled neotree is here I run it you can see it's just a nerd tree right we get the split and it's got a little representation of a file system here and I can kill that split with ctrl w c your standard vim close split command right if I do meta x e m m s which was the multimedia player I didn't enable that well let's enable it just to make sure this works so let me enable that and then write with colon W space HR and it finished installing the e m m s module so now let's do meta x e m m s and there you go you have all these e m m s commands such as you know play file find file I don't have any music here in this vm anyway but this is not a e m m s tutorial but that is a multimedia player it's a audio player music player built into e max if you need it so there are three config files out of the box here and do me max the first one you need to play with is the init.el this file here we just played with now if I do space period to get into find file and by default we're going to find a file in the current directory so we're in dot doom dot d so there's a net dot el the other config files are config dot el and this is your actual config file meaning this is the config file where you go and edit things where you create your own functions using e max list but do various things create your own widgets and various things I'm not going to get into that into this video on day one you don't know any e max anyway so you're probably not going to do much with this file but this is the file that you will eventually learn to play with the other file that you will play with is packages dot el so let me open that and packages dot el is where you place all the extra packages you know the third-party packages that are not part of the base do me max system this is where you place those packages and it's rather easy to do this so you just go to the end of all here and all you do is in parentheses you type the word package exclamation space and then the name of the package that you want to install for example maybe I want this particular package I know it exists a TLDR you guys know the TLDR command in the terminal well there is a e max package for it as well so let me colon w to write and once again space h rr to reload do me max with our new configs anytime you edit the init dot el the config dot el or the packages dot el space hr r and now when I do meta x TLDR TLDR is here let me hit enter and it says this is the first time you've run TLDR it's got to download all the TLDR data from the internet and now we can actually search using TLDR maybe I want the TLDR for said and there is the TLDR for said and I could close this split by just making sure the cursor is over there and ctrl w c to close now remember every window is a buffer everything you've opened is a buffer and those buffers stay open unless you specifically killed a buffer every buffer is open how many things are open how many buffers do I have open right now in do me max think about it I had the config dot el open a minute ago I had the init dot el open a minute ago and I didn't kill those buffers the doom dashboard is still around also you have some buffers that are always present in emacs there's a scratch buffer that's always available for you to just jot things down in there's also a messages buffer that's always there you can't kill it the messages buffer is where you get like error messages and things inside emacs so there's several buffers open if I do space B for buffer P for previous I go to the previous buffer I go space B in for next buffer right space B P for previous space B P for previous now I'm back in the init dot el if I want to see all the buffers that are open I could do meta X and then type I buffer so I buffer is the program to see all buffers and it has a key binding you see space B I is the doom emacs key binding for it but this is I buffer here let me zoom in and here are all of our buffers we have the init dot el packages dot el config dot el and then we have the dashboard the scratch in the messages that we talked about there was also the TLDR buffer remember we were playing with that so we have all of these buffers and if I just go through the list and just pick one it'll take us to that buffer we could also kill buffers from the I buffer window or I could just go to the buffer and space B K to kill and once again it's going to ask for confirmation why to actually kill the buffer and then it's asking for confirmation again because it says this buffer has been modified do I want to kill it anyway sure I don't know what modification I had made but space B K to kill it anyway so now you've got emacs setup right you've got it installed you got the daemon running now you know the basics of opening config files and you know how to navigate the file system using dear ed you know the fine file command space period now if you want a proper file manager like full screen file manager do meta X and type the word dear Ed I R E D Dear Ed is the file manager and you see it opens in a split it looks just like fine file matter of fact fine file is kind of the dear Ed file manager so if I actually do space period for fine file so space period maybe I navigate back to the home directory if I hit enter right now and I don't give it a file name I just give it the path to the home directory watch what happens the buffer actually becomes a dear Ed buffer it becomes my home directory right now I can navigate I can navigate the file system here I go into the videos directory and there is nothing there so me do it space BP for buffer previous there are actual dear Ed commands and there's a dear Ed previous previous subdirectory and you see a key binding and my config files actually have several custom key bindings for me navigating dear Ed actually navigate dear Ed using the vim keys so just hjkl and it's just one key press it's very fast you guys can check out my doom config on my files repository on my get lab if you want to check it out but on day one I definitely suggest learning the default key bindings for do me max before you start playing with other people's configs but you know how to get to various files to edit files you know a little bit about the dear Ed file manager the other thing you'll often need to do is open a terminal and what I would suggest is if you enabled any other terminals in the net.io I would enable all of them and do a meta X look for a term that's the most basic terminal emulator it's going to ask you what shell to run now bash is installed out of the box here in a boom to that's the default shell so I'm just going to choose bash and you get a basic little terminal emulator if I did a LS command you know it looks like a standard LS command right so you have a terminal available to you if you know you're doing a document or something you're doing some programming you write something maybe you need to go to the command line to I don't know run a compilation you know actually compile something or maybe debug something or you know whatever terminal command you need to run you have a terminal available to you and of course I could have opened this in a split a matter of fact if I do escape to get into normal mode and then I do control WV for a vertical split you say I get a vertical split now I've got the term open in both pains here but what I'm going to do this pain and now I'm going to do space FR for find recent file that's the other big key binding you need to know space period find file space FR for find recent files and because most of the time you're working on the same files all the time space FR gives me a list of all the recent files I've worked in maybe I want to go back to the init.el so let me open that and you see now I have the init.el in this split and I have a terminal in this split and makes it rather convenient if you're going back and forth between editing a file and running commands in a terminal which is something I often do so if you know VIM and now I've shown you a little bit of the basic emacs key bindings to go along with the already existing VIM key bindings you should know if you're getting into do me max now where people really struggle if you don't know all of the VIM key bindings and then try to learn do me max then it's very overwhelming because if you don't know how splits work and buffers work and then you come to do me max you never learn all that stuff in VIM you probably are not really wanting to learn it in emacs well in emacs you really have to learn how splits and buffers work it's not an option where a lot of people can kind of get away with it in VIM so just briefly let's cover this one more time I'm going to do a control w w to get into the other split that's how you swap between splits by the way in VIM and also in evil mode in emacs is control w w you see my cursor went from this split over to this split and if I do control w w again now my cursor is back in the split control w c closes that split now let's talk about specific do me max key bindings because control w is okay but I would rather do things the do me max way do me max all their key bindings begin with space and the way you do these splits and do me max if you want to you can use the standard VIM key bindings they work but this is much easier space w v for vertical split so instead of control w v space w v right you don't have to do space w at the same time right it's three different presses space w v I find that rather easy and because they're so similar to the VIM key binding is just substitute space with control and you get the same split command so space w v for vertical split space w c to close that split space w s for horizontal split space w w switches the cursor to the next split space w w switches the cursor back space w c closes the split remember the buffer key binding space B P for previous buffer space B next for next buffer space B K kills the buffer space B I takes you to the I buffer dashboard where you get a list of all the buffers and that's it I mean really once you know those key bindings on day one if you followed this video and learn space period for find files space fr to find recent files if you know the commands to open a file you know the standard VIM commands right and then you know how to navigate splits and buffers you you are okay in Emax and specifically do me max there is a much bigger learning curve ahead for you but you'll get to that you know just getting work done you can already get work done because you've got your text editor you've got your file manager you've got your terminal emulator you've already got everything set up and you're ready for success number four I go I want to thank a few special people I want to thank the producers of the show Devin Gabe James Max some Matt Michael Mitchell Paul Scott West Alan Armoredragon Chuck Mandarin Green Dai Yokai Dylan George Lee Linux Ninja Migray on Alexander Pete's archer of the door polytech reality teased for less red profit Steven and Willie these guys they're my highest do me max it wouldn't have been possible the shows also brought to you by each and every one of these very fine ladies and gentlemen without these guys I couldn't do what I do these are all my supporters over on patreon because I don't have any corporate sponsors I'm sponsored by the community if you guys like my work you want to see more videos about Linux free and open source software do me max subscribe to distro tube over on patreon all right guys peace and when you need to relax just do me max Tetris