The Changelog: Software Development, Open Source - tmux, dotfiles, and Text Mode (Interview)

Episode Date: February 17, 2012

Wynn sat down with Brian Hogan and Josh Clayton to talk about tmux, dotfiles, and the joys of text mode....

Transcript
Discussion (0)
Starting point is 00:00:00 The Change Log was brought to you by Pusher, a hosted API that lets you quickly, easily, and securely add scalable real-time functionality to web and mobile apps. Check out Pusher's real-time showcase at pusher.com slash showcase to learn how Gages, CloudApp, Buffer, and many others are using the awesomeness that is Pusher. Join the real-time web and get your free API account at pusher.com. Welcome to the ChangeLog episode 0.7.3. I'm Adam Stachowiak. And I'm Winn Netherland. This is the ChangeLog. We cover7.3. I'm Adam Stachowiak. And I'm Winn Netherland. This is the ChangeLog. We cover what's fresh and new in open source.
Starting point is 00:00:51 If you find us on iTunes, we're also on the web, thechangelog.com. We're also up on GitHub. Head to github.com slash explore. You'll find some trending reposts, some feature reposts from our blog, as well as the audio podcast. And if you're on the Twitter, don't follow ChangeLog Show anymore. Please follow the ChangeLog. And I am Adam Stack.
Starting point is 00:01:10 And I'm Penguin, P-E-N-G-W-Y-N-N. Fun episode this week, talked to Brian Hogan and Joshua Clayton about TMUX and other text mode goodies. CLI goodness for the homies that love it. Yeah, I'm not sure how valuable this would be for the listeners, but I enjoyed it just to chat about some ideas that how to pimp out your Tmux and your text mode apps. And I'm using this more and more in my workflow. Well, I know the entire team at Pure Charity has been a convert to Tmux in your workflow. So I'm sure that you're ahead of the curve on this and teaching everybody how to use it right. Well, you know, I'm just an enthusiast like so many folks.
Starting point is 00:01:42 But, you know, we're doing pair programming so much since we're a distributed team. And Tmux, it makes it easy just to, you know, share those terminals across the wire and stitch together five or six windows into one terminal session and just pair program like that. So not only Tmux, but you also talked about Vim and some other CLI stuff.
Starting point is 00:02:00 What else? Vim setup, so my ZShell,.files in general, what the best.file repos are out there, and some resources to peek at other folks' settings and kind of roll your own. Cool, cool. And we also want to thank our sponsor, Pusher.
Starting point is 00:02:15 They're awesome, they're good, and I know you use them at Pure Charity, and we mentioned Pure Charity again, but the real-time web is here. We, Goose, use them at Pure Charity. Yeah, some of our real-time views are things that we build for conferences and interfaces, especially that we want to show real-time feedback. We're using Pusher, and it's been a great fit, and thanks again to the guys at Pusher for building
Starting point is 00:02:40 not only a great tool for backing this podcast. We certainly appreciate it. Yeah, absolutely. Well, that's a fun episode. You want to get this podcast, we certainly appreciate it. Yeah, absolutely. Well, that's a fun episode. Do you want to get to it? Let's do it. All right, we're chatting today with a couple of Tmux users. Josh Clayton, developer over at ThoughtBot, and Brian Hogan, author, speaker, trainer. So Josh, why don't you introduce yourself for the folks that might not know you. All right, my name is Josh Clayton. I've been at ThoughtBot for about two and a half years.
Starting point is 00:03:12 I currently work on Factory Girl, which is a replacement for fixtures in Rails. And I also am a maintainer of Blueprint CSS, which a lot of people are pretty familiar with. A lot of Blueprint users. What about you, Brian? I'm Brian Hogan. I'm an author of a couple of web development books for Pragmatic Bookshelf, and I'm an editor there at the Pragmatic Bookshelf, and I also do quite a bit of coding and training with Ruby on Rails.
Starting point is 00:03:43 Awesome. So I'm a Tmux noob. I've been using it probably not quite a year. So how did you guys discover Tmux? Go ahead, Josh. So let's see. I was using MacVim pretty heavily about two, two, yeah, about two, two and a half years at that point. And I wasn't really focused on using screen or anything like that. I had been developing purely in Mac Vim and then I had switched over to iTerm to run my tests
Starting point is 00:04:16 and a lot of it was command tab. I'm on a Mac. So I was just swapping between these two screen, between the two applications. And it got really frustrating, and I had heard about screen and played around with it a little bit. I didn't particularly care for it because I was so accustomed to using the different splits within Vim, and I felt like if I'm going to use a terminal multiplexer, I wanted to use something that would support different splits. I could have Tmux in maybe the upper
Starting point is 00:04:45 75% of my window and then a shell where I could run tests or run a Rails server within the bottom 25%. I discovered Tmux through Nick Quaranto and it's been all downhill from there. I've been using it for a little over a year and a half now. So Tmux, we should say, is a terminal multiplexer to stitch together multiple terminal windows into one iTerm window or terminal app window. So Brian, what are the use cases you're using it for? So I'm kind of using it for the same thing. I'm doing a lot of work with JavaScript and mostly CoffeeScript and SAS. And one of the things that I've got running are just the background jobs for converting the CoffeeScript to SAS and running tests and things like that. And so I discovered that by being able to use Vim in the terminal and then being able to split the window into multiple work areas, it really is nice to be able to keep my eye on these different things.
Starting point is 00:05:49 And so I can switch between different projects. And one of the things that I've become very used to with using Tmux is that I can actually create a separate Tmux session for multiple projects and actually stay on the same terminal screen, but actually move effortlessly between each one of the projects. So if something comes up and I can say, oh, I got to work on this right now, I could just move my existing session and reattach to a different session from the same window. It's funny you should mention that. I'm using a project called Tmuxinator to unfurl different environments, and it's kind of like stitching together your own IDE for every particular environment that you're working in. I've got day job projects, I've got hobby projects, I also have one that
Starting point is 00:06:24 just has all my task paper VIM to-do lists in a single environment. So you've got a book coming out from Pride Prog in about a month? Yeah. It was something that I threw together. We have this pragmatic writing challenge that goes on in November. We invite everyone in the community who's interested just to come out and write a book over the month. It's kind of like the National Writing Month that they do for novels, National Novel Writing Month. And so my project was just to throw together this short manual on how to get the best out of TMUX for someone who's never used it before. And I was going to self-publish it, and I had written a couple other books for Prague, and I thought this is – it's so much nicer working with an editor and working with copy editors and getting input from other people.
Starting point is 00:07:11 And so I pitched it to them knowing that it was a relatively short book. It actually is only going to be about 80 pages or so. So it was really this targeted, focused book. But they liked it, and they decided to pick it up and publish it. We're going to do e-book only on that. But the idea is that it's just something that will take someone who's never used it before and just give them some guidance on, here's some best practices, here's how you maybe want to customize your configuration. And I do talk about tmuxinator in that as well, as well as actually showing you how to do it from scratch, too.
Starting point is 00:07:40 How many pages did you end up with? Yeah, we ended up with about, just a little bit over 80. Just a little bit over 80. And we're covering things like pair programming with it and working with the text buffers and doing little tricks like extending it so you can say, oh, when I open up a new terminal window, I want Tmux to start instead of my regular terminal
Starting point is 00:07:58 or I want to be able to maximize or minimize panes and things like that. So mostly little workflow things that'll make your life as a developer easier. Speaking of configuration, Josh, your.files, I think, were the starting point for me in jumping into Tmux and configuring it to my needs. So what are some of the things that you've done that aren't stock with Tmux? So I use this command called reattach to user namespace. It's available on Homebrew,
Starting point is 00:08:28 and it allows for interaction with the Mac's pasteboard. Basically, within Tmux, in and of itself, you don't have access to doing pbcopy or pbpaste. Those commands are basically a no-go with a stock tmux. Reattach to user namespace is a command that you can run that will basically hook into OSX's bindings for a couple of these programs and allow you to copy and paste in and out of tmux. So that's definitely an essential. One of the other things I do is I set up the
Starting point is 00:09:05 default terminal to, uh, support 256 colors. That's key, especially if you're using Vim, uh, because with Vim, I mean, I want it to look good. If I'm going to be spending eight, 10 hours in an editor every day, I want to be able to write code and have it look, you know, if not as good as MacVim, as close as possible. So I had actually written a Ruby gem called Palette. And what Palette does is it allows you to write Vim color schemes with Ruby. and the 256-color values so that you can basically use, you know, as close to a full-color Vim as possible within Vim running in your terminal.
Starting point is 00:09:55 So one of the things that I see in a lot of TMUX config files out on GitHub, it seems like I watch a lot of these, the most common thing I see is to bind to screen key bindings. Is that irony? Yeah. I actually do it. There's actually two reasons I do it. On my keyboards, on my Macs and my Linux boxes, I have my Caps Lock key mapped as my control key. And so that way, my command key for the prefix right next to each other on the keyboard. So it's just caps lock A or control A. And that works really well because it's just right there. I can keep all my fingers right on that home row and then the prefix is right next to each other.
Starting point is 00:10:33 I've tried that a couple of times. Do you find yourself missing caps lock when you need to type all caps? You know, those few times when I feel like I want to have some internet nerd rage, then yeah. But, you know, normally no. Have you bound it to another key? No, I actually don't bother.
Starting point is 00:10:48 I don't need to use all caps that often. When I do, it's just I can hold on the shift key off and it's fine. I don't miss it at all. Yeah, I was in the exact same boat, and I don't miss it at all either. So Josh, what's in your status bar in Tmux? Not a whole lot. I've just got the time and date in the lower right, and then in the lower left I just have all the different windows that I'm running. So nothing too fancy.
Starting point is 00:11:14 I usually have all the custom stuff within ZShell. One of the things that I've added is the Tmuxinator project name to let me know which context I'm in. Because I run iTerm2 fullscreen, things that I've added is the Tmuxinator project name to let me know which context I'm in. Because I run iTerm2 full screen. So it's nice to go between tabs in iTerm and then to see which context you're in. But for those that don't know, explain the difference between panes and windows inside of Tmux. Basically, windows are conceptually, they're different tabs, I guess. And then the panes themselves are the different splits within one tab. So if you have a tab, typically I'll have different windows for different projects that I'm working on.
Starting point is 00:11:57 And then within there, I'll have a 75-25 split for Vim, and then the lower 25% will be either ZShell, or typically I'll run ZShell, Rails server, Evergreen serve, because we're doing a lot of JavaScript testing, and then Guard, which we have enabled with Spork. So it allows for faster tests. We've mentioned iTerm a couple of times, and the latest version ships with some Tmux integration. Have you guys played with that?
Starting point is 00:12:31 I played with it for about 10 minutes or so, and then another iTerm update came up, and it said, oh, you've got to recompile your Tmux again for that. So I'm like, you know, I'm going to wait a little bit. It looks like it's going to be really cool once that all wraps up. But right now it seems to be in a lot of flux. I was excited when I first heard about it, but I've gotten so used to TMUX key bindings that even trying to use the iTerm ones I'm fumbling about.
Starting point is 00:12:56 So you were saying that you actually keep your iTerm full screen. And I do that too. One of the things that a good friend of mine showed me how to do was actually put a battery indicator in the TMUX status bar. And so I can see where my laptop, you know, if I'm on a laptop, I can see, oh, I'm at 17% or whatever. I better get going here. You shared your.files?
Starting point is 00:13:19 That's actually, I do have a gist of all my.files for that, but also I've got a section of that in the TMUX book, too. I find it to be one of those things that, hey, this is really cool, and it shows off a great example of how you can run an external program to results in your status bar. And you can set the interval, I guess, how often that paints, right? Yeah. I mean, the default is like a minute. I think it repaints every minute. I think that's the default.
Starting point is 00:13:42 I've got a clock in mind, so I think I'm running it every minute. So sometimes you're a minute off, but it repaints every minute. I think it's the default. I've got a clock in mine, so I think I'm running out of a minute. Sometimes you're a minute off, but close enough for government work. So we were talking before we started recording, Josh, about some of your favorite plugins. What are you pimping? So two that I use on a daily basis now are
Starting point is 00:14:00 tslime.vim and then vimterbucks. They're both available on GitHub. What tslime.vim and then vimterbucks. They're both available on GitHub. What tslime allows you to do is basically send various commands to a specific Tmux pane. So basically when you set it up, you'll tell it to point to the factory girl session and then the specific window and then a specific pane and what that allows you to do
Starting point is 00:14:28 is use vim turbox and they bind to leader t for you which you know i'm not too much of a proponent for i don't like when uh plugins go through and mess with my key bindings but it'll bind to leader t for you and allow you to run just regular unit tests or you can run cucumber scenarios. And then LeaderT will run focus unit tests or a focused scenario. So I've seen other Vim plugins that will allow you to run tests within Vim itself. The problem with that I feel is a lot of times, especially if there's a failure, I want to be able to navigate through that and then edit code while
Starting point is 00:15:12 I'm looking at the failure. And these, you know, the Vim plugins themselves don't support that. When I pipe it to another T-Mux pane, I'm able to navigate and use T-Mux's buffer scrolling to go back up, look at the error, and then also interact with the code in Vim at the same time. And that's really key. It's really essential to a very fast workflow feedback loop between writing the test, watching them fail, and then getting them to pass. You know, that's awesome just even if you're by yourself.
Starting point is 00:15:42 But what is killer is you can have multiple developers pairing or even demonstrating code to other people on your team. I think the first time that I came across Tmux was a coworker at HP at the time, Justin Smestad, turned me on to it. And it has changed my entire workflow. We on our team at Pure Charity now pair almost exclusively in Tmux and BIM. Is that how you guys are using it too? So I can say that it was actually my first real exposure to it. I'd kind of had it on my machine and had played around with it for a while, but I was working on a project with a,
Starting point is 00:16:14 a friend of mine and he, he said, let's just, you know, pair using Tmux. And I thought, okay, that sounds cool.
Starting point is 00:16:21 And when, when he actually walked me through it, cause he was a much better Tmux user than me, it was, it just blew me away with, because he was a much better Tmux user than me, it just blew me away with how cool that was and how productive that was. And all we needed was a really simple voice chat running in the background. We could do everything else we needed to do
Starting point is 00:16:32 inside of that window. And that really worked well, especially like on connections where it's, you know, you have lower bandwidth, like a hotel room or things like that, where you may not have the best internet connection. And, you know, you can take that a step further. And I've got this Asus Android tablet here with a keyboard on it,
Starting point is 00:16:50 and I can use that to SSH into a machine somewhere else and continue to work. So I can keep this really nice, light footprint, keep my environment running detached on this server, and then connect into it from an iPad or another kind of device. That's really kind of cool as well. I saw you spreading the gospel with Derek Bailey on Twitter. I think it was this morning or yesterday he was asking about pair setups. Yeah.
Starting point is 00:17:12 Have you guys seen Derek Bailey? I guess he's from WatchMeCode, I should mention, for those that don't know who Derek is. But have you guys seen pair.io? Yeah. So essentially it's setups we're talking about here and moving into the cloud so that you can unfurl development environments and not be bound by any one user's bandwidth and move it up into a central location. It's a fascinating idea. There was the co-authors and I of our Web Development Recipes book did a presentation at a conference back in October, and it was a four-person talk in front of a bunch of people, and we actually used Tmux for that.
Starting point is 00:17:54 So we actually had one person's computer sitting up there hooked up to the display, and then when it was everyone else's turn to show off the different part of the demonstration to do the live coding, everybody just did it from their own machine. It was really kind of an interesting use of Tmux. We had four people turned into one machine. I've gotten spoiled having my own.files locally that I've been bugging our DevOps guy to get those up into our chef recipes
Starting point is 00:18:16 so that our shared key bindings move from environment to environment. I noticed at ThoughtBot, Josh, you guys have just a shared.files repo that I guess everybody contributes to. Yes, we do. To be completely frank, I don't use it. Not to say anything against it, not that I have anything against it,
Starting point is 00:18:36 but I had gone through and basically tweaked my.files, and I continue to tweak it. And it's just a matter of basically going back through and porting some of those changes over to ThoughtBots. The biggest thing is using Tim Pope's Pathogen plugin and then using GetSubModules. So I have that all set up with Pathogen and SubModules and I have a custom rate test to go through
Starting point is 00:19:02 and grab the latest updates for all my Vim plugins. That's not in the ThoughtBot.files, and that's probably the biggest reason why I don't currently use it. Janice was training wheels for me to get into Vim after we did the Vim episode and the changelog, and I'm finding after the latest upgrade, I'm very close to just rolling my own with Pathogen like so many folks are doing now.
Starting point is 00:19:25 Is that how you run it, Brian? I have actually all my.files are actually on my Dropbox, and then I have them symlinked into the actual proper locations on the different computers that I use. And so, yeah, and then still on that, I still use Pathogen to manage all the different Vim plugins. And so it's kind of this hybrid approach. But at least whenever I go then, whenever a computer I go to, if I've got access to my Dropbox on there, I've got the most recent version of my Tmux configuration and my Vim configuration.
Starting point is 00:19:55 That's actually come in quite handy where someone will show me this new trick or whatever. I just do it. And I don't have to go to the other machines and pull things down or sync. It's there. It's ready for me as soon as I get to the other machines and pull things down or sync. It's there. It's ready for me as soon as I get to the other machine. Isn't that neat? I love that. You know, we've been talking about Vim for a lot of the episode and it's a big piece of how we use Tmux, but I'm sure there's other text mode apps that you guys have plugged into your Tmux environments. What's high on your list? Hi,
Starting point is 00:20:25 my list as of today is actually this, uh, Pearl script I found this morning called, uh, I don't know. It's TTYTER. It's a term, a terminal based Twitter client.
Starting point is 00:20:34 So I can see the, uh, the tweets come in and I can, I can tweet right from a T mucks paint. That's kind of cool. Oh, I saw that, uh,
Starting point is 00:20:40 that tweet. Uh, I'm using earthquake for the same thing. Okay. I like this because it was just so tiny and small, and I just couldn't believe that it was just one little script.
Starting point is 00:20:51 I was like, that's cool. You guys make use of the Tmux clock? No. Actually, you've seen this, right? Yeah. Yeah, I use that a lot when it's basically my away screensaver. A couple of us are pairing. I want someone to know that I've stepped away. It seems like a big thing on our team is to attach to somebody's TMUX session.
Starting point is 00:21:13 We're pairing, and then when we end the call, they forget to hang up. And if someone's got a smaller monitor, you see the dotted perimeter around your screen there. And so I always have to call them back and say, hey, Lego Mago. Yeah, I've tried to go down the offline IMAP and MUT route, but I'm still addicted to the Gmail interface. Yeah, and I use all the keyboard shortcuts. I use IRC whenever I go on IRC. I just use ERC.
Starting point is 00:21:46 I love that. It's really nice to have it there, right there in a separate window. I tried MUT myself. I do use HTOP quite a bit, especially if I'm on a remote server. I've got one of the panes in Tmux is another environment that I'm keeping an eye on. Sure. I've actually been using Alpine for terminal-based mail. I like that a lot better than MUT. It's a lot more friendly if you haven't done MUT before. Alpine is a lot easier to set up. It's a lot more like Pine and you get the inboxes. And it seems to work relatively well with Gmail,
Starting point is 00:22:18 but I got to admit, sometimes some tasks are just nicer to do in Gmail. Any other list of plugins there you want to talk about, Josh? I don't think so. I did want to talk about in iTerm 2, I've configured it so that I've set scroll back lines to zero. So that if you have your hand on a mouse and you accidentally scroll up, by default, iTerm will allow you to scroll and then it kind of messes with the display. So I turned scroll back lines to zero so that you basically can't scroll with a mouse in iTerm at all.
Starting point is 00:22:57 That's actually a pretty smart move. I like that. It just drove me crazy. I had been flicking around on the mouse, and I kept on scrolling up, and I'm like, I need to figure out a way to disable it. And I spent probably five minutes digging through all the preferences in iTerm until I figured out how to turn it off. So here's kind of the million-dollar question.
Starting point is 00:23:15 Do you have the mouse mode stuff turned off in your TMUX configuration? Yeah, I avoid using the mouse at all costs because Yeah, okay. Because it just slows me way down. I'm way faster on a keyboard. Me too. And I didn't believe that at first either. I was really resistant to that. And so I kept it so I could select panes and so I could select and I could use the mouse wheel to go back into the scroll buffer and enter copy mode and things like that. And yeah, it didn't take me more than about, I would say, a couple of hours before I realized how annoying that was.
Starting point is 00:23:45 I was defeating myself using Tmux. Another thing that I do, there's a select pane command in Tmux. So I've bound control A to select pane, and then you can pass dash T and then colon dot period, which will move forward a pane. So I can press hold down control and then AA twice while control is pressed down, and it will start cycling through all the panes. Sure. So especially if there's only two when I'm going back and forth, it's a lot easier than pressing the prefix and then J and K to move up and down.
Starting point is 00:24:31 I just use Control-A, Control-A as my prefix to cycle through just back and forth. One of the default key bindings is prefix O will do that same thing too. So I actually have never remapped it when I've kind of just always used O for that. I think it's kind of a weird binding though. It's just, it doesn't make much sense, but yeah. Oh, another thing that I use is a, a prefix and then left and right curly. Yeah. And that will go through and it'll swap, um, the content of each pain. So a lot of times if I have, you know, I always run, 75-25 split for Vim and then my shell. So if I go down into my shell and I run some tests, or if I run tests through Vim with Vim Turbux,
Starting point is 00:25:15 a lot of times what I'll want to do is I'll want to see the output on a bigger screen or on a bigger area of my screen. So I'll use the prefix and then the curly brackets to swap those panes so that I have 75% of my viewing area is now able to look at the failing tests or another common case is looking at a diff before I commit. So I just moved that up there so that I have a lot more screen real estate to figure out what changed and get a full context of what's going on. It sounds very similar to something that I've started doing lately. It was actually the last thing that I added to the Teamworks book was basically a concept of being able to maximize and minimize a pane. And just with a little bit of trickery with creating a new window and then doing some
Starting point is 00:26:01 swap pane. I create a new window. I have a little script that creates a new window and then swaps the panes from the new window into the other one. So you actually can just use a keybind and go up. And now the whole pane, the little tiny pane becomes a full screen pane. And you can use prefix down to push it back in. And it works in a lot of situations as long as you don't switch windows too much. If you switch windows, then of course, because it's going to rely on last pane.
Starting point is 00:26:23 But it's nice for the situations where I ran the test and, oh, wow, look at that stack trace. And just, okay, up arrow, oh, now I've got the full screen. Down arrow now goes back. Oh, that's great. You guys nesting Tmux at all? No. No. I've tried that a couple of times. When I posted to our chatroom the other day,
Starting point is 00:26:39 Tmux Inception, three Tmux status bars stacked up. It gets kind of confusing. Yeah, I made the mistake of trying to run screen within TMUX, and that was just a big mess too. I don't know if they fixed that, but basically there was no way to send, if the prefixes are the same, there's no way to send a prefix to screen versus sending it to TMUX, and it was just a mess.
Starting point is 00:27:03 Yeah, I'm not sure how that works. I can get to work with Vim, because I use Control-A for my prefix, and there's a configuration line you can add to your configuration that actually sends the prefix through to the other app. Oh, no kidding.
Starting point is 00:27:18 Yeah, and it doesn't work for... For me, it doesn't seem to, on my machine, it doesn't seem to work for, like, Control-A, beginning of line, and bash. But it does seem to work to send it through to Vim and other programs. Huh. But it's not bind prefix.
Starting point is 00:27:34 I can't remember what it is off the top of my head. But it's pretty cool. Because actually, its purpose for being there is for that. Are you guys always on the lookout for new config options on GitHub.files, or how do you find new things to try with Tmux? I'm definitely into looking for things on people's GitHub repos for their.files just because there's just some little neat little things that are these little one-offs that you never really think of.
Starting point is 00:28:04 One of the other ones I found from a friend of mine was just taking whatever's in the buffer, and it only works on Mac because you have the open command, but taking whatever's in the buffer and passing it to open so you can pop open a web browser based off a link you just copied. Just little things like that where it's, oh, I can leverage all these different little features of Tmunks that you don't really realize are there.
Starting point is 00:28:25 I mean, you can take the entire contents of a pane and dump it to a text file, for example. And so those kind of things become really interesting when you mix them with different Unix tools. And you can just grab out little parts of the line or whatever you're looking for. Who's got some of the best.file repos that you've seen on GitHub or elsewhere? I can't remember off the top of my head. There's been some really interesting cases where I've found, just by searching for, like, tmuxconf in GitHub, I've found people's configurations buried within other projects. And it's like, wow, there's some really neat stuff in here.
Starting point is 00:29:05 Zach Coleman's got a good one in a blog article. It's been, I guess, a couple of years now. Dot files are meant to be forked. And Holman dot files is a good one on GitHub. There's another one. Let me find who owns this one, because I just know that their GitHub username is four initials
Starting point is 00:29:26 skwp janpritzker So skwp.files is a, this is a very opinionated setup. It's got a lot of good Vim and other config pieces in here but it's very opinionated. It does some
Starting point is 00:29:42 you mentioned earlier, Josh don't be setting my key bindings. He's got some very opinionated key bindings in here, but I've found a lot of nuggets going through his.files here. I'm convinced of the statement that if you don't think that your.files are the best ones out there, you're doing something wrong. That's a good way to look at it. So a lot of my.files actually spawned from Joe Ferris. He's a ThoughtBot CTO.
Starting point is 00:30:11 They spawned from his.files, but at the end of the day, I ended up scrapping most of what was in there and just going through and finding the little nuggets because a lot of the stuff that he was doing, I either didn't find necessary or I didn't understand what was going on. And I noticed that a lot of things that I had in there were slowing my interactions down. There was some plug-in from Vim that slowed my Vim autocomplete down very significantly. So I definitely encourage everybody to go through and have their own.files and just pull in little bits and pieces from everyone else's. Yeah, that's exactly like – and that's actually one of the things that I always kind of caution people about when they want to move to Tmox is don't just take some.file and copy it in.
Starting point is 00:30:58 I mean really you're going to want to figure out what works for you and at least build it up so you understand what every one of those lines in there is doing. Because I've seen people get so frustrated with things like Janus or any of these other pre-canned things with Vim and they'll just get so frustrated with Vim. And that's a shame because there's a lot of really cool things that an editor like Vim or something has to offer. The same thing goes with ZShell. There's the OhMyZShell, that repository in GitHub.
Starting point is 00:31:28 It's very popular. And I'm not saying that it's bad or anything, but a lot of times if you don't understand what's going on in the.files, you're probably going to end up shooting yourself in the foot at some point or another. I use OhMyZShell, and I've scaled it back to just a few plug-ins that I don't want to recreate. But you really need to understand what's going on under the hood, or you're going to drive yourself crazy. Exactly.
Starting point is 00:31:52 You mentioned colors earlier in the conversation. color function that I got from some blog post that basically enumerates and shell from one to zero to two to five and outputs the, the colors. And I think I spent Thanksgiving evening, you know, just customizing my, my T mucks color scheme based on that function output. But,
Starting point is 00:32:20 you know, just even one of you mentioned earlier, you're staring at this thing all day long, you might as well make it your home. Have you guys had any problems with Mac OS copying out of Tmux? That's one of the things that Josh was talking about, like with the
Starting point is 00:32:35 reattach to user session, using that wrapper script, so at least you can pipe to pbcopy and pbpaste, and you can actually create key bindings in Tmux to take your copy buffer and paste it into the actual system and pvpaste and you can actually create key bindings and tmunks to take your um your copy buffer and paste it into the actual system clipboard and if you're using linux you can use xclip for that or some similar programs but um one of the things that i learned after talking with my talking to my buddy uh my buddy chris johnson was that if you um just use the meta key
Starting point is 00:33:02 or the option key in your, in iTerm, you can actually just copy that way. That's what I've started doing since I found out that trick as well. It's, does it do multiple lines? And that can be unfortunate sometimes. You might get line, you might get the line numbers in your Vim or something too. So just going to copy everything, but at least, you know, if you need to copy something quickly, sometimes that's faster.
Starting point is 00:33:25 Yeah. With the reattach to user namespace, that does actually work with the clipboard in Vim as well. Yeah. So if you set clipboard to unnamed, then you can copy and paste within Vim, and it'll write to the system clipboard as well. Talking about a place to find great.files. Of course, GitHub is out there, but have you guys seen.share.it? No, I've not heard of that. Oh, yeah, I've heard of that. Let me share this in our chat real quick.
Starting point is 00:34:02 There's a tmux category. It doesn't have much in there right now, but what I do like about dot share it it has a um has some screenshots so if you have a tmux config it's kind of hard to visualize sometimes what these changes will do especially if it's a visual change and they have screenshots in that you can see this is something that you want to uh pick up and put it in your own config file seems like a lot of folks on this side are big into Arch Linux, which I personally have not used. A lot of the screenshots on this side have a lot of text mode MP3 players
Starting point is 00:34:34 and things. We talked about different text mode apps beyond the Twitter client and email purely using Tmugs for development or any sort of entertainment apps? I've used PianoBar with it, and it works great. So PianoBar is an interface to Pandora for anyone that's not heard of it. I've used that one, and on Homebrew,
Starting point is 00:35:00 there's a command line interface for Last.fm as well. It seems like I've been using Rdio a lot, and it requires Flash for playback. But when I do want to listen to Last.fm, I'm using that within Tmux. It's got a nice color-coded output to the command line. And what I love about being in terminal mode, and now Tmux has kind of enabled me to wrap all these apps together. You mentioned Mac Vim earlier.
Starting point is 00:35:30 I got tired of having to keep my color schemes in sync between the terminal and Mac Vim. And now that it's terminal Vim, it's just, you know, there. I never, um,
Starting point is 00:35:40 I had actually used Vim back when I was in college and I used it for a few years as I was doing some Oracle database things. And I actually never used MacVim, ever. I had always, every time I used Vim, it would always be TerminalVim. And so for me, I could never figure out what the benefit of MacVim was. And some people told me that I missed out. It was a great thing, but I find it really interesting now that people are moving back towards that now. Things like Tmux becoming more, I would say, popular with the least of the crowd I run with. It's just nice to have your environment on every machine that you want to climb onto, you know.
Starting point is 00:36:16 So, Brian, the book drops the 29th of February? I think so. They're around there. I'm writing a book myself. I know how that goes. It's fun, isn't it? It's a process. At some point, I'd love to have a show just on nothing but book workflow when it comes to writing about these open source topics and how antiquated the publishing industry tends to be. I know PragProg is probably ahead of the curve. I couldn't imagine working with any other
Starting point is 00:36:45 publisher, honestly. I'll leave my name up at this point. Can't say enough good things about them. They've got a lot of great titles out there, and the name of the book again is? We're actually going to call this just TMUX, Productive Mouse Free Development. Productive Mouse
Starting point is 00:37:02 Free Development. Be sure to look for that. Thanks, guys, for joining us. It's been fun to talk about Tmux and text mode, and I'll be keeping an eye on your doc files.
Starting point is 00:37:11 Thanks for having me. Thanks. This has been a lot of fun. See it in my eyes So how could I forget when I found myself for the first time Safe in your arms As the dark passions shine Bye.

There aren't comments yet for this episode. Click on any sentence in the transcript to leave a comment.