Live data from Hacker News

Tmux and Vim – better together

blog.bugsnag.com

51–60 of 297 posts

Re: Tmux and Vim – better together

#51
post #17

I use vim 7.4 and it segfaults atleast four-five times everyday. I suspect it's some plugin that is causing it to crash but I don't really know. Does it happen to anyone else too? I have mapped Ctrl-C to ESC and I use it often. One specific instance I have seen vim crash is when the cursor is at np.inf and I press Ctrl-C.

Have you tried upgrading to a non-ancient vim?

Or, to neovim.

Re: Tmux and Vim – better together

#52
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 do exactly this myself, and it works remarkably well. I had a few conflicts I had to work around between different packages, but the updated vim package directory structure has mostly solved that problem.

EDIT: The biggest problem, for me, is that since they are all dotfiles, they are invisible to normal ls operations within the stow directory. It's a minor nit, but it can be quite annoying to run up against.

Re: Tmux and Vim – better together

#53
post #44

Looks like what he really needs/wants is an IDE.

I use tmux and vim too. The problem is no IDE (or editor) comes near tmux+vim for me. If they did, I wouldn't be using tmux+vim since it's an awful experience living inside a text-based window-manager like that.

Re: Tmux and Vim – better together

#54
Disappointed in Bugsnag for covering such trodden trails for a HN front page grab. Content marketing should have something to do with your business. There are hundreds of blog posts describing this exact setup.

Re: Tmux and Vim – better together

#55
post #23
post #5

Earlier quoted context omitted.

I used it for a while but then I realized that ConEmu also supports split panes, and then i can just scroll/select the buffers by mouse instead of ctrl+b, [. ConEmu really is an amazing piece of work. Quirky to configure (but hey, so it tmux), but truly amazing still :-)

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 tmux copy buffer ( ctl-b [ select yank ctl-b ] ) would copy into the system copy buffer ( ctl-v ).

Re: Tmux and Vim – better together

#57
post #14
post #2

I've shyed away from using tmux and Vim. For some reason, when I use tmux and Vim, if I 'copy' a snippet of text (using my mouse/cursor higlight -> right-click -> copy) it treats all of the empty space a actual "space" characters when I 'paste'. Why does it do this?

Same, I don't use tmux with vim for exactly the reasons you gave. Instead I use i3 to split screens, etc. much better imo.

Problem is attaching the session on a remote machine, this is the main reason I've gone back to mainly using tmux in fullscreen workspaces instead of relying on a tiling window manager.

Still often use tiling though to tile a browser with a terminal or two browsers.

Re: Tmux and Vim – better together

#58
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 use a Github repo + gnu stow. I wrote a little post about it (http://juanda.me/managing-your-dotfiles-with-gnu-stow). Notice that I've made my dotfiles repo private since then so you can't check it out, but the post still draws the general idea.

Re: Tmux and Vim – better together

#60
Prior to moving to a mac and using iTerm2, I did this very thing. But iTerm2 has good enough support for all of the same things, without some of the limitations imposed by tmux, that I find I don't need to use tmux anymore. Split windows, quick switching between panes, mouse support... it's all just there.

When I work remotely, I use the tmux integration provided by iTerm2 to provide more native windows, and it works well enough that I don't have to think about it most of the time.

If I were moving back to Windows or to a Linux development machine, I probably would go back to tmux in a single window. I'm just somewhat glad I don't have to right now.

Post reply on HN