My Entire Neovim + Tmux Workflow As A DevOps Engineer On MacOS

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello good people of YouTube welcome back to my channel my name is Misha and I'm a devops engineer from the Netherlands and some of you guys have been asking about my configuration of the terminal and neovim and wanted to know how I've done it so I've been actually wanting to make this video for over a year but uh now I the time has finally come I'm going to be showing you how I've configured everything the principles behind it and how how I do it and that's because I um I I've spent a lot of time configuring my workflow and and perfecting it for my own needs because I work as a devops engineer Cloud engineer mainly with kubernetes I write a lot of yaml code infrastructures code I write go Python and I do take my notes in my zle Casten and I do everything as much as possible from the command line because I have a this tenant of having using a keyboard as much as possible and not trying not to use the mouse and that is how that is one of the main principles that I use for my workflow so if that sounds interesting to you then uh sit back and relax and I'm going to use this mind map that I created as a guide through through the process and this mind map will also be available for download for you if you want to read the extra notes that I have put in here as well so without further Ado let's uh let's go and I wanted to start with just right reading out my my sort of philosophy behind my workflow that I wrote down here above this image generated by Chad GPT I wish I could draw like that but I can't so my workflow is completely based on the command line I therefore have very little programs or tools running on the graphical side of the OS whether it be Mac OS or Linux all I need is a terminal and a web browser but a window manager is a big bonus to my productivity my main philosophy is to have a minimalistic workflow flow which uses very little resources it should be a distraction free keyboard centered and efficient environment to do my best work so like I said I I try to be keyboard centered I use a happy hacking keyboard which has some very special uh setup of where the control keys are and I can reach the Escape key with my pink key so it's completely optimized for vim and having a Vim Vim based workflow and that is what I basically built everything around I started building this several years ago and I've refined it with many iterations um as I went along and uh today it has been fairly stable for over the past 6 eight months I haven't done many changes but the thing is the workflow is always uh under continuous development and I'm always making small improvements here and there so if we start on the Mind map the starting point is going to be GitHub and my files repo this is where everything begins and this is also completely available to the public let's see um Misha do files here I I I keep my DOT files in a public repo they can be found on my GitHub account Misha venberg dot files and here I keep everything from my Basher C to my El conf my Vim config everything is in there I'm going to be going through a few of these in the video today but if you want to um go through these at your leisure then feel free to pay a visit here and just Fork it or do whatever you want with it it's all open to the public so everything is stored there and that that also has a reason because I want I want my configuration to be available and portable this is something that I learned from rwx Rob uh which is a YouTuber influencer and he I consider him to be my mentor even though I have never really spoken to him one to one but um my entire setup my entire philosophy is based on on his uh his philosophy as well and he has this idea that the repo should be portable so I should be able to go go to any system maybe be Linux or it should be Unix based of course but I should be able to pull in that repo and run a script and I should be ready to go well I'm I'm not completely there yet I do have some scripts in here that help me set up it's not completely automated yet but the the whole point is that I I can pull it in and then be up and running very quickly um and that's why I also store everything in GitHub publicly so it's easily easily reached but I also get Version Control on it so I try to be yeah very diligent on my commit messages as well so I know exactly what I changed and when so I can revert it when I when I want to so these contain all of my DOT files and in terms of dot file placement I use this convention of the xtg config home so if I do xtg you will see that I have a an environment variable which is set in my bash RC and this points to this do config file which is a convention you can look it up xcg config home and you will see that this is there's a whole convention based around this so that's about it for my DOT files and how I store them and the principles behind it so then I'm going to be moving over to the OS part of things I started started out using Linux as a devops engineer that's uh where my my main focus was and it has been a great learning experience to build my own Arch Linux desktop from scratch it's also where I learned the the concept of a window manager and and really got to know the internals of a Linux system but as I started working as a consultant which means that I'll be doing a lot of SE separate projects at many different customers I figured that having a custom built Arch Linux setup was not going to be the most optimal because it will also require me very often to run several VPN configurations and it also is there is a risk there even though Arch Linux never broke on me there is a possibility that it breaks on you so I I decided to move over to Mac OS Mac I chose Mac OS because it's also Unix based and I have um several other Apple devices and when I first saw how a iPhone interacts with a Macbook so I can copy something on my MacBook and paste it on my iPhone I was basically sold on the ecosystem so that made sense and it's also a Unix based operating system so it has a a a Unix file system which I I'm used to from my time on Linux so it seemed like a very very good option and it is also very very stable so I I really I I don't regret the choice at all it's uh I still have Ubuntu on my ThinkPad back in the back in the living room I will never stop using Linux of course uh it's it's an awesome awesome setup and ecosystem but in terms of a very stable Workhorse and also for Creative work I decided to go for Mac OS and in this note that I included here I also went into that a bit more in a bit more detail but here I wrote three things compatibility portability and stability and if you want to read more about those then uh feel free to download the Mind map and um take a look at it or pause the video as I was scrolling through it um on Mac OS I use brew as much as possible it's a package manager and I can install packages from the command line This is mainly because then it's easier to keep everything updated so with just one command I can update all of the binaries that are installed on my system and on Linux I use appt as a package manager on Ubuntu based systems of course on Arch I was of course using Pac-Man but um I I'm not I don't have a Arch Linux installation running currently but using Linux so much is also where my my fascination with Vim also started I was I I started using Linux when I was 16 and I had to configure a lot of servers and I I had this need of editing text files everywhere and that's also where this um my skills of with Vim were born and also where I I fell fell in love with it next in my workflow and very very important and large part of my workflow is the terminal so a terminal is is um like back in the old days which I didn't experience of course but you had these huge computers and then you had to attach some a machine to actually put in um commands into the computer that's a terminal these days we have a terminal emulator and the one that I chose is alacrity because when you when you purchase a Mac then or or install auntu there is already a terminal on there but uh there are several ways of running a terminal on your system and I chose alacrity now I have a few reasons why I use alacrity um I I I like electrity because it's minimal and it's very lightweight because it also doesn't have a lot of features it it it can be it has infinite configuration possibilities but in its base it's very very minimal and I like its philosophy and and opinionated there those are related terms but uh as I was getting I was researching several options I I was also considering for example iterm 2 and all those resource heavy programs but those always have the possibility of creating tabs up in the in the in the terminal right well as I came across alacrity I was reading through some GitHub issues where people were asking hey how do I create Windows how do I create several windows and then people said why just no you should just learn t-o t-o already does that we don't need to build that into our terminal and that basically sold me on alacrity that sort of way of there's already a program on most Unix based systems that does that so why would we have to build in that functionality in our terminal emulator just so you can click it and yeah I really really like that and I basically went with alacrity and I never stopped using it it um I I picked that because it runs everywhere so I I am sometimes forced to use uh windows or other operating systems and then at least I know that I can install aity there alacrity there and uh know that I can bring the config that I already have and that I can uh yeah have the terminal that I'm used to it's also very very fast and it's even GPU accelerated and you might think why do you need speed in a terminal but you do see a difference when you're running uh anible playbooks for example in El it Scrolls very smoothly whereas in other terminals I noticed that it can be very choppy so the the configuration of alacrity happens um in using el. tml it used to be yaml but recently they have changed and um I'll just I'm in my DOT files repo now I of course have it cloned on my local system so I will just open the elac tomble here and as you see it is quite minimal I've done some quite minimal changes to it I use a Groove box Dark theme for it and I change the font size and the the font and I set this window decorations none which means means that uh like there there's no sort of file tab or anything you don't see a border around the window as you see there is like a couple of millimeters which I have configured in my window manager so if I open up another terminal here then you see there's a few millimeters between them just so I can see the distinction but you see that there is absolutely nothing else to the to the window at all no no borders nothing so that's what that decorations none does and there is a little bit of padding in there as well but that's basically all that I've configured for the terminal emulator um like I said I like to keep things minimal and the the font that I use is the Ubuntu mono nerd font these nerd fonts those are called those are like hacked fonts that contain more symbols and everything uh you can look that up I think it's called hack fonts or nerd fonts anyway but I like the ubu BTU mono font I I I've been using auntu for years and years and years and that's of course always the the default um font that you get there but I just really like the the look of it somehow it's it's just a very comfortable comfortable um comfortable fonts to be reading I did I I I use jet brains mono and I experimented with a few other ones but this is always the one that keeps me yeah most focused and which feels most Pleasant so that's about it for the ality configuration I think um like I said you can view the config file if you want uh on there but yeah just to round that off um elri does not provide any sort of way of creating multiple windows or or or or pains or or anything like that all of that is handled by t-mo so that's all I use for um I only use alacrity for sort of um rendering my terminal on my system now in the terminal we have a shell so a terminal is nothing without a shell and the shell of my choice is Bash now this is of course uh source of heated debates everywhere but the thing is that um when you buy a Mac machine the the shell that's in there is zshell and the first thing I do is to completely disable that as soon as possible because I don't want to use Zell I did use it for a year and uh it it's a fine fine setup it gets you very nice pretty little prompts and colors and all that but um the thing is that this is the set this is a point that rwx Rob makes repeatedly is that it's bash is the default Linux shell when you install auntu zshell is not on there when you run a container with alpine or or buun or anything you will not find zshell in there you will find bash or posix shell and that's also why I decided to go full bash I I I don't use Zell because I want to be fluent in the Shell that I use on all the systems that I'm managing so these days I'm not logging into virtual machines a lot anymore I I don't um manage those a lot anymore but it does happen and when I do when I'm in there the shell that's always there is Bash so if I am in there and I'm I'm used to using zshell and I need all my pretty prompts and all my my Zell specific configurations you're going to have a problem right so you don't want to be dependent on that at all when I run a Docker container Docker run it Ubuntu here if I do Echo shell the shell is bin bash not zshell and that's the reason why I use bash for everything and I'm not going to be spending much more time on that just use bash learn bash learn bash scripting and you'll thank me later because it's one of the biggest assets that I have as a devops engineer don't use zshell next in my configuration is t-mo t-o is a um way of creating windows and pains um for me it also has the possibility to um have sessions so if you are on a virtual machine and you run t-o on there and you somehow get disconnected then your session will still keep running on there so that's also why it's so useful to become fluent with t-mo and the way I have configured t-mo is uh very much based on the way uh rwx Rob has done it I've stolen a lot from his t-mo config but as you see when I uh if I were to create a new alacrity window here and if I do another Docker run it Ubuntu if I uh let's do an up update and just install t-mo on there I'll show you what t-mo looks like out of the box uh appt install t-mo let's install that so then now I'm in my Ubuntu container and if I run t-mo this is how it looks so you have this ugly green bar down at the bottom and if I split the window or create a new one then you will see see that it creates ones down here and this is fine I I used it like this for quite a while but uh eventually I I thought it was so ugly to have this green bar under there so what I do now is I uh this this is also this is already this is my my my terminal but it's it's running t-x already and you see up here that there is one window open so if I create a new window then you will see that another one is opened and this is what how I usually have it so in my first window I usually have my second brain which is my entire zle Casten and contains all of my notes then in the second window I will be doing my code for example if I go to my lab repo or my home lab repo then here I will be having my my my code uh open like this or my deployment here will be coding and if I then need to look up something else then I would be yeah browsing my file system as I need it so say I'm in my home lab repo and then I uh want to look up something that I have in my lab repo then I would just go to my lab and then I'll search here and see how did I do this with the network policy for example and here is then a an example of a network policy that I had somewhere and then I just switch over to this one like if I would go here and I yank this out I would go here and then I can paste it in so here you see how I use t-mo for switching between Windows and how I um utilize that um the thing is that you can have Windows but you can also have paints so here I'm splitting it up so if I for example just log into my production cluster and I want to be monitoring a deployment for example and if I have my pods here and then if I would push this to my gitops repo then I can see down below that my my changes are taking effect because new pods are being deployed for example so in a typical workday I will probably have about three or four windows open like this and very often I will have uh a pain where I have like I like I showed you can 9s and then a another thing below so I might have k k K9s down here and now here I will have a flux watch flux get customizations and so here I see what flux is doing and if I would push something then I can see the changes on there and then I just switch between these windows as I go along now when configuring t-mo many people have have created um keybinds for t-mo which are deviating from the standard so to to create a new window on t-o you do contrl B and then C now I very very consciously chose not to deviate from those defaults and not again because I I'm going to be logging into systems which have t-mo there and I want to be fluent with the key binds already I don't want to be looking up the key key binds I don't want to uh remember how it is so the t-x keybinds are horrible I I don't like them at all but I promise you if you learn them if you get them in in the fingers or in the muscle memory it is not that bad it actually works quite well but the I I I chose to do it this way because then everywhere where I am I can always just use the default keybinds and I know that I will be able to switch between panes create new windows and it's not going going to be a problem at all so that is how I um utilize tmox for my workflow it is a very central part of my workflow like um riox Rob says this thing that t-mo is my window manager and yeah t-o is my window manager like I'm Mo I do most of my work from the command line all of my text editing writing my notes everything like that happens from the command line and all of this um when I do it from the command line is always done through t-mo so when I close down all of my windows you will see that here if I stop this you will see that I started up my terminal uh on Wednesday so this has been open for quite a while it's a Sunday now and then I first thing I do is open t-mo and then uh I start working from there everything happens in in t-mo so in terms of t-mo configuration um let's see t-mo where is my tx.on here v. tmo.com there so in terms of configuration I don't have a lot of it um I have a history limit on there and I ironically I say I have a keyboard-based workflow but sometimes it's damn handy to click something if you can't get it to work so I do have this the mouse option on um this is it is I don't know why I said this uh I I wrote for neovim so I it was probably necessary of course I said VI mode for copy mode so when I when you have a ton of things running then you go to copy mode and now I can uh scroll my history and I can move around here using Vim key bindings and if I want to select something then I would um go here I press space you select and then press enter and then if I then paste it then you have the stuff here so this can be very helpful if you want to be uh copying terminal output so let's say I'm writing a document and I want to paste in that output that I just copied it's very easy for me to just switch over copy it and then paste it into a document like that um but since I use Vim I use the vi key bindings and then I can just use the the vi the my my familiar navigation when I'm trying when I'm doing those things the status bar um has been styled this is basically stolen from rwx Rob and he has this amazing little program called Pomo so if I do Pomo start then you'll see up here on the top right corner there is a tomato there which is a Pomodoro Timer and it's counting down from 50 minutes and this helps me to sort of do my work in chunks and I I use that fa regularly as well but yeah let's just keep the Pomo running why not uh next um I have the count the pains from one so if you see up here I I the paints are called 1 two 3 normally it's 0 one 2 and I like to have it as a number one and here are some color configurations and yeah that's basically it very very little configuration of tmox as a whole but it is a use extremely useful tool and it's the very center of my workflow I would say it t-x really is my my window manager rounding off on t-o the last thing I wanted to say is that the what I try to do here is that to like I said create something that's minimal and distraction free so as you see here when I open a new window you see this black screen right there's nothing to distract you there's it this this really helps me to focus completely and it is a very very very comfortable setup to be working in and I I I'm I totally love it I have tended to change things quite a lot but when I arrived to this config it has been around for eight months already and I'm still super happy with it with the colors how how it looks how it feels everything one last thing before we move over to the next section is that I realized I forgot to go through my bash RC for for here and well like I said it is available on my in my DOT files repo so I don't have to go through the entire thing um it it basically speaks for itself but just to go over it you know very uh very quickly the I I mainly use it for setting environment variables and configuring my path and further I have quite a lot of aliases so I here I set up the SSH agent and otherwise I have a lot of aliases so my my V my V Alias you'll see me using V A Lot which is an alias for neovim I have all of these sort of aliases for example if I want to go to my lab repo I just type lab and then I am in this uh lab re directory and yeah I I have all all sorts of little um all sorts of little um aliases and things that help me navigate around with just typing a couple of letters and that um helped me work more quickly and more efficiently so that's basically everything that's been that's happening here in the in the bash RC just a few Al's the environment variables and sourcing completion scripts and that's basically it so yeah that was a very quick rundown of the bash orc and if you want to know more just feel free to read about to read it in my my do files repo then let's move on to the next section which is of course neovim so Vim Neo Vim this is the besides from t-o this is a real core of my my workflow I do most if not all my editing in in vim neovim and yeah it is um I I just love it so much it's strange that you can get an attachment to an editor like this but it is just such an efficient such a beautiful way of working that I I can never imagine myself working with something else even if I have to use a different editor I would Al always still use the the Vim key bindings because those are usually available in in in editors as well but I'm going to be continuing working with them for as as long as I can now I I starting on Vim I I I had like everybody else I was just using the normal vim and I had no configuration whatsoever and I just started slowly slowly building up my vmrc and and and and yeah configuring it as I went along so I did didn't start with an example config I really went with the with the the basic stuff and then sort of adap adjusted it as long the needs arose later I then switched to neovim because I was starting to require more language server capabilities and I also wanted to learn Lua and I thought I I didn't want to get too I started to get a few needs that would require a lot of Vim Scripts configuration and I was talking to a very senior friend of mine who is a Vim master and he advised me not to get into Vim script and just go for the Lua configuration instead and I don't regret it so I use Vim for both my my coding but also for my note taking for my zle casting and for writing documents for work for everything and now I'm going to go through the the the entire setup I I won't be going through the entire Vim config file I think I'm going to do that in a separate video this is just to show you how I use fim and and and how what it looks like in my workflow so my my my Vim config is set up using lazy Vim I went through a few several iterations of of Neo him first I of course Built My Own Thing I started from scratch and built my own then I started using Kickstart envm by TJ the which which is also a really great way to get things going but then later I discovered lazy vim and I've been on lazy Vim for poo over a half a year now and I'm not going back lazy VI lazy is a plug-in manager for for neovim but the developer has actually created a whole Vim yeah call it distribution around it and uh you can you can get it um let's see lazy Vim you can get it here at Lazy v.org I highly recommend it you can just run it in a Docker container to to get started and it is um yeah a great setup everything works out of the box and especially the the main reason reason I went for lazy Vim is because I spent several weekends on on configuring my LSP and even though it my my language server settings and even though it worked eventually it was never quite right and lazy Vim just comes with a very sane LSP configuration out of the box and it it just works it just works it's beautiful so yeah that brings me to the next uh section already LSP and Mason so if I just open a file here and I will go to uh a random deployment file then if you go run the command LSP info then you will see that you have a language server running on your document this helps me like you can spec this helps me uh for example write things you get suggestion as you write write new files it helps with indentation so if I indent this and I write again then you see that it it was put put back all these things and also when you're writing working in larger code bases you can hop between files or jump to the definition of a function and that's why you what you need an a language server for and language servers language servers are uh handled by Ma so this is Mason this is a a program to install and up update language servers so as you see I haven't been updating my language servers for a while so if you press G exclamation G question mark then you will see the key binds for this so let's see update all outdated packages let's do that right now and then you will see here that down here you will see a few changes and that it's already updating all my language servers so I used to do this myself and update the packages on my system Etc and just a lot of hassle Mason is great because you also uh get to browse language servers like you can just here you can see all of the language servers that are available to you and it's very easy to install them you just include them in your your configuration and it installs it automatically and as you saw it was very easy to update things as well next for for uh highlighting and formatting documents and such like I use tree sitter like basically everybody else on neovim not much uh to to say about that really um if I go to my config I don't have much uh custom config on that I just have the the languages that I want to have um where I want to have syntax highlighting for and um that's basically it let's see is there anything else in the config that I would like to talk to about at this point well here's my LSP config so here you will see it starts throwing a few errors that's something that I'm working on but don't don't mind the errors but if I want to install bicep in my language servers I just add the bicep um here in this list and then Mason will handle the rest next we have markdown so in neovim I do most of my writing in I do all of my writing in markdown basically um I take notes in markdown for my zcas my blog is entirely written in markdown and then it's converted to a HTML website by Yugo uh I when I write documents for work it's on in markdown and yeah it's it's all markdown and the most the best way to write markdown and the way to highlight it in in in neovim I think is using pandoc so pandoc is a actually a engine to convert and and generate uh documents and you basically you can convert formats and and it's for creating books and things like that but I I use it mainly for for my syntax highlighting so if I go to my second brain and if I open up a file let's see um my home lab k3s file here you will see that when I have a a do a document here then here is a markdown heading but when you select it you see that it has this hashtag this bracket but when I go down it has this sort of beautiful little s symbol I really like that and it it formats the the document quite nicely I like how it does the quotation marks so if you see when I select the the line then the qu quotation marks are like this but when I go below it the quotation marks are format it like that so it brings it to the Forefront a little bit more and if I want to sort of highlight this bit or or make that bold then you in markdown you put asterisk around it but here it will render it as as bold as well so I thought this was a very nice uh way of of displaying markdown as I'm editing it and that's basically how I use uh how how I how I use markdown and then when I'm writing markdown when I especially when I'm like writing larger documents for work like large technical documents then I like to do the markdown preview and then here it will in my in my browser it opens up the markdown and if I then move that to my workpace here where I'm also writing the the markdown file oops here we go then you will see that if I scroll through it then the the the browser will also keep scrolling through it so let's through let's open up a let's see is there a um let's open up a different document that is a bit more that has a bit more things in it so markdown preview this is just a random uh uh note that I have on my home lab and as you see here then if I scroll through it it it renders it beautifully and this is very useful when I'm writing technical documentation for work because sometimes when you're writing markdown it helps to see rendered and to structure the thing as uh you want it to have so that's the markdown preview I will go over how I switch these windows and how all of that works in the next section so be patient I will uh I will get to it if you're one wondering about that but that's the markdown section of my neim setup and yeah just to go through that very quickly uh I keep a zettle Casten for all my notes and my zettle Casten is part of a larger thing that is called a second brain which is a place where I yeah basically organize my entire life but my S Casten is is is um is organized as a yeah it's it's basically markdown files on my on my local disk and it is compatible with obsidian if you are familiar with that tool that's what I have open here as well it's an obsidian Vault but I basically use neovim to navigate my my zcast so here this is my entire second brain and here I have it I have it set up as uh uh in the according to the para method by Thiago Forte I'm going to be creating a second brain video where I go through my entire second brain setup later and I'm also going to create a video specifically on how I how I combine obsidian and neovim in my workflow in my sle cast and work but for now let's uh just uh go here and here you will see like for example my home lab notes are in this home lab directory and here I have all of these um documents that I have here and when I am doing a uh when I want to search around my my entire sort of knowledge base so let's say I need to um find something about customize if I then grab for customized and here I see all of the the files that I have with the word customize in it and then I can very quickly navigate to that file so all of my my notes they live as local files on my on my disk they are of course being backed up and I also wrote an entire article about how this is set up which will be linked down below it's on my blog but um that is basically how I use markdown files for my not taking and for my my um yeah which helps me to learn and to keep that knowledge uh accessible R the last section about neovim is going to be um a few plugins that I use so you've just seen me use a plug-in that I use well every day probably four times an hour you you you basically saw me doing it if I press space and then FF for fine files if I want to find something about running then I have everything about running here and that is the beauty of of the the telescope plug-in is that here I have all the files that have running in the file names but when I browse the the files like this I see the preview of it and I can even scroll the preview so if I have a is there a yeah this is a file which is a bit larger if I press contrl D I can even quickly scroll through the preview so you can imagine how how useful this is if you are navigating a you uh knowledge base like my second brain if you have everything organized like this and you can just search through it from your editor this is super powerful so yeah like like I was showing you if I go to my home lab repo say and I open up my telescope plugin and I want to have the deployment for melee then I have it open here and then I think oh wait maybe I should also have the network NW working for melee I just do Network melee and as you see it use fuzzy finder to open the file and now I have my networking file and deployment open and look how quickly I I I searched that and I was and as I'm editing the networking file I realize oh wait the LinkedIn networking is also very similar to this I want to read that so I go to link and then netw and I see oh here is the networking file for LinkedIn now let's vsit that window and now I have the linking and the networking yaml side by side and I can compare them and it you get the point this is where why it's so powerful to use this this is why it's so powerful to be able to quickly search files using telescope I can also use grap so if I want to find Ingress resources then here I have all the files that have Ingress in it so if I'm comparing ingresses I have the comma feed Ingress here and if I want another one then I can have a different one here and this is how it's so powerful and to be able to find these documents very quickly telescope is yeah the center of my Vim workflow I could not live without telescope and that's also the main reason why I uh stick on neovim I had this phase where I wanted to move away from neovim again I wanted to use the the the standard Vim but I uh I very quickly found out that I I need telescope in my workflow easy as that it's just the fastest way of finding files using a fuzzy file finder like this it's it's just so powerful so yeah telescope learn it highly recommended the next plugin is lazy git so you will have seen me use this in my my files a lot I think but if I uh if I were to be in my home lab repo and if I open up a random file here here and if I want to say change the the database resources on this database then I would change this to three and I write the file and if I then want to push that to my GitHub repo then instead of exiting and I do get add Dot and and then I would do get commit and then get push but you have something that's called lazy git which you can either run from the command line like this I can do lazy git and then it opens up or as I am as I am in my let's open up that file again so now I'm pressing R so then I get all of the recent files so here I'm in my database file again and then as I'm editing the file I can do space GG and then here I can do add all the files commit write uh increase CPU I can do it and then push and then now it's pushed to to um my repo so you see how how quickly that is how easy that was it's just I'm I'm writing something I want to have it pushed so GG a c and push and and then I'm gone another one here let's I'm not going to push this but say I want to change this a a c write a commit message and then enter p and push and it's and it's push to the to the origin and it's so powerful it works so quick and I sometime I I have to force myself to keep writing the git commands so I don't forget them but lazy git has really sped up my my git commits and my U allaround git workflow highly recommended next I have uh Neo tree you already saw me using that um let's just restore everything get restore dot here we go um you saw me using that if I press space e then this file tree opens and this is really useful when uh navigating file structures like this my zle Casten is basically just one large directory but here I have uh in my home lab repo I have my applications I have my infrastructure so this is very useful for opening up the yeah let's say the the gups The Weave UI for my production cluster I can very easily um navigate it like this but say I have this uh staging environment and I want to copy all of that into a new environment which is called test I I can create a test directory like this I paste it and lo and behold all of the stuff is in my test directory here as well so it's also very useful for managing files very quickly so I very often even though I'm not editing text files I just use this to quickly move files around and structure something because I yeah use my my Vim key bindings and it works just really well so this is a very very nice way of U managing files in uh in neovim and it's all controlled from the keyboard so I like it a lot and yeah that concludes the yeah very quick overview of my new of him setup I I don't want to go too deep into it because my my this video is is about my entire workflow but um if you want to know more about my neovim config you can of course look in my do files repo uh and I highly suggest you check out lazy vim and if you want to have a full sort of um walk through of my entire Vim config let me know in the comments below and uh I will make a video for you all right we're in the home stretch I actually got myself a cup of coffee to get some energy to keep myself talking and the next section that we have uh on the schedule is the window manager so I learned the concept of a window manager while I was uh building my own Arch Linux system and I ever since I started working with a window manager I never looked back I think it's a very very nice way of of handling your operating system and what Window Manager does is that when when I have this uh file this um terminal open here if I just enter open a new one you will see it will open up a new one next to it and it will resize the other one and if I open another one it will resize the it will resize like this and I can just keep opening terminals like this or if I were to say open a different program like Chrome like this and then if I go here oh if I move that to my three then it will resize it like this so that is the that that is a very nice way that to instead of having to drag around your or resizing your windows but with the mouse you it just does that for you and I really like that of a window manager now when I was on Arch Linux I wasn't as proficient with TMX yet so then I confess I was using this kind of setup where I had multiple Terminals and I was switching between them like this now I just use t-o for that so just to demonstrate a similar configuration that I had just now I would just do I would just split this window like this and split that window again so here I I can have K9s here I can have my code uh opened like this um let's open up a secrets. yaml and then I can switch between those by doing contrl b o and here I would could have htop and yeah all sorts of things opening and this is all in t-o so I can switch between these windows and it's just in t-o I don't I don't need a window manager for that anymore so this is again this point of t-mo is my window manager however uh a window manager is darn handy when I'm moving files around when I'm when I do have other programs as a terminal open so of course I use a web browser a lot and um as you see me if you're following the keys that I'm pressing then you see that I I'm always pressing command one and two and three so Mac OS has this concept of uh work workspaces I think it's called is it called workspaces workspaces uh well or it's called called like that in in Linux but up if I go uh how do I open that um is it Mission Control yeah Des desktops that's the word so you have desktops up here and I have nine of them these are all numbered one to nine and I switch between those by pressing the command and 1 2 3 4 5 6 7 8 so on on eight I always have my calendar for example and on seven I always have my slack if it's open on three I always have my terminal and on one I always have my browser so I I can very quickly if I'm coding and I I want to look look something up then I can very quickly just move to my browser here and and open up a new tab and and yeah go to chat GPT or whatever so I can very quickly switch between those applications so that's what I like about having a window manager uh like this um and this is not even the window manager doing this this is just a Mac OS thing with the desktops and workspaces that's what it's called in Gnome on auntu I think but that's just a Mac OS feature and then then I have the in terms of window management like like it does here then I have um amethyst this program called amethyst it's a free program and works very well but the the thing that's very useful for that is that I can use amethyst to move programs between my desktops I I don't think Mac OS supports that actually so if I so I'm I'm now switching to three and I'm coding here and I uh I I um I have all these things open and I want to look something up so I switch to this and I I'm talking to chat GPT but say I want to use that information in my code then I can press these buttons and then it moves to the workspace that has my terminal so let's clean that up a little bit because it's I'm getting a bit uh panicked about this okay here we go so now I I'm I can be editing my code I can have my my code open like this and let's see let's open a random file here so I have my code open and I can have my browser beside beside me here so I can freely move things around just by the keyboard so now my one is empty I am in my browser but now I have finished my browser I just wanted to go back to I wanted to go back so I press control shift option one and then it moves back to workpace one and now I have my workspace 3 in my ter as a terminal again and now I have workspace one as my browser again like uh like I'm used to so that's the main thing that I use the window manager for not so much the capabilities of of the the C the tiling like this the quarter tiling and so forth but it is really handy that I can move Windows to several screens as well so with control shift option H I'm I'm now moving the browser to the screen that's to my left here so I have three screens I have my main 4K screen over here then I have my MacBook over there which is open this is my open MacBook but to my left here I have a 2K screen which I use for you know having stuff open like documents when I'm when I'm coding or when I need to have those separated like that but with the window manager I can move the the windows between the screens which is really handy so that is what I use uh for window Management on Macos and as I described earlier t-mo is basically my window manager for all my um terminal applications now almost there the next thing is my browser and I see here I must you can see you this also shows you how I do the this kind of work I have this brush here and then I'm going to connect these like this right so my now it's looking a lot better um my browser is Edge I have tried many different browsers browsers like uh everybody in this space I suppose I have used Firefox for years I was very happy with that when I switched to Mac OS I tried Safari but I I wasn't I wasn't very happy with it because I couldn't use that on Linux for example and I wanted to have my thing synced between those uh environments and when um Microsoft came out with co-pilot or Bing search that was actually quite new Chad GPT wasn't able to search the internet at that point point and when I saw that I actually switched to Edge because I it was so powerful to combine search with chat GPT and that's why I switched to Edge then and I have since discovered that it actually integrates very well with the Microsoft authenticator um this is what I used on my iPhone for all of my my passwords and two two Factor authentication I had a few different several different apps for that and I Consolidated that to the Microsoft authenticator I think that works very well and by using Edge I have that across all of my systems so Edge runs on Linux on Windows and on Mac so for now I'm quite happy with Edge as a browser but like I said my my system is always under continuous development so maybe I will try something else in the future but Edge is my main browser I have used Firefox I also used the Liber wolf for when I want to have more privacy when I'm browsing or tour but uh for my daytoday work and just my normal stuff I have Edge and then the last part of my of my uh workflow is actually my zcast I I went into this in a previous section A little bit but it is such an important part of my my workflow because when I'm coding and I remember I don't know something a go function like that then here look how quickly I have found my notes on vartic functions in go right I can switch between these things so quickly and um it is a huge part of my my workflow I keep notes on almost everything I do every time I learn something new I will uh stick it in a note so say I am let's not use code as an example but I'm using the Azure CLI and I'm trying to do some some um yeah work with the Azure CLI then if I forget how I work with the Azure CLI in key volts then let's say I was doing that in this window I go to Vim I I open telescope and then I have this Azure CLI note and in here I will search for key Vault and then here I have all of the the commands that I have saved for key volts that's just so powerful to have my own knowledge base so easily accessible and that is why I have my zle Casten as markdown files locally saved on my on my on my on my system here because the combination of neovim with telescope is just so amazingly powerful and um yeah I'm super happy with this and it's a a huge part of my of my workflow and um my if you want to read more about my zcast and my not taking you should go to my blog um here Misha Vandenberg tocom if you go to the start here page I have my favorites and here is an article called my neim zcast and this is why here I write uh why I keep a SLE cast and how I do it and my my website is is actually the part of my zel Casten that I publish to the public which contains mainly technical notes and documentation that I make so um it is such an integral part of my workflow that I decided to include it here even though it was not um necessarily a part of like window manager or The Terminal but it's so important to my workflow that it is there and then uh I also use obsidian obsidian is the way how is like I started using notion and then I had a few other tools and I ended up with obsidian and that introduced me to the the having the local files as markdown files on your computer and then I just started editing those with the Vim so I don't use uh obsidian for my my writing my notes or navigating them so much but it is really handy because um um if I go out of full screen mode here so the these drawings are made in uh Excalibur and Excalibur is now also integrated into obsidian which is uh transforming the way I take notes I will be make I will be making videos on this in the future as well um but that's one way and also the obsidian has this graph view so this is a visual representation of all the nodes that are in my zelc and if I go here this is Amsterdam this is a one of the places where I worked so here you see all of the notes that are uh connected to that um specific part of my cellcast and here you can see how they are all interl so here I have another thing let's say Arch Linux desktop and here you see all of the notes that are linked to that and and I can very if I go to that note if I open that and then I can also have the local graph you see I don't do this very much but uh let's see how is it local graph here so here you also see all of the notes that are connected to it and if I want to do the MPD music player here I can navigate these notes as well and sort of see the connections between them so this is a very very useful uh way of exploring your notes and it's lot fun to play around with it as well so yeah obsidian is definitely a part of the workflow too it's going to my use of obsidian is going to increase more and more in the future as I'm starting to go more into visual note taking and I'll be making videos about that as well but yeah it's uh another very integral part of my of my workflow so ending in in obsidian I'll open up the the Mind map we started with G up and we have gone in clockwise fashion and we have uh I've spoken through all of the topics that I had prepared for this video you have seen my entire workflow this is how I work every day I code I write notes and I look up those notes as I'm coding and it becomes this very nice little feedback loop and um yeah these are the principles for the for that workflow that I've created and I hope this was useful to you I hope this has inspired you to maybe put some work into your own workflow my configuration is for available for free in my repo you can just uh go in there and take whatever you like and uh Be Inspired I have also stolen A lot of my configuration from rwx Rob so that's how it works in this world there's no shame on taking other people's configuration if they Lish them to the public like that in public repos and um if you want to know more about my re my workflow feel free to just ask a question in the comments below I write about it on my blog you will be able to read more about there I'll be publishing this um this uh mind map with the extra notes as well which will be in the comments that in the video description and um yeah that's that's about it I think if you found this useful at all please please give me a like and a comment and uh everything for the algorithm and consider subscribing to my channel if you like my style and what I'm doing here and please let me know in the comments if you derived any value from this so thank you so much for watching and I'll see you in the next video have a good day
Info
Channel: Mischa van den Burg
Views: 126,769
Rating: undefined out of 5
Keywords: command line, linux, macos, terminal, alacritty, productivity, focus, distraction-free, workflow, terminal workflow, coder, hacker, efficiency, second brain, devops engineer, devops, bash, scripts, unix, unix philosophy, vim, neovim, automation, automate everything, coding, programming, hugo, blog, content creation, writing, share your work, zettelkasten, writer, markdown, self hosted, git, github, telescope
Id: iagjeLuxnMs
Channel Id: undefined
Length: 68min 16sec (4096 seconds)
Published: Sun Jan 21 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.