Configuring my Emacs. Vim users are not invited!

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments

Not invited? Then, this is my HHKB2 :P : https://i.imgur.com/xcm8CqH.jpg

πŸ‘οΈŽ︎ 5 πŸ‘€οΈŽ︎ u/VanLaser πŸ“…οΈŽ︎ Jun 19 2017 πŸ—«︎ replies

Nice HHKB Pro2 :)

πŸ‘οΈŽ︎ 3 πŸ‘€οΈŽ︎ u/rootbox πŸ“…οΈŽ︎ Jun 19 2017 πŸ—«︎ replies

Please make this into a series. Please@!!@

πŸ‘οΈŽ︎ 3 πŸ‘€οΈŽ︎ u/_binder πŸ“…οΈŽ︎ Jun 20 2017 πŸ—«︎ replies
Captions
hello and welcome to another video on sodium channel today I'm going to show how to configure my Emacs so get ready I'm regarding that video on the stream so if you want to like join the future streams you can follow me on Twitch slash dodging and I'm also animosity my own peace youtube channel I'm making that video because once in a while I get asked about my Emacs configuration and my ass firewall is always the same as you give the link to my index configuration repo so I keep my configuration in the github repository on the github I also going to put the link in the description and I do that because I cannot remember how I can figure out my Emacs so the point is I just configured my Emacs and forget about it so everything that I show on my streams is essentially like a muscle memory of my fingers I just train myself to use my specific Emacs configuration and I don't remember how it works it's like it's like riding a bike you don't think about how you ride it back you just ride the bike and I don't know how I use my Emacs I just use it so I have an idea I want to remove my Emacs configuration completely and start using the empty and configured Emacs in that way I will feel what is wrong and will naturally try to reconfigure my Emacs to the state where I used to use it and that will help me to show you how I actually configure my Emacs and how I actually use my Emacs so it's going to be sort of an experiment I don't know how it's going to go it's going to be useful for anybody but I just want to try that okay first of all we need to go and remove my Emacs configuration so it's actually quite a kind of interesting like probably any image configuration starts with dot Emacs file this is the file that is loaded up when you start your Emacs actually it's not the only file that is loaded up when you start your Emacs there are so all of them but I use mostly adult Emacs because I don't know for historical reasons probably and there are a couple of additional stuff like the image that local dot image that are asked Snippets those additional folders are just my folders like folders of my configuration where I just keep stuff organized so they are not essentially something MX specific it's just my consideration and as you can see all of those files are sim links to other files they essentially lead to a folder where I keep my Emacs computer configuration under version control it's just an easy way to deploy my configuration from github repo to my home system I'm going to straight up remove everything that's right I'm removing everything I'm going to restart my in X and this is how when your Emacs looks like this is not something a used to use as you can see Emacs greets you with the screen I think the user experience improved since probably the earliest versions of Emacs because at least we have Emacs tutorial and glide 2 on the greeting screen let's click on one of those links because I don't know I never actually saw Emacs tutorial oh no I actually saw that but I accessed that in a different way so there is a specific shortcut that allows to access that tutorial if you only starting to use Emacs I really recommend you to just go through that Cheetara and it's pretty straightforward tutorial we just open it and you just read it they explain you everything you have to do wait a sec amending have to have a camera on my finger so you can see what I type I think it's a good idea let me actually do that I have a second camera so this is the second camera I'm going to move it here I just realized that it's probably doesn't make any sense to show you my keyboard because keyboard doesn't have any labels in it so so yeah I'm going to go through the entire tutorial but if you're just starting with Emacs I strongly suggested to go through the entire tutorial it's really useful it just teaches you the basics so essentially what I'm going to assume is that you already know this basics and I'm going to show you how I configure Emacs with this knowledge okay I'm going to close this buffer yeah so the first thing I don't like that splash screen even though it's useful for first time when you just start Emacs because it like have all these rooms I don't like to see it all the time so the first thing that I configure I disable that splash screen when in Access started most of the Emacs configurations start with adult Emacs file in the root of your home folder so let's just create one to open a file we press control X control F which stands for find file as you can see it even says find file and we just said dot in X so this is the file that is going to be loaded up when we start Emacs and you can put Emacs Lisp code here so as you can see it says in X list here that means this file is in X list if you don't know what is least list is it weird language so you can do what Lisp is and it essentially looks like that Emacs is configured in Lisp like language which is called Emacs Lisp so what what is really interesting about Emacs is that you can view Mac's as just an interpreter for Emacs list so what Emacs essentially does it flows up and just interpret everything in your dot e max file everything we're going to put here is going to be executed when we load it up our max instance so how do I disable the splash screen and you'll remember and he makes hopeless screen yeah inhibit startup screen it's just a warble it needs to be set up to true and after that the welcome screen of Emacs is going to be gone so let's try to do that and there's interesting thing you don't have to restart your entire MX if you just edit a new expression to your emag configuration you can just go to the end of that expression and press control X control E and it evaluates that expression in the context of the current in X but in our case we just need to check if the startup screen is actually gone so we have to close Emacs and restart so yeah now as you can see there's no welcome splash screen another thing I don't like too bars and toolboxes so I usually get rid of them as far as I can remember the are just mode they are minor global mode to disable for example menu bar I have to do something like menu bar mode 0 and I can evaluate that with control XP and it's gone then you can do the same thing with 2 bar mode and it's also gone so I have an extra space for my text another thing that I usually do with my configuration I like to make the formed a little bit bigger and I remember that the specific formed is determined by horrible but I don't remember the name of the wearable so was it was the Google that next change font and I really recommend to Google a lot different stuff ok so this was not a verbal this was a function so it's a function set default font and you can put the name of default so let's just do that set default font and I usually like to use Ubuntu mana with the size around like 18 like that another thing that I would like to do is to have a different theme I usually like a dark theme so let's just go for that and remember that there was like a function to change thickness called customized themes yeah customized themes and you can pick whatever you want so let's just go to a disease and see which one is better okay deeper blue if I go back it's a little bit better so let's go with it this is where it gets weird because as you can see sometimes I can fever my Emacs like by editing the file but sometimes they can configure it like with user interface and they can save my change yeah so then it modifies my configuration so yeah it's kind of funny sometimes you edit your file sometimes it's edited for you and it gets so annoying when you have your Emacs configuration and to version control and Emacs sometimes try to edit your configuration in a way you don't want it and it's under version control you can see that in get stage stuff like Suffolk in mind Emacs auto-saving system can be pretty knowing when it create new backup files is there a way dump them in a specific file or something oh yeah this is all the discussion in the chat and this was the answer I'm going to put that in my like configuration because I think it's pretty pretty useful so parentheses are unbalanced oh it's not parentheses it's a vault okay maybe it was supposed to be called safe I think so we have other questions in YouTube chat or what do you use for navigation I'm a noob in Emacs but I've noticed that your navigation completion is different than default when you press control X control F it's a really good question so I use either Emacs Deedle I don't know how to pronounce it correctly I think it's either it's interactively do things as far as I remember you just enable that in Sirte works you do not yeah so you just enable it and it allows you to autocomplete stuff in a really cool way either mode one but either works on do with files as far as a concern I want to use the same four meta X and yeah for meta expert like we don't see such thing but for meta X there is such thing as smacks smacks is essentially either or either for meta X I'm not sure if it's available out of the box or you have to install it but let us check it so next so it's not available out in vΓ€xjΓΆ we have to install it we have to use emacs package manager to start package manager of Emacs we have to invoke command package list these packages just yes it's Luis packages it queries the remote repo of Emacs packages and allows you to pick which package you want to install so we need smacks so let's just find it max and this is very interesting there is no smacks in the default the repo ability the default repo is called Delta t max but nobody uses Alper there's not so many packages they're cool kids use Melba they have a pretty simple explanation on how to set it up essentially you just have to add their repository to packages archives and the pretty much it so we'll just go back to our configuration thingy and just copy paste that here and yeah this is something music you can see Emacs already edited our configuration it added this thing the thing we didn't ask for but I mean I like image but sometimes it's annoying okay so we edit that thing so we're just evaluated now we have a second repository of Emacs packages so let's in War Chris packages again and we will see more packages there let's try to search for snacks here the snacks okay to install that package we have to press I this essentially marks that package as the package that we want to install and we press X to actually apply the changes that we requested okay it contacts the melba and install it so now it's installed but I pretty sure we have to configure it properly okay so you can essentially just remap the global mx2 snacks okay so there is a function global key binding it requires a key and the function that will be invoked when you press that sequence of keys and this is kind of interesting as already set Emacs is just an interpreter of Emacs Lisp and every action you can do in Emacs is just essentially some Emacs with function that is invoked by pressing some key combination like everything like if when I go down like press down for example this is down on my strange keyboard there is a key beam dink and it invokes that function and we can even book it up so there's a combination ctrl H B and it shows all of the bindings in the current buffer ok heard is in the current buffer we have a binding for just one key down engine works function that is called next line this is the function that moves cursor vertically down what is interesting is that since it's a function we can invoke it programmatically so programmatically we use the same function that is used when you actually press the key down sort of a universal like everything you can do in Emacs manually you can do programmatically I can actually invoke that function next line I just type that control X control E and put evaluate the functions and move my cursor down I think in for example provide some arguments for example 10 if I evaluate that expression it will move my cursor down by 10 lines see that and this is the same function that is invoked when I actually press down isn't it amazing like the how universal air is amazing Emacs even down to such simple things and you can track down everything like you know that you press something for example Enter right you know that you press Enter you can easily look it up enter in Emacs notation is read because it's a return it invokes newline you still can invoke that function like a new line and invoke it and it inserts meanwhile you can work it again it inserts new life so you can track down each individual function that is invoked in Emacs when you press something maybe it's the same for beam as well I'm pretty sure the same for you so we need to map the meta X it's kind of interesting so we have several bindings so what I usually do edges could be placed at chunk of code and forget about it here is we can figure that and it's already pretty good so it's already usable I already like it what else can we can be installed so I have a color theme Gruber Zhirkov theme this is the color theme that I use all the time and it's available on Melba the most important thing is available Maya but then you can install it just at least packages and just find it there rubber yeah here disk so just install it customize theme yeah I just switch it and yeah there's sort of a like security check when you run like external unknown theme because it can execute some code they sort of ask you if you really want to trust this hold just say yes for everything and yeah how it looks like and they like it okay that's pretty much it there is more that I would probably add but I can do that if I'll actually start doing some duck with Emacs for example if I start programming in Haskell I'll probably have to add some Haskell configuration you will start to program in C++ I will have to add C++ or data configuration but if I will do all of that it will take hours and hours of video so I'm not going to do that instead I really recommend to check my max configuration I'm going to put that link in the description so here I guess that's pretty much it this is just my basic Emacs configuration like something that is essential for my VOC and I really hope you find it useful too that's it for this video and I see you on the next video I guess [Music]
Info
Channel: Tsoding
Views: 41,475
Rating: 4.8274932 out of 5
Keywords: Emacs, Lisp, Vim, Configuration
Id: PKaJoqQQoIA
Channel Id: undefined
Length: 16min 37sec (997 seconds)
Published: Mon Jun 19 2017
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.