My Neovim & Tmux Terminal Dev Workflow As A Principal Engineer
Vložit
- čas přidán 22. 06. 2024
- Every terminal setup is built with layers and different components, including an emulator, a prompt, tooling, hotkeys, and more. Here's my blueprint, structured from the ground up in a way that's easy to follow and replicate or, better yet, use as a boilerplate to make it your own!
Ways to support this channel:
🎓 My course: learn.omerxx.com/courses/seco...
📰 Become a better engineer in just 3 minutes a week: signup.omerxx.com
⌨️ Tech I use: kit.co/omerxx/my-battle-station
LINKS
▶ github.com/williamboman/mason...
▶ github.com/folke/zen-mode.nvim
▶ github.com/folke/trouble.nvim
▶ github.com/nvim-telescope/tel...
▶ github.com/jesseduffield/lazygit
▶ github.com/BurntSushi/ripgrep
▶ github.com/eza-community/eza
▶ github.com/junegunn/fzf
▶ github.com/ajeetdsouza/zoxide
▶ github.com/omerxx/tmux-sessionx
▶ starship.rs/
▶ en.wikipedia.org/wiki/Z_shell
▶ www.nerdfonts.com/
▶ www.jetbrains.com/lp/mono/
▶ github.com/sxyazi/yazi
▶ github.com/wez/wezterm
▶ Dotfiles: github.com/omerxx/dotfiles
⏱ Timestamps
00:00 - Intro
00:38 - Wezterm
01:55 - Zsh & Startship
02:55 - Tmux
04:10 - CLIs
06:49 - TUIs
07:14 - Neovim
#dev #workflow #tmux #neovim #macos #unix #linux #git #neogit #lazygit #terminal #vim #devops #console #cli - Věda a technologie
Join 1000+ subscribers getting one dev/sec/ops tip every Friday: signup.omerxx.com
That title reminds me of a popular video on this topic 😁 Keep up the good work man! 🚀
I definitely think you and another creator were the initial inspiration !
I’ve been also following your recent change and the DevOps community and it sounds incredible! Keep up the inspiration 🙏🏽
Another golden video full of condensed experiences ready for learning, again. Thank you!
🙏
Brilliant video, loving your dotfiles! Gives me inspiration, thanks for doing this video 👍
🙏
Great video, really makes me happy to see that even though im only going at cs for 2.5 years (started from 0 at 15yo), atleast in setup we have a 95% similarity. Only difference is i dont use lazyigt nor lazydocker since (in my opinion) it only gets in the way of already super fast (and easy) tools
If I’m completely honest, both these tools are only completing existing tooling (Neogit and docker CLI) but I do pop them from time to time for demos or better visualizations
nice, the recipe for success /s
mate you are insanely good
Amazing video as usual!
🙏🏽❤️
Thanks! I managed to learn new things like eza (i was using exa) and lazygit and lazydocker, thanks for the video!
No problem! Was using EXA myself until I realized it wasn’t maintained
Thank you for introducing me to Yazi!
i like standard vim because its very easy to install and migrate to different environment. with neovim it's the opposite. there's a big number of non standard packages, npm... i'm not sure if the difference between these two is big enough for me to jump to nvim.
Great video nice work! Which matrix visualizer are you using in the background of the video?
Thanks!
this is `cmatrix` :)
ooh man, that Moonlander setup looks so comfy... Would you be so kind and tell me where you got those keyboard stands from?
This is the ZSA platform! Very comfortable but a bit pricy. There are plenty great 3D printed solutions also downloadable from ZSA!
Great video and setup, very similar to mine. Maybe one addition I can't live without is atuin: Database backed history management on steroids synced across different machines. Like: "Which git command did I run in this directory last week on my other machine?" by just pressing Ctrl+r. You should give it a try, it will complement your setup. And it is written in Rust 🙂
Definitely checking it out! Thanks!
Hey, my journey is pretty similar! I went from iTerm2, Alacritty, and I am now here haha.
You have a sweet setup, I def picked up on a couple of things.
I did have one question though, how how are you able to keep transparency while in nvim/text editor mode?
I really love this feature from iterm but can't seem to get it working after I nvim into some file.
Awesome work! 🔨
Thanks!
To put the terminal in transparent mode and I set the levels in Wez but sounds like you’ve got that covered. For Nvim I use a plugin that toggles the mode on and off, so you have to have both for the effect to show.
That said, I actually stopped using it bc it was too distracting and it’s just an editing effect for the video :)
@@devopstoolbox Gotcha, thanks for the tip!
At some point I should just leave my config alone and use what I have haha
Thanks!
Great video! I noticed you're using Nix and Nix Flakes. Do you consider that to be a game-changers for managing development environments? I'd love to see a video on that topic!
It’s in the works! Both the video and my developing opinion 😂
Great video! Curious if you have any thoughts on running into issues with showing images through tmux. I use wezterm and I live in tmux and I am always annoyed with the inability to render images without having to detach. I have looked around but I have not found a great solution.
I’m running Yazi in tmux (in wezterm) and it renders images just fine!
Other than that there isn’t another use case I had other than maybe writing content here and there but that’s pretty rare that I have to incorporate images…
Cool! My previous experience was with wezterm’s imgcat, cool to see yazi handles it without any configuration needed!
do you use tmux only for session management? afaik wezterm is pretty sufficient for multiplexing
I use Tmux for everything. It’s my terminal operating system! Wezterm has *some* capabilities so I prefer using something that cover all options. Plus, in my line of work, being able to run it remotely and use in various cases proves it’s worth quite often :)
For some reason xargs has always baffled me. Would you mind expounding on it a little bit on a future video? It probably doesn't need an entire video if its own. I'm gonna look into it again regardless.
Also still need to give sessionx a try. Been busy and just trying to stay sane!
Definitely!
hey man, what kinde of keyboard do you use?
ZSA Moonlander!
how do you get the images to show in wezterm? using viu?
Yazi!
Question, I'm learning Neovim with Lazyvim, I feel comfortable using it, but I'm not a pro. I want to add tmux to my workflow, should I learn that or better Zellij?, which seems to be a modern alternative.
Learn tmux, it will add agility and freedom to do more. It is also good if you ever need to work on remote servers.
Here’s my 2 cents:
Zellij is way easier to get started with and a super solid choice!
Tmux is more flexible, easier to extend and is already present in many remote systems and very easy to install on ephemeral cloud instances (present in most package managers for years)
Either way you’d be making a good choice. There’s no wrong answer 😉
@@devopstoolbox Thanks, I think I'm going with tmux then. It fits my long-term goals.
next: VR workflow
I've heard tmux already have an ability to show sixel images. Have you tried it?
Not really, but if you have an example Id love to see it!
What did you mean about native windows for wezterm on MacOS?
It’s niche (and I didn’t put it correctly if I’m honest) but if you try to port Wezterm with SKHD for example, it won’t work. Probably due to the difference in how Wezterm starts a process vs picking a running one.
I think this is one of the related issues:
github.com/wez/wezterm/discussions/1208
IIRC Alacritty has a similar issue: while it’s picked up, if you run multiple processes it creates ambiguity in macOS so things like CMD+~ for alternate window switching doesn’t work…
How are you previewing images in the terminal?
Wezterm + Yazi :)
nice. I use kitty and tabs instead of tmux but interested I think I might outgrow it soon and use tmux instead.
I’ll be here when you’re ready 😉
Exactly. You have tabs in kitty, splits and buffers in lazyvim, why would you use Tmux? For saving sessions I guess.. idk. I'll try it eventually but I don't feel like I *need* it now
@@vladimirnicolescu1342for DevOps and sys admin tasks, it's a better tool to learn because we work with terminals a lot more often than a desktop environment. Not to mention it's cross platform... In the sense that I can use my workflow anywhere I have access to a terminal
@@vladimirnicolescu1342because tmux is independent of the terminal emulator. It works everywhere you'll ever need, whereas your terminal emulator might not.
@@vladimirnicolescu1342 there’s no wrong answer. It’s preference and workflow. I don’t like using nvim splits especially not for terminals (video coming soon), and I do like having sessions preconfigured with different areas of my systems that I need to switch between (work projects / open source projects / configurations / obsidian notes etc)
So tmux it is for me 😉
I stole the definitions preview plugin from your dotfiles. It was something that I was looking for. Thanks!
I'd like to know how you manage the multiple diagnostics virtual text that you show at 8:07. The one where you have an info and error severity text and it shows only the error and the box before it gets split with blue/red to indicate there's another one. For example I had to disable the virtual text from the lsp and leave only the linter ones because of the visual clutter. Also I had to setup it so, that only messages above warning severity are shown.
Enjoy!
Re LSP config - my config is here: dotfiles.omerxx.com
And I’m planning on releasing a dedicated LSP nvim guide soon, but until then if my config doesn’t work for you ask away 😉
@@devopstoolbox Yeah, I scanned over it but didn't see anything relevant to the virtual_text diagnostics
@@karamanliev this is it - github.com/omerxx/dotfiles/blob/master/nvim/lua/plugins/lsp.lua
Nothing fancy though. Try dropping it into your config and see if this makes more sense visually
How to disable show timestamp in scrollback buffer like you in tmux 🤔
I don’t remember ever using a timestamp or seeing it, but my entire config is here: dotfiles.omerxx.com
Hi there, ty a lot for your content, can u tell us how to put trasparent bg on tmux config pls?? I reply same dotfiles config but still not trasparent
Thank you 🙏🏽
Tmux isn’t the blocker here - the underlying emulator is, so you’d have to configure that. If you run something inside Tmux - like Nvim you’d have to have that run a transparent background, either with a plugin or a dedicated config.
Do note that my dotfiles have a plugin for that but I rarely use it. When I work there’s a solid bg for focus.
The terminal is transparent in the video for the nicer visuals and to help with seeing what’s going on in the keyboard.
@@devopstoolbox ok mate, ty so much for quick answer! hope to see more devops content, I'm kinda new in this world hehe. In addition, watching your plugins on nvim I created a few small bash scripts that use fzf to apply obsidian templates and create new notes with a single alias, didn't realize obsidian plugin on nvim before watching your stuff, have a good sunday mate
@@RaulMartinez-nl7jh thank you!
All these tools are lightweight and efficient, but why are you still on Mac?
the laptops feels nicer, are generally better (and for a lot of companies you get them as business devices so you don't pay for them) and it supports a lot more of the commercial software that your business might use. Mac unlike windows doesn't drain your ram and cpu in idle, so when going lightweight your pc can easily last for days without charging.
One simple reason: work 😉
Definitely moving to Linux soon
@@GOTHICforLIFE1 very true.
Why starship over p10k? Many users noticed that last one is faster.
I’ve been running p10k for a couple of years, it quickly gets out of hand and the configuration is not to my taste (after realizing something slick and lean like starship is optional)
I think it’s a matter of taste…
And I’m comparison it feels like starship is FLYING… but I’m guessing this depends on what you have configured on both prompts
Ok, I use this as a junior though
Why did you leave Yabai? Using anything else?
For the longest time I've been rocking Yabai and even preparing a video around my workflow with it. But after strugling for a while to find something that I really feel confident to share it felt like it was creating more friction than removing it. Maybe that's my own take because I'm running an ultra wide setup (49") but I couldn't make it work the way I hoped
What about lsd instead of eza?
Do you see a big difference?
NIX!!!
you are a principal engineer?
It appears so 😅
thanks
emacs + screen
Can’t go wrong there
Emacs is a great operating system. It's kinda sad it never came with a decent text editor.
@@zerodev_exe overused meme
The sentence "My entire neovim setup is covered in a video" is why I'll never even try it. No editor should have a configuration so complex that you need to explain it in such a format.
Lol... For real?
This is such a childish remark. Every editor has configuration. You will find tons custom vscode configs videos online as well.
If you don't want to do that, you can always use something like LazyVim or neovim without any config. We have choices.
In the case of Neovim, complexity is just a result of the amount of freedom you have. With vscode YOU have to adapt to the way vscode does things. With Neovim you take a bare bones editor and bend it to your will.
Neovim adapts to your workflow. Cli applications are always more modular in nature than gui applications. Although there are many extensions for vscode, the amount of cli tools that you can make use of from or in hand with Neovim is just incomparably larger. For example don't want to use the find or ls or ripgrep, use fd, lsd, and rg. Or any of the other alternatives.
This is all to say, it's not just about the editor. It's also about the ecosystem in vscode versus the ecosystem that you can make use of in the terminal. I'm not trying to make it seem less complex than it is to configure, I'm just trying to explain why it is. I don't even use Neovim, I use Helix and before that I used vscode for a few years. But my favorite part of using the terminal is not having to wait at all to open a single file or a large project. Vscode is fast for an electron app but helix and Neovim are just instantaneous.
@@jhonyortiz5 I totally understand that. I use plenty of CLI tools.
Most of the time when vscode is "slow" the cause is usually related to having too many extensions all watching the same editor buffer. VSCode is genuinely faster in WSL than it is on Windows. I think the socket files help a lot?
Anyway, I used GNU nano professionally as my primary editor for many years. Genuinely a great editor until you want features only language servers can provide. That can be configured with a single file in about 12 minutes by simply reading the example configuration.
I also really love devcontainers. Which means I push my configuration into shared, executable documentation.
1. This is not the title of the video 😉
2. There’s definitely one coming soon covering my nvim config though. But I get it, some people like vanilla, there’s nothing wrong with that