Live data from Hacker News

Tmux and Vim – better together

blog.bugsnag.com

121–130 of 297 posts

Re: Tmux and Vim – better together

#121
post #91

Earlier quoted context omitted.

Weird. I built my .rc files like 10 years ago, and only edit them about twice a year to add a plugin or modify a keybinding. Not a pain to maintain at all.

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.

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.

Re: Tmux and Vim – better together

#122

Earlier quoted context omitted.

> Indeed, but it doesn't really matter since the default experience in VSCode or IntelliJ or Xcode or any other IDE or editor doesn't work for me out of the box either. I have to change things anyways, and I can't change VSCode or IntelliJ or Xcode to fit my liking, but I've been able to change tmux+vim to it, although it could be even better. I disagree. The default settings of Visual studio work perfectly fine for…

> I disagree. The default settings of Visual studio work perfectly fine for me. That's lucky for you, but unfortunately, it's not the case for me at all. > As an added advantage, I can use other developers in my companies workstations to show them something quickly if I need I might be using other peoples computers 10 hours a year, but I'm using my own maybe as much as 2200 hours a year. It doesn't seem logical to ta…

Have you actually tried to get YouCompleteMe[1] to work for C/C++ autocomplete? It's a huge PIA. Autocomplete just works in VSCode and many other IDEs once you point them at the right directory.

https://github.com/Valloric/YouCompleteMe

Re: Tmux and Vim – better together

#123
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've taken a month or two off from plugging Kakoune on HN because I was worried about becoming tiresome, but I can't resist mentioning it in this context. I used vim for 20 years, although I always preferred to stick with the default configuration. I switched to kak a couple of months ago, and I couldn't be happier. It's got great tmux integration, it automatically runs a server so you can connect multiple clients to…

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.

Re: Tmux and Vim – better together

#124
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've taken a month or two off from plugging Kakoune on HN because I was worried about becoming tiresome, but I can't resist mentioning it in this context. I used vim for 20 years, although I always preferred to stick with the default configuration. I switched to kak a couple of months ago, and I couldn't be happier. It's got great tmux integration, it automatically runs a server so you can connect multiple clients to…

I think Kakoune is particularly interesting here because it integrates window splitting using tmux and a client-server model instead of re-implementing it which is what vim does. This is part of Kakoune's design philosophy: to be composable with other unix tools. Other examples of this are file browsing[1] and fuzzy finding[2] using ranger and fzf, or even just piping a selection to `fmt` to reformat a paragraph.

[1] https://github.com/mawww/kakoune/wiki/Ranger

[2] https://github.com/mawww/kakoune/wiki/Fuzzy-finder

Re: Tmux and Vim – better together

#125
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.

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.

Re: Tmux and Vim – better together

#126
post #43

Earlier quoted context omitted.

Weird. I built my .rc files like 10 years ago, and only edit them about twice a year to add a plugin or modify a keybinding. Not a pain to maintain at all.

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.)

Re: Tmux and Vim – better together

#127
post #104
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…

Seems like this needs to provide your definitions for "better" or "high quality". I haven't tried VSCode yet, but I play with Atom on occasion just to see what the cool kids are doing. And I go back to emacs every time scratching my head that people still spend their lives on the mouse and arrow keys.

I just decided to dump Atom - I discovered that it gets very slow as file size increases (to the point where it could be described as "broken".) Makes me glad that I write most of my code in C and do most of my editing in vi.

Re: Tmux and Vim – better together

#128

Earlier quoted context omitted.

I've taken a month or two off from plugging Kakoune on HN because I was worried about becoming tiresome, but I can't resist mentioning it in this context. I used vim for 20 years, although I always preferred to stick with the default configuration. I switched to kak a couple of months ago, and I couldn't be happier. It's got great tmux integration, it automatically runs a server so you can connect multiple clients to…

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

Re: Tmux and Vim – better together

#129
post #85

Nice article, I used tmux for a long time until I switched back to screen as it is default on most operating systems. -- Dunno is it only me but I see a weird thing going on with "new" Vim community. Everyone is starting to use it as a VSCode or Atom, trying to use hundreds plugins but most of them don't even know how to use tabs properly... I see most of this by new "neo" fans "you don't know how to make a thing in…

I think if someone is going to use something like SpaceVim, it would be best to start early and just learn that instead of vanilla vim. The initial cognitive load will be high for learning both anyways. I personally do not have the patience for it even after giving it a try. But in my case, my 3yo laptop might just be too slow to handle all that bloat.

Many of them will be lost when editing something in vim on a completely clean remote server or anything other... Like how to explore files without NERDTree?

You can learn basic Vim commands in 30min with vimtutor. One thing to keep in mind is this: https://danielmiessler.com/study/vim/#language and this https://www.vi-improved.org/recommendations/

Re: Tmux and Vim – better together

#130
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 different. Just an example: You worked weeks ago on a side-project and want to get in again for a small fix. Just to recall and open all relevant files, run the build tool and server plus tweaking the layout requires five minutes and usually you don't do it, you just want to fix one line and not think about the project setup. With tmux you go to the respective workplace with prefix+p (for previous) in case you kept the workplace still running. That's it. With a 1GB RAM VPS I can run many tmux workplaces/windows each with ~8 vim instances or other processes.

Further, I can develop on any of my notebooks/PCs/OSes with an ssh client installed, even on my phone. Btw, tmux and vim are perfect for phone keyboards, try it and it happens really frequently that you are on the go and want to try another idea/fix. Here, prefix+z for zooming into a pane is quite helpful.

And when I get a new computer my dev environment doesn't have to be setup again. I am still using the same remote server which survived three notebooks now.

And a (small) bonus: If you want to show coworkers your work in a browser (if it's a website) you give them just your static server IP without the need to ifconfig your current local dynamic IP before.

Running your dev environment remotely is a small thing but makes a huge difference in daily use.

Post reply on HN