How I Use Tmux With Neovim For An Awesome Dev Workflow On My Mac

Поділитися
Вставка
  • Опубліковано 27 вер 2024

КОМЕНТАРІ • 388

  • @joseanmartinez
    @joseanmartinez  Рік тому +57

    Hey guys! I wanted to clarify that whenever you type out the prefix, in this case “Ctrl+a” as I’ve configured it, make sure you press these two keys at the same time, release them, and then type the tmux specific command to execute. Also, if you'd like to use "hjkl" to resize panes but only be able to tap these keys once, remove the "-r" option for each of these binds in ".tmux.conf". Finally, if you’d like to save your sessions manually with tmux-resurrect, you can use “prefix + Ctrl-s” to save and “prefix + Ctrl-r” to restore. Hope you enjoyed the video!

    • @王甯-h2x
      @王甯-h2x Рік тому +1

      Can you create an intro about how to use DAP for debugging in neovim?

    • @Microphunktv-jb3kj
      @Microphunktv-jb3kj Рік тому

      what split keyboard do u have ? :d

    • @reedamranjan6367
      @reedamranjan6367 Рік тому

      Bro all the neovim commands dont work in the tmux sessions , how to fix that ? for example if we try to move in the recommendations using ctrl + j/k we cannot do that , also if we try to create a new split in neovim along with tmux we can navigate to only one window of the neovim and not the other one

  • @ankitkumarsingh9815
    @ankitkumarsingh9815 Рік тому +30

    Each of your tutorial videos are gem! Trust me, no one makes a video as easy to understand as you make. Thanks a lot :)

    • @joseanmartinez
      @joseanmartinez  Рік тому +2

      I really appreciate that, thanks!

    • @ankitkumarsingh9815
      @ankitkumarsingh9815 Рік тому +2

      @@joseanmartinez if possible, then please make a descriptive video on debugging in nvim too. Watched other videos and read blogs, but it doesn't seems to be working out.

  • @fille.imgnry
    @fille.imgnry 8 місяців тому +9

    Tip of the day: cmd+k to clear session instead of typing ”clear”.

  • @voidmind
    @voidmind 3 місяці тому

    The transparent terminal window with your hands typing behind it is a really nice was to showcase the workflow.

  • @wata1991
    @wata1991 Рік тому +1

    the copy mode thing is a game changer for me...thank you so much. iterm2 was always getting mad for copying stuff.

  • @kg13
    @kg13 8 місяців тому

    Thank you so much, I always thought as a full-stack developer that all of those terminals I had to manage were an issue. All of your video have helped me a ton!
    Gracias papa! Desde RD!

  • @cliffmapesa9390
    @cliffmapesa9390 11 місяців тому +1

    This the best introduction to tmux I have come across. You've gained a new subscriber. Great explanation

  • @joshuaeverett2078
    @joshuaeverett2078 Рік тому +1

    Another great video! Seriously, thank you very much for making clear videos. I am very interested in your keyboard video. I look forward to any future videos you plan on making. Thanks again!

  • @RT-jp9me
    @RT-jp9me Рік тому +2

    Thank you so much for producing this video. I never understood what TMUX did or why I should be using it. You have really explained everything so clearly and made set up and customization easy! Love your content.

    • @joseanmartinez
      @joseanmartinez  Рік тому

      That’s awesome! Thanks for your feedback, really appreciate it!

  • @sebastianprehn
    @sebastianprehn Рік тому +3

    Great series, Josean! You made me make the jump to Neovim and Tmux after years of using Emacs with vim bindings, and so far I'm loving it!

  • @darlakim5120
    @darlakim5120 Рік тому

    Another awesome video...thank you! I love tmux and am and old-school vi dev. Tmux is esp. great when working on multiple servers, where you can ssh into all of them and execute the same command simultaneously and see the results of each on one screen (synchronize on/off). Makes admin so much easier.

  • @azukachannel716
    @azukachannel716 9 місяців тому

    thanks for making my terminal far better and make me always spirit to code

  • @spondoolie6450
    @spondoolie6450 Рік тому

    Tackling the learning curve of nvim, tmux and reconfiguring my whole dev process thanks to your videos 🙏

  • @maguilecutty
    @maguilecutty 11 місяців тому

    Dude thank you SOOOOO much for these videos. Literally gave me all teh thigns I needed to finally make the jump to using this stack fulltime!

  • @felipegutierrez2944
    @felipegutierrez2944 Рік тому +1

    This content is awesome, I just change from vscode to nvim, your videos are been really helpful, Thanks a lot!

  • @severgun
    @severgun 11 місяців тому +2

    Split by pipe is visually intuitive, but require pressing shift. For hot keys you don't actually care about visual. So better to use just \. Visually it is almost vertical but less keys to press.

  • @RomanKononikhin
    @RomanKononikhin Рік тому

    Thanks a lot for this tutorial! I've been using tmux for a while already but this video allowed me to kick off with better configuration and better understand how to configure tmux.

  • @alexandrostsagkaropoulos
    @alexandrostsagkaropoulos Рік тому

    The information in this video series are outstanding. Keep up the good work!

  • @destinlee
    @destinlee Рік тому

    These videos have been awesome!!! Really dig your calm nature. 🙏

  • @Sameer_Kumar
    @Sameer_Kumar Рік тому

    Good one. I moved from item native splits to Tmux. No glitches. Only one is messed up for me, I use ctrl h for backspace and it blew off, rest all great. Nice work. 11/10

  • @yuanjunren5220
    @yuanjunren5220 Рік тому

    Thanks a lot!!! I learned a lot althrough i've being using tmux for several years.

  • @Manakeks2112
    @Manakeks2112 Рік тому

    Thanks for the blogposts! It really helps to rebuild the tutorial!

  • @mkum2141
    @mkum2141 Рік тому

    I've been following along with the entire series and its been great fun. Thanks for putting this out.

  • @vado4003
    @vado4003 Рік тому

    This is the best tmux video i've seen, thank you for making it!

    • @joseanmartinez
      @joseanmartinez  Рік тому

      I really appreciate that! Thanks for the feedback.

  • @thomasnaderer7329
    @thomasnaderer7329 Рік тому +67

    I was afraid of the terminal and vim for such a long time, but your tutorials really brought it all together. One of the best tutorials I have ever watched! Thank you a lot!

  • @tamasbalint1597
    @tamasbalint1597 Рік тому

    Fantastic video. Just what I was looking for. Thank you Josean. This is great help for so many developers.

  • @muhammadmuinmundzir9981
    @muhammadmuinmundzir9981 Рік тому

    Really love this setup! First time install & using tmux

  • @evgenykokotov2322
    @evgenykokotov2322 Рік тому +1

    Cool and fully detailed tmux explanation. great!

  • @0x80O0oOverfl0w
    @0x80O0oOverfl0w Рік тому

    Good call on swapping the caps lock and ctrl key. This is surprisingly easy to do on a Mac! I set my vertical split key to \ since it's the same key as | and doesn't require using the shift key to access.

  • @FrancescoM-
    @FrancescoM- Рік тому +1

    a long awaited meeting has come at last

  • @turalhajiyev9029
    @turalhajiyev9029 Рік тому

    Your videos are helping me a lot to move to nvim / tmux. Thank you for making this series!

  • @TonyJara-nf7py
    @TonyJara-nf7py Рік тому

    god damn bro, you just came and solve all of my problems. Thank you! This neovim thing has a steep learning curve

    • @joseanmartinez
      @joseanmartinez  Рік тому

      It does have a pretty steep learning curve and can be painful at times. Glad I could help!

  • @jacobvanschenck
    @jacobvanschenck Рік тому

    Thanks so much for your videos, they are have really helped me confidently jump into the terminal world!

  • @oleksandroliynyk8437
    @oleksandroliynyk8437 Рік тому

    Great video, thank you! Tmux workflow looks awesome and fun 🚀

  • @HarisHussain
    @HarisHussain Рік тому

    THANK YOU SO MUCH! I can finally use neovim + tmux to do all my backend projects! thanks again

    • @joseanmartinez
      @joseanmartinez  Рік тому

      That’s really awesome! Really appreciate your feedback and support. Glad I could help!

  • @KhalidThwiny
    @KhalidThwiny Рік тому

    I found your channel by accident and immediately subscribed to it. Your videos are very informative and clear and easy to follow. Thanks mate!

    • @joseanmartinez
      @joseanmartinez  Рік тому

      Awesome! Thanks for the feedback, really appreciate it!

  • @enidoi
    @enidoi Рік тому

    Thanks for the series on setting this all up. Can you produce a video to nerd out about this presentation style, a Video of current actions with a screen on top? Pretty wild.

  • @omnimathic
    @omnimathic 3 місяці тому

    Thank you brother for the content.

  • @codingwithrendi
    @codingwithrendi 5 місяців тому

    thanks this is increase my productivity

  • @rohit87k
    @rohit87k Рік тому

    How do i delete sessions individually or for all sessions any shortcut or any way to do it. Please add this as well.
    Thanks and always every single video is amazing love it. ❤

  • @steamaccount2276
    @steamaccount2276 Рік тому

    Great tutorial as always 💗
    Thanks alot for making these videos 💝

  • @sagar-tt4ub
    @sagar-tt4ub Рік тому

    Very very informative and useful video. Thanks for making it!

  • @ypucandeleteit
    @ypucandeleteit Рік тому

    Really good tips! I never thought saving my sessions was an option after a shutdown

  • @Gumshoe21
    @Gumshoe21 Рік тому

    Wonderful, very helpful and powerful info here! Cheers!

  • @sachindraragul1094
    @sachindraragul1094 Рік тому

    Awesome. Great video. Thanks for making it!

  • @steinbeckehue8872
    @steinbeckehue8872 Місяць тому

    Hey bro really nice job thanks

  • @drogokhan
    @drogokhan Рік тому

    Looking forward to your new keyboard video. I am thinking about getting one. Having a lot of wrist pain lately. Love your videos man!

    • @joseanmartinez
      @joseanmartinez  Рік тому +1

      Appreciate it! Hoping to get the keyboard video out sometime soon, working on it.

  • @anupambphoto
    @anupambphoto 10 місяців тому

    Thanks for the video. I appreciate what you do.

  • @reverse_shell
    @reverse_shell Рік тому

    Awesome video on tmux and neovim integration, TY!!

  • @Pscribbled
    @Pscribbled Рік тому +1

    Very cool. I’ve always avoided tmux because I’ve always used it hard to do a copy past larger than a window to something outside of the termina since log diving is deep in my workflow. I’d opt to use screen only if I was in an ssh session that couldn’t tolerate unexpected disconnections.
    I’ll probably look deeper into your configs. Looks cool. One thing I didn’t like is how ctrl-d and ctrl-c looked to be rebound which is something I deeply disagree with but I can probably just keep those as the normal signals

  • @Skatox
    @Skatox Рік тому

    Nice video! it helped me to start with tmux, nice tutorial!

  • @aiw437591
    @aiw437591 Рік тому

    I thought that tmux navigator plugin would be great until I realized I use C-L instead of the clear command and I'm always using C-K to cut into the ring buffer (and paste with C-Y like in emacs). Other than that though, lots of stuff that improved my tmux workflow. Thank you.

    • @joseanmartinez
      @joseanmartinez  Рік тому +1

      Ah I see how those can conflict. In my case I wasn't using them for anything else and it's a really intuitive approach because of how used to these keys I am when it comes to navigating within Neovim. Glad you found the video helpful. Appreciate the feedback!

  • @zurgsRushm
    @zurgsRushm Рік тому

    Super stuff! Thank you very much!

  • @hexcoreZz
    @hexcoreZz Рік тому

    Josean, another great video. Thank you.

  • @fernandocorreia2091
    @fernandocorreia2091 4 місяці тому

    Thanks for sharing!

  • @The-Bloke
    @The-Bloke Рік тому +4

    Thanks for the video. One thing I've not really followed is what the main advantages are of using tmux versus just using iTerm2's built in window splitting? I've used tmux in the past when SSHing into remote servers, and there it's really valuable because you can start a session, run some long-running command, and then if you want/need to disconnect the SSH the command won't be affected. But on my local system I've not bothered trying it, because it's very easy to make iTerm2 splits using keyboard shortcuts, resize/move them, etc. And they are automatically remembered when I restart the computer. I guess the ability to use Vim shortcuts for copying text could be useful, but other than that what do you think is the main benefit of using tmux vs just using iTerm2's built in splits, tabs and windows?

  • @macx4044
    @macx4044 Рік тому

    Another awesome video! thanks a lot!

  • @cindypimaa4918
    @cindypimaa4918 Рік тому

    I hardly subscribe to youtube channels but I did. Much love brother. Can you start a react series? this channel will go far.

    • @joseanmartinez
      @joseanmartinez  Рік тому

      Hey! I really appreciate that! Thanks for the awesome feedback. I'm interested in doing more web dev tutorial videos in the future, but not sure when yet. I had been using React/Next.js for about a year and recently started a project with SvelteKit and have loved it. Maybe could dive into those topics further down the line. Thanks again!

  • @techlightdev
    @techlightdev 11 місяців тому

    So good, Thank you very much

  • @Zsofika
    @Zsofika Рік тому +1

    This is really cool, been using tmux for a while with neovim too... Had most of the things you mentioned but added more so overall now feels more polished.
    Thank you for the video.
    I also want to introduce you to some other configs that may be useful for you and others (as you mentioned in: 13:31 - that "the current directory is the same as in the pane opened" - which often is a "pain" because you have to go to the same folder of your project - as seen in your express-server example, it just saves you from `cd next-folder`)
    For horizontal pane splitting: bind | split-window -h -c "#{pane_current_path}"
    For vertical pane splitting: bind | split-window -h -c "#{pane_current_path}"
    The last part is where the new part is (-c "#{pane_current_path})
    You can add the same bit to a new window: bind c new-window -c "#{pane_current_path}"
    I also don't like that tmux default new windows and panes are set to 0, because in my workflow I switch between tabs in the internet browser with CTRL + and 0 is usually inexistent, so a "more intuitive" approach would be to set the default window number of tmux to 1. Below are the lines:
    set -g base-index 1 #For window
    set -g pane-base-index 1 #For pane
    That's pretty much it for now - might evolve later though :)

    • @joseanmartinez
      @joseanmartinez  Рік тому +1

      Really interesting! I’ll look into your recommendations for sure! Really appreciate it and happy to hear you enjoyed the video!

  • @svampkorg
    @svampkorg Рік тому

    Thank you for making this series!
    I recently switched from developing in a Linux environment, to using MacOS and figured I should make a completely new Neovim setup. I found your videos and have been following along to setup my iTerm, neovim and now tmux! I can finally leave my previous mess-of-a-neovim-config behind and start fresh with a nice and structured configuration.🥳
    Again! Thank you so much!

  • @LouiseBrooksBob
    @LouiseBrooksBob 2 місяці тому

    Tmux uses Ctr.-B so as not to clash witth Screen, another terminal multiplexer which uses Ctrl-A.

  • @whited250
    @whited250 Рік тому

    TYVM for this series, it has been quite helpful! I made myself a Kyria split ergo keyboard - very similar to the Corne, but with a few extra thumb keys. I have a modified Miryoku layout, and I find I need both hands to do a lot of things. This lead to looking for ways to avoid hand-transitions to the mouse, which brought me to the idea of Vim/tmux, and thus these videos. As an interesting aside, I also use a Colemak-DHm layout. This means that Vim's h-j-k-l is not home row, and is quite nonsensical. Instead, I have been using the arrow keys which I have mapped as a layer under my right side home row. At least with that, the motions stay similar.

    • @joseanmartinez
      @joseanmartinez  Рік тому

      Awesome! Really cool stuff. That’s awesome you’re also using a custom split. I’ve considered changing from Qwerty but haven’t had the time to dive into that. Appreciate the feedback and happy to hear you’ve enjoyed the series!

  • @a_maxed_out_handle_of_30_chars

    good video, subbed :)

  • @cmetcalf27
    @cmetcalf27 Місяць тому

    Great videos! 🙌 Do you do your own video editing?

  • @mntbighker
    @mntbighker Рік тому

    You should do a video on remote session tmux integration.

  • @wilhelmngoma9009
    @wilhelmngoma9009 Рік тому

    Thanks man. I really appreciate.

  • @spasham74
    @spasham74 6 місяців тому

    Have you looked into ‘Warp’? New terminal for macOS and Linux. It provides similar functionality like Tmux

  • @TonyNguyenTin
    @TonyNguyenTin Рік тому

    The video is awesome. Thank you.

  • @Luxcium
    @Luxcium Рік тому

    I would love to have a fall back setup for when I am not using my beloved VSCode and I would love to have something to edit my files a little more performant than nano 😅😅😅😅

  • @TheRealisticNihilist
    @TheRealisticNihilist Рік тому

    Pretty sick workflow.

    • @joseanmartinez
      @joseanmartinez  Рік тому

      Awesome, thanks!

    • @TheRealisticNihilist
      @TheRealisticNihilist Рік тому

      @@joseanmartinez I use spacemacs and I was curious how you got some of the benefits I enjoy and for the most part you seemed to get all of them. Pretty sweet.

  • @ChrisHumboldt
    @ChrisHumboldt Рік тому

    Excellent video. I kinda went nuts once I saw this and now cannot imagine how I worked without Tmux. If you don't mind me asking, what keyboard are you using?

  • @kuklyy
    @kuklyy Рік тому

    Great videos man 👏

  • @AlexanderSuraphel
    @AlexanderSuraphel Рік тому +1

    What does tmux offers for iTerm 2 users which has pane splitting built in?

    • @joseanmartinez
      @joseanmartinez  Рік тому

      Good question! I like using tmux because it mixes well with Vim/Neovim with keyboard based navigation for most things. I haven’t tried iTerm2 built in panes.

  • @matthieujoly
    @matthieujoly Рік тому

    In fact, doing the other way round : tmux is set to open / launch some "scripts"/get into specific folders, each on their own window, and the first one is vim with splitted windows FROM vim, not tmux. So, i have 7 windows with vim in 1 of the 8 tmux opened. Love this way to do.. and, i'm using the "CTRL-B numberofwindow" to get directly into it. So i've memorized where i have to go todo what is required.. from vim at 1, to musikube / music directory at 5, etc..

  • @9marin
    @9marin Рік тому +1

    Hey! How you record your terminal with transparent background?

  • @ScottMackey
    @ScottMackey Рік тому

    Great job again Josean! Will be implementing a couple of your bindings too. Also I use "bind-key C-a last-window" for double tap prefix a too. Just started using my new Corne low profile. Love it, but bit of a learning curve for muscle memory. Keep up the great work :)

    • @joseanmartinez
      @joseanmartinez  Рік тому +1

      That’s awesome! Thanks for your feedback I really appreciate it! When I first migrated to my first ergonomic split it took me at least a month to get used to it, but I haven’t looked back since! So cool you’re using a low profile Corne.

    • @ScottMackey
      @ScottMackey Рік тому

      @@joseanmartinez 4 days in and keep forgetting layers for special characters. My typing speed has improved though😀 Also I’ve created a new NeuVim repo on GitHub pretty much your configs. I will continue to work on that over time too 👍

    • @joseanmartinez
      @joseanmartinez  Рік тому +1

      @@ScottMackey Awesome! Stick too it! You’ll get used to it and it’s definitely a game changer. I did a lot of typing.io for practice when I was learning to use my first split keyboard with layers.

  • @kamil7272
    @kamil7272 Рік тому

    frickin good stuff

  • @maksymo9917
    @maksymo9917 Рік тому

    Webstorm one love

  • @huuhhhhhhh
    @huuhhhhhhh Рік тому

    Nice!
    Subscribed.

  • @skyeplus
    @skyeplus Рік тому

    I use byobu, which is pre-configured tmux (or screen).

  • @Luxcium
    @Luxcium Рік тому +1

    ok so I have install neo (for the cool dripping effect) and htop I got a hoodie and I am ready to be a hacker... what do I do next... ho it says here that I need to install TMUX let me just reboot my computer to get out of neovim first :q ← (sad emoji)

  • @naczu
    @naczu Рік тому +1

    I can split in iterm2 too. I don't understand why I need tmux. Cmd + D for vertical and Cmd + Shift + D for horizontal and cmd + opt + arrow keys to navigate.

    • @ac27934
      @ac27934 10 місяців тому

      Agreed. iTerm2 does everything I need locally. Tmux only seems to make sense when you're doing remote work.

  • @markm1426
    @markm1426 Рік тому

    I find that the local key remapping does pass through to remote tmux. And creating a remote .tmux.conf does not seem to have any affect either. I presume iTerm tmux integration intercepts the traffic. So for example "Ctl-a |" will not split a session vertically, but spitting in iTerm can create another tmux screen.

  • @grossclarence
    @grossclarence Рік тому

    Amazing videos thanks

  • @saeedul
    @saeedul Рік тому

    Wow Wow Wow :) Keep going make new videos don't give up Thanks.

  • @PulpFreePress
    @PulpFreePress Рік тому

    Great video!

  • @Cruzylife
    @Cruzylife Рік тому

    wow this was awesome

  • @caLLerAt-gn7jv
    @caLLerAt-gn7jv Місяць тому

    Thank you . Recently I try to use Lazyvim but it doen't work when I try to move from neovim to tmux althought reverse action works...

  • @darccau7204
    @darccau7204 Рік тому

    Thanks for the video

  • @scc4213
    @scc4213 Рік тому

    wow,This is a lot usefule information

  • @azmo_
    @azmo_ 11 місяців тому

    I can navigate between the panes, but If I'm inside neovim I can't get out to another pane. Does anyone know why? Followed the instructions of this video and his blogpost.

  • @nizardev
    @nizardev Рік тому

    Hi, Thank you for the great video.
    I have question, when I kill all sessions and start with a new session on tmux, why the oldest session is restored.

  • @CedricVillanueva-l9z
    @CedricVillanueva-l9z 9 місяців тому

    great video!
    quick question, when on nvim-tree and on a file I can't seem to switch to the tmux pane, don't know what I'm missing here.

  • @arturfil
    @arturfil Рік тому

    Do you now how I could add copy to clipboard? That's the only thing I haven't figured out

  • @bulatmaskurov3177
    @bulatmaskurov3177 Рік тому

    Hi! I installed tmux via homebrew and created a config file in ~ folder, but the config doesn't apply

  • @paultalma7617
    @paultalma7617 4 місяці тому

    Thanks for the helpful video! Question: I’m able to use , , etc. to navigate between panes within tmux, as well as within neovim. I’m also able to navigate from a tmux terminal pane into a neovim pane this way. However, I’m not able to go back from a neovim pane to terminal pane. Do you know why this might be? I’ve got Chris Toomey’s plugin installed for both tmux and neovim (as per your helpful neovim guide). I have a feeling that it has to do with the custom window navigation key mappings in the keymaps.lua file in the neovim config, but I’m not sure. Commenting those bindings out didn’t change anything.

  • @GriffinBaker
    @GriffinBaker 10 місяців тому

    These videos are great! The only issue I ran into was not being able to use the control hjkl keys to navigate between windows within vim or across vim and tmux :/

  • @akritworanithiphong
    @akritworanithiphong Рік тому +1

    Great series!
    I have one question.
    How do manage git, like staging changes and committing?
    For example, Do you exit vim and run git commands, or how do you usually do it in your setup?
    This is my first time migrating from vscode to neovim. Your tutorial helps me a lot. Thanks :D

    • @joseanmartinez
      @joseanmartinez  Рік тому

      Hey! Good question! I tend to run git commands on a separate tmux pane. I might look into lazygit though which is for doing git related actions on the terminal, I’ve heard good things but haven’t tried it. There are other git related plugins for neovim you could look into like git.nvim which will also allow you to run git commands within Neovim. The only disadvantage with running git stuff on a tmux pane is that nvim-tree hasn’t been updating for me after doing this and I have to refresh it manually so that the git related symbols refresh.

    • @akritworanithiphong
      @akritworanithiphong Рік тому

      @@joseanmartinez I learn a lot from following your channel. Thank you for the amazing content. Keep it up!

  • @joergw
    @joergw 4 місяці тому

    Thanks