Live data from Hacker News

Tmux and Vim – better together

blog.bugsnag.com

291–297 of 297 posts

Re: Tmux and Vim – better together

#291
post #220

Earlier quoted context omitted.

Basically I am not able to compile my particular codebase in clang or gcc too easily since it's an embedded system. But many other IDEs have no problem inferring autocompletion without requiring compilation. YouCompleteMe itself was a bit of an issue as I have to develop in Windows and it's not quite as well supported.

You should use a different completion plugin then. YCM is the only one that needs to be compiled. If you use regular vim, check out neocomplete, and if you use neovim, well, you should know about deoplete (it's kickass). Both of these pretty much work out of the box; they have accompanying clang sources (vim-clang or deoplete-clang) that feed the suggestions to neocomplete/deoplete. Frankly, I would use neovim + deop…

Given that I am currently a windows user on visual studio, I'm not exactly sure how I would get started with neovim and deoplete. The instructions on deoplete [0] assume you're not running on windows, to start, and looking in the issues [1] It's not supported

[0] https://github.com/zchee/deoplete-clang [1] https://github.com/zchee/deoplete-clang/issues/57

Re: Tmux and Vim – better together

#292

Not sure if it is only at my Mac, but with the latest Mac OS + iTerm + TMUX + VIM, my clipboard doesn't work properly, even using the following setup on my tmux bind-key -t vi-copy y copy-pipe "reattach-to-user-namespace pbcopy" Anyone with the same problem?

No clue if you've done these steps, and I'm not on Mac OS at the moment (also I use Terminal.app), but: In my main .tmux.conf I put: if-shell 'test "$(uname -s)" = Darwin' 'source-file ~/.tmux-osx.conf' And then in .tmux-osx.conf I add: # https://robots.thoughtbot.com/tmux-copy-paste-on-os-x-a-better-future # To copy/paste on OSX just brew install the following # brew install reattach-to-user-namespace # Setup 'v' to…

I had the same config, but I discovered what was missing. If you use zsh, you need to add this as well:

set-option -g default-command "reattach-to-user-namespace -l zsh"

Re: Tmux and Vim – better together

#293
post #93

Earlier quoted context omitted.

Same exact experience here. Like, I could never get ES6 highlighting to work in Vim. Just flat out didn't work, so all non-ES5 code I write looks terrible. Could be a conflict with my theme or something else. I don't know, or care to do the work to figure it out. I used Vim for a good 5 years. I still miss many things about it, but a shitty default UX is not one of them.

For anyone else who happens by and has the same issue, vim had (has?) substandard syntax highlighting for javascript. Pulling in pangloss's vim-javascript ( https://github.com/pangloss/vim-javascript ) fixed that up for me. If you write JSX, you can pull in https://github.com/mxw/vim-jsx to get great highlighting for that too.

I of course use vim-javascript. This didn't fix the issue for me. An issue with the color scheme I use I suppose.

Re: Tmux and Vim – better together

#294
post #125

Earlier quoted context omitted.

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

Have you considered that your usage is at fault as opposed to vim? Out of 127 plugins installed and even more tried I cannot recall ever having an issue other than having bound a key that the new plugin would have bound.

I know, I'm "holding it wrong". I don't care who's "fault" it is, I just don't have the energy to try and figure it out.

Re: Tmux and Vim – better together

#295
post #213

Earlier quoted context omitted.

Nope, abduco adds it pretty seemlessly without getting in the way, but unfortunately it doesn't seem to handle mouse events which I use occasionally with vim.

I've been using abduco and neovim as my dev environment for the past month or so and am very happy with the setup. I don't rely on mouse events so didn't notice that missing. Whenever I log in local or remote I start a new session or attach to the existing one with `abduco -A nvim nvim`.

It's a really pretty awesome set up, but when I am primarily in terminal mode and have a lot of scroll back I want to yank from I frequently will reach for my mouse. Lack of mouse support has stopped me from using abduco consistently.

Seems like some solid software other than that, I'm glad there's an option that interferes so minimally.

Re: Tmux and Vim – better together

#296
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?

Because when you are selecting, that usually means that you let the terminal select from the contents of the terminal buffer. And vim is out of the game. It may for example be that your vim draws actual spaces to fill each line for rendering on the terminal. What you describe doesn't happen for me on xterm+vim and neither on xterm+tmux+vim, but it may well happen on a another terminal or with different vim settings.…

You can also just yank directly to the system clipboard: "+y

Re: Tmux and Vim – better together

#297

Earlier quoted context omitted.

If you like searchable multiple-choice configuration, there's always customize. M-x customize

That doesn't help emacs noobs at all. Half the Emacs term still used today 40 years after being coined don't make any sense. Wait - this is not the Window, but the... Frame? What?

frame -> X window

buffer -> tab

window -> tile

Post reply on HN