Live data from Hacker News

Tmux and Vim – better together

blog.bugsnag.com

131–140 of 297 posts

Re: Tmux and Vim – better together

#131
post #30

All this looks really great, however I think I just can't deal with the effort of maintaining these complex editor configurations anymore. I've been a multi-decade Vim user, until I switched to VSCode last year. It made me realize how much better the user experience can be for an editor. I had all kinds of complex vim configurations and plugins with special cases for linux vs. mac, server vs. desktop, GUI vs. termina…

I did the same. I got fed up with constantly tweaking my Emacs config so I switched to VS Code. A month later I was back because VS Code was missing too many things I wanted and didn't really work the way I wanted it to.

So the way I feel about it now is, yes, it would be nice to not have to deal with these configurations. But so far, editors like this aren't as good as the ones that do require more complex configuration, at least in my opinion.

But as others have mentioned, it's not so bad. Once you get your config right you can mostly leave it alone.

Re: Tmux and Vim – better together

#132
post #107
post #91

Earlier quoted context omitted.

Why is it weird? You created yours 10 years ago, great. For those of us who didn't it is a bit of a hassle.

Pretty much everyone knows the price of admission to using tools like Vim and Emacs is the time investment in config and learning the quirks. What the OP is saying that this doesn't have to be a perpetual state. Once you invest effort early on getting it right you often don't need to touch it, beyond a few tweaks now and then. The maintenance burden definitely declines over time. Then all you need is a storage soluti…

> Pretty much everyone knows the price of admission to using tools like Vim and Emacs is the time investment in config and learning the quirks.

To me, the real hurdle to vim (or emacs) isn't configuration : it's learning vim (or emacs). That muscle memory doesn't come from a .vimrc file, and it doesn't come overnight. Is that what you meant by "quirks"?

Re: Tmux and Vim – better together

#133
post #107
post #91

Earlier quoted context omitted.

Why is it weird? You created yours 10 years ago, great. For those of us who didn't it is a bit of a hassle.

Pretty much everyone knows the price of admission to using tools like Vim and Emacs is the time investment in config and learning the quirks. What the OP is saying that this doesn't have to be a perpetual state. Once you invest effort early on getting it right you often don't need to touch it, beyond a few tweaks now and then. The maintenance burden definitely declines over time. Then all you need is a storage soluti…

[deleted]

Re: Tmux and Vim – better together

#134

I use tmux and vim together as my dev environment for five years (used Sublime before) and I like to add another thought: One huge advantage is that I can run the dev setup on a remote server which allows to keep the entire enviroment with all build tools and watchers live and persistent for weeks. You can do this on a local environment as well if you never shutdown the system or suspend only but it still feels diffe…

> (btw tmux and vim are perfect for phone keyboards, try it yourself)

What terminal emulator do you use on your phone? Android, right?

Re: Tmux and Vim – better together

#135
post #125

Earlier quoted context omitted.

My point is that after the initial investment in the setup, it takes almost no time to maintain them. In my particular case, I invested about 2 weeks tweaking settings here and there until I felt comfortable with it. After that initial setup, it just gets out of your way.

I disagree. Plugins breaking or interfering with other plugins is a regular thing.

I'm really intrigued by what all you're doing that you have this kind of problem. I maintain a pretty complex vimrc, and deploying it is normally just a git clone. I've never had any of these issues, and when I started at google (which provides a nice collection of internal vim configs and plugins), combining the two and getting everything set up took me O(hours), not O(days). What are you doing?

Re: Tmux and Vim – better together

#136
post #43

Earlier quoted context omitted.

How do you store them? Just backup into a dotfiles repo or what? I've been looking into dotfiles + gnu stow.

I store my configs in a git repo on Seafile/Syncwerk (Dropbox alternative). This gives me a seamless experience on Unix, OSX and Windows where I just have to link to them from my home directory when on a new computer. Yes, it took an initial investment but now it just works everywhere and maintenance is low. (Some people say git repos in clouds sync are bad, but I have had zero problems with them over the years.)

Its just bad because the .git folder means that any time you delete an old git repo or anything, you get a fevered email from dropbox reminding you that you just deleted 10000 files.

Re: Tmux and Vim – better together

#137
post #55
post #23

Earlier quoted context omitted.

You can scroll using mouse in tmux too. :set mouse Not sure about selecting panes with mouse though

Yes, you can select panes and windows with the mouse. $ cat ~/.tmux.conf set -g default-terminal "tmux" bind-key -t vi-copy 'v' begin-selection bind-key -t vi-copy 'y' copy-selection set -g mouse on setw -g mode-keys vi set display-panes-time 3000 #3s My two wishes: - I wish mouse selecting text didn't select across multiple panes, or all of the blank space in a (zoomed) single pane. ("Anyone? Anyone?") - I wish the…

I have wished those two wishes before. Haven't seen a solution.

Re: Tmux and Vim – better together

#138

Earlier quoted context omitted.

I'd like to try Kak, a friend recently told me about it. But, I'm concerned about needing to relearn common commands. For instance, I believe that they mentioned that in Kak the Vim equivalent to `dw` is `wd`. I've got decades of use with Vi(m) under my belt, as well, and I am not too thrilled at the idea of having to unlearn/relearn common commands.

Having switched to Kak recently, I've found this painful since I sometimes SSH into machines with only vi installed and so have to switch back and forth between kak and vi; it's a real headache...and a real shame since kak's selection method is much nicer IMO

I find that I get irritated at vi / vim for not being as nice as kak, but vi is still useable. The hjkl keys still work, :w, :q! and so on are still the same. I, i, O, o, P, and p still do the same thing. Basic movement is almost the same except you don't get selection with your movements. I tend to fall back on this common subset when I'm using vi. Marks are different in kak, so I don't think to use those in vi. Same thing with ex commands. I'm more likely to use sed rather than messing around with vi's ex commands now.

The thing that confuses me most since the switch is vim's visual selection mode. I used to be a really heavy user of visual selection mode (V and v), but since selection is at the core of what kak does, vim's way of doing it seems really clunky now.

If I'm going to be spending more than half an hour on a machine, I'll probably end up taking a minute to build kak on it.

Re: Tmux and Vim – better together

#139

I use tmux and vim together as my dev environment for five years (used Sublime before) and I like to add another thought: One huge advantage is that I can run the dev setup on a remote server which allows to keep the entire enviroment with all build tools and watchers live and persistent for weeks. You can do this on a local environment as well if you never shutdown the system or suspend only but it still feels diffe…

> (btw tmux and vim are perfect for phone keyboards, try it yourself) What terminal emulator do you use on your phone? Android, right?

Prompt on iOS and JuiceSSH on Android are very good.

Re: Tmux and Vim – better together

#140
post #107

Earlier quoted context omitted.

Pretty much everyone knows the price of admission to using tools like Vim and Emacs is the time investment in config and learning the quirks. What the OP is saying that this doesn't have to be a perpetual state. Once you invest effort early on getting it right you often don't need to touch it, beyond a few tweaks now and then. The maintenance burden definitely declines over time. Then all you need is a storage soluti…

> Pretty much everyone knows the price of admission to using tools like Vim and Emacs is the time investment in config and learning the quirks. To me, the real hurdle to vim (or emacs) isn't configuration : it's learning vim (or emacs). That muscle memory doesn't come from a .vimrc file, and it doesn't come overnight. Is that what you meant by "quirks"?

It's the same story with the muscle memory though. Build it up once, then the effort of learning new things is not very large.

I don't think anybody doubts that there's a steep learning curve and some investment required to get set up, but you get a completely custom user experience out of it. And if you stick with it for years you're definitely getting your investment back.

Post reply on HN