From iTerm to Alacritty

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello in this video we are going to talk about moving from i term to alacrity or just adding alacrity i am still using the item hotkey window and i use allequity as my primary terminal i just made the switch and it's very easy and we'll go through all of that and you can see how easy it is and some gotchas and what to expect and why alacrity is so popular so i am a huge fan of item been using it for a long time whenever i'm on mac i use it it works great has tons of features it's really wonderful and i have been sponsoring it for a while i still use it in its hotkey window form and so i'm still sponsoring but not quite at the level that i was so let's take a look at alacrity alacrity's main offering what the big deal is is that it's fast cross-platform and it really is faster they mention in their read me here is it really the fastest terminal emulator and they talk about the different benchmarks and stuff like that and if you didn't notice the difference as a human being then it wouldn't really matter when you use them side by side and by them i mean item and alacrity you can really tell the difference it's much faster one other thing that i'll be showing you later is that alacrity in addition to being fast also is taking a minimalist approach and leaving things that are not necessarily the responsibility of a terminal emulator and leaving those responsibilities to something like a window manager and i'll show you what i'm talking about when we get over to the terminal i'll also show you the window manager that i use that's fantastic and also what my workflow is and why the lack of some of these features is fine with me because i don't use them anyway but if you do use them and they're important to you you have some alternatives and you can still use alacrity or you can start working with a window manager as i mentioned and the window manager that i use is amethyst it is fantastic and you'll see it in action shortly i did a video in fact my very first code smell video is on amethyst the quality is not great in the video but the content i think is thorough and covers amethyst and nothing's changed since i did that video as far as functionality goes i'm on big sur it works perfectly fine on big sur it worked on mojave i never had catalina it in theory worked on all those that shouldn't have been a problem and so you'll see that in action that'll show why you don't really need to have these things in the actual terminal emulator and then anything you see on the video today as far as configuration color scheme and anything else you can find in the what's that smell dots repo let's take a look at how we would go about migrating from item to alacrity all right so when you first open alacrity which you can do by just typing it into your spotlight or alfred or however you want the installation is very easy you drag and drop the alacrity binary into the applications folder and you're off to the races if we go back over here you can see that you can get pre-built binaries for mac os and windows and of course there's always building from source if you look here you can grab the dmg file if you are on a mac and once you open it you'll just drag the app into the applications folder and that's all you need to do and that's as far as installation however there is configuration and what you'll want to do is download this alacrity yaml file and that is how you'll get your configurations in if we open it up here you'll see that it is one big yaml file and everything in this file is the defaults so you only need to uncomment things if you're going to change them you can take all the defaults but if you're going to make a change then you want to uncomment the section and make your change okay and you can see that you can put your alacrity yaml in different locations alacrity will look in these different locations i keep mine in home config alacrity and then alacrity yaml now let's take a look at my item settings and figure out how i get them over into alacrity as far as colors and that sort of thing so we'll open up a hotkey window here and then we'll look at the item preferences all right and if i go to my profile this is my default profile the main thing of course that you're going to be wanting to deal with is your color scheme each of these colors is mapped to something under the hood but you have your standard normal and bright for each color and of course in item you can always go here and export your profile as json and then you can open that up and look for values if you need to find things and then you can just copy them over to your alacrity configuration they pretty much match up you know you you have your foreground background whether or not you want to brighten bold text i'll show you that and when you get over here to text whether you want a blinking cursor and your fonts and what faces you want to use and all of that stuff and you can see here that i'm using sas code pro which is a patched font so that i get dev icons the other piece to remember here you have these styles of no title bar you know i like to have just no title bar and when it's full screen i want to take up everything like you can see and so i'll show you how you get this set up in alacrity and you don't really have to worry too much about what these keys are because these are not going to apply to you as far as hopping between tabs and split panes because you will not be doing that in alacrity okay so we'll close up item and you can see here that for window i wanted to obviously update something here and so i have uncommented window if i leave everything alone as i said it's all defaults so let's see well i wanted decorations none if you read here you can see that none has either borders nor a title bar which is what i want i don't want borders i don't want a title bar i want nothing none now sometimes when you update things in alacrity you'll see it immediately update right at the time that you save the configuration files other things require you to restart alacrity no big deal takes a gazillionth of a second all right so decorations none is what i want but you have other options here to go with and you can look through these and the nice thing is is that these are the defaults that are in here and you can decide what you want so you can see that dynamic padding is false if you wanted to be true you could add it you could do any settings that you want position whatever else and do things like change the title but since i don't have a title bar i don't really care and dynamic title all right you can set your scrolling history to be as much as you'd like and now font is where you want to go through and match up with what you have in item i have my sas code pro nerd font mono and i want normal to actually be medium and i like bold to actually be semi-bold and you can see i have italic and it's set to 22 now i'm on a 4k retina display and so it may not look like 22 to you but that is what it is and i do my best to zoom so you can see things now draw bold text with bright colors that's this setting here in bright and bold text okay and so generally you'll want that on depending on what you're doing but i think most of the alacrity configs i see out there people turn this on you kind of expect it when you're doing things where you want to see a difference in the font weight between a directory and a file and that sort of thing and then you have your colors and when you are over an eye term you can see the colors that are there and you might want to tinker with them here and that's when it helps to have something like color highlight there's other plugins that are popular as well that do this this is reliable there's a couple other ones i might want to check out but this gives you what you need you can see what the colors are and make sure that they are what you're expecting you want to play with these a little and if you're not familiar with you know what color is being used for completion in zish and you're looking through item and that sort of thing then you can you know play around with it and some people don't like to have a sort of dimmed color or just a different color for completion but i i have to have that i want to know what it is that's a completion and what isn't and then go ahead and accept it but i've seen it done both ways and when you look at again the a term settings the white normal here is what is being used for the autocompletion and you can see that that is all sixes okay and so you can set the dim foreground by bright foreground etc and set your different colors and you'll note now these colors are highlighted but all this stuff is commented out so if i you can see here that this stuff's commented out meaning that i'm taking the defaults on those and what's nice about a lot of the settings are that they'll automatically inherit from other settings above it so for instance here if you don't specify the italic family then it will fall back and use what you specified for normal so if i wanted to use a different font for italic i can but since i don't specify it it uses the source code pro so you know all the comments in here really just tell you everything you need to know because one thing to note here is that there is no preferences if you go up here to alacrity there's nothing there there's nothing there and there's no hotkey to bring up preferences you know when i turn you hit command comma and up pops preferences there is nothing here like that everything happens here in your configuration file all right and you can go through and see what you need and we'll turn on color highlight here and you can see that white normal is the six six six six six six six six six six i told you about and that you'll see with the auto completions in zish with oh my zish and you know this is a good opportunity when you switch terminal emulators to change things up if you want or use a different color and you'll note that my cyan is that's dodger blue right here and so you'll notice my red is kind of a brownish all right so the defaults are really good i mean this has really sane defaults and you know you you can't really go wrong taking the defaults other than you know you're going to want to tell it what font you want and especially if you have a patched font you want to have you know dev icons and your prompt look a certain way and things like that then you're going to obviously need that and you know specific colors for things all right and cursor style i like to have a block cursor i like to have it blinking and i have a pretty fast blink i like that set it however you want i think by default it doesn't blink and almost everything else i have the default but you can see here that i have key bindings uncommented but i've taken the defaults and they're all pretty standard and there shouldn't be any surprises in a lot of the match i term now if you've tinkered with them in eye term then it'd be a little bit different but you can look at the mac only if you want to but if you're going to be jumping around then you want to make sure you set things properly for linux or bsd i have key 9 which is just the number 9 to reset the font size everything else is exactly what you'd expect with the equals and plus and the reason that i don't use key 0 which is the default is because i use command 0 to mute and unmute my audio everything else is pretty much as you'd expect now one thing that you will be possibly surprised by is you're sitting in here and you say okay great i want to split the terminal and you go command d and nothing happens and so you might be thinking well okay what's the hotkey for splitting well bad news there isn't one you don't split in here you don't have tabs in here because as i mentioned this is not something that alacrity does it believes that that is the job of your window manager and so what you do if you want to have split panes well you can do command n and you'll get a second instance of alacrity and this is handled by my amethyst window manager and there's really no difference here between a split pane situation and having these two separate instances and then you use your tiling window manager to move back and forth between your windows okay and so you can see that in the window that is not active the block cursor turns into a nice rectangle you can tinker with that too if you want to be dim or whatever you'd like to have and you know you can go crazy with this add another window and you can cycle through them and then with a decent window manager you can organize them however you like and then kill things off so you don't do that within the terminal you use something separate the terminal emulator is just for doing terminal stuff and so we can take a look here at the terminal and see what some things look like but it'll look very familiar because it's all the same stuff only faster so i'm in my local copy of the telescope repo and for some reason i'm oh i moved into the data folder on accident okay well you can see what things look like there let's get back out of here and have that there and you know you can set the colors to however you like and then as i was saying with the autocomplete you can see lua then telescope and if you want to get to the actions init go in and here you go and here's telescope code all nice and pretty with tree sitter and something really good and so that's what that all looks like and you can see this all comes together really nicely and you can see here that not only do i highlight the search results but i have the cursor column and cursor line creating kind of a crosshair situation so that i can always see what's happening here and that's in my config files if you want to check that out and then i can just turn them both off when i'm done with a key map and so that's really all there is to setting up alacrity you know everything works the same oh my zish and if you are using fcf out in the terminal all of that works just the same and if we look at say h top you know looks really good you know there's no big difference there you might be big on splits and tabs and things like that but you don't really need them with a window manager with my workflow i really don't need them because i use one full screen window like this and i open up neovim and then i do all my splits and terminal emulation within neovim so i don't need to open up another instance of alacrity and i do like the hotkey window and i term i'm gonna keep that around for a while generally i'll have something like this and then i'll have my floating terminal here and i can use that here and have multiple terminals open if i want to and run my tests do whatever i need to do and have multiple terminals open there so i can have that going or i can open up a vertical split and have a terminal in there and do whatever i need to do over there and so i can open multiple windows usually i'll have one window for code and another window for the terminal another window for reference so generally i'll have code tests and then some sort of terminal either with the floating terminal or terminal split for instance if i'm working on something in graphql and i'm working on the data source and the schema i might have those two files open because i want to be able to have the data source code in view while i'm working in the schema for whatever reason don't usually need to do that usually it'll be more along the lines of i'll have the test subject file and then the spec file open because i generally do test driven development and then i can run the tests up in the terminal window and that works out pretty well and so as you can see here i have my splits here i could use tabs also in vim but i don't use tabs if i want to look at what buffers i have open here with the wonderful telescope i can see my buffers and the preview is wonderful because the preview is a buffer and you have your vim key maps to move through the files so control d goes there and you know control you go through and you know that's just for you know the scrolling might be kind of nice to be able to hop over and just sort of do an on-the-fly edit or whatever but all you have to do is just open the file and it's already open there so you're good to go anyway this is my workflow and what i do with alacrity it's the same as what i was doing in i term it is much faster you just have to see it for yourself if you can remember that you were waiting for a prompt to come up or whatever else here it's stripped down you don't have those fancy features you just have a fast terminal emulator and i pretty much open neovim and i don't see the actual regular terminal here it's very rare i switch working directories and do everything else all through neovim and i've done several videos where you can see how i navigate and get around and do different things and in my dot files you can check out how to quickly use some of those navigation features and other things to get around and you basically never have to leave neovim ever thank you for watching please like and subscribe leave comments letting me know if there's something that you'd like me to cover or if you need additional information i can point you in the right direction give alacrity a try especially if you spend your life in the terminal it is great improvement you'll feel the responsiveness right away enjoy you
Info
Channel: Code Smell
Views: 12,888
Rating: undefined out of 5
Keywords: From iTerm to Alacritty, From iTerm2 to Alacritty, Neovim, joel palmer, code smell, vim, telescope
Id: 03FXyvBJijA
Channel Id: undefined
Length: 27min 30sec (1650 seconds)
Published: Fri Jun 04 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.