Questions tagged [tmux]

Questions about using vim into a tmux session and how to customize integration.

Filter by
Sorted by
Tagged with
3
votes
2answers
186 views

How do I enable copy/paste between vim and tmux in both two directions?

In a tmux session, I'm running vim in one pane and a terminal in another pane. Recently, I figured out how to enter visual mode in tmux but it doesn't help much now. Can I yank selected text from a ...
0
votes
1answer
43 views

How do I compound multiple autocmds for tmux window renaming?

I have these automcmds that work nicely for renaming tmux windows with the current filename (from here): autocmd BufEnter * call system("tmux rename-window " . expand("%:t")) ...
0
votes
1answer
29 views

How do I remap <c-x><c-k> to work with fzf.vim completion?

I'm trying to set up work completion with fzf.vim. Following the manual, I have: inoremap <expr> <c-x><c-k> fzf#vim#complete#word({'window': { 'width': 0.2, 'height': 0.9, 'xoffset': ...
5
votes
5answers
740 views

Does Vim have functionality similar to tmux's `display-panes` command for selecting (goto) a specific window by number?

Does Vim have functionality similar to tmux's display-panes command for selecting (goto) a specific window by number? Sometimes when I've many windows open, it can be a pain to navigate them by C-w ...
0
votes
1answer
68 views

Vim locks up completely when pressing `ctrl+w` while using tmux + vim

I have a tmux + vim setup in which I use split panes. Every time I press ctrl+w to move between the vim panes, my vim instance becomes completely unresponsive. At first I thought this was a tmux issue ...
1
vote
0answers
35 views

Stop vim triggering activity when swapping tmux windows

In my tmux config I have focus-events and monitor-activity enabled to detect any changes that occur in other windows. When I open a vim session in one window and switch to another window, a focus ...
21
votes
3answers
13k views

No syntax highlighting in tmux

I installed tmux in iTerm 2.(Build 3.0.13) When I execute vim in tmux, syntax highlighting looks like this. But outside tmux, syntax highlighting looks fine. My $TERM inside and outside tmux is ...
0
votes
0answers
22 views

Open a json file by clicking in NeoVim in Tmux in Iterm2

I want to open a json file in NeoVim in Tmux in Iterm2 by clicking it. I have tried some Apple Script to make an Automator but all those script is only open NeoVim in Iterm2. Is there any script that ...
15
votes
4answers
2k views

How to label tmux tabs with the name of the file edited in vim?

Whenever I open a tmux session in terminal, all of the tabs containing vim sessions are labelled vim. My question is: How to configure it to label tmux tabs with the name of the edited file or ...
0
votes
0answers
24 views

How may I setup a consistent shortcut to switch to the right pane, even the pane is in another Terminal?

I have 2 screens of difference sizes, and I am a Neovim user (with Tmux, iTerm2). I would like to hack a way so that I can have a consistent way to "switch to the pane on the right of this pane&...
0
votes
1answer
82 views

Use true Solarized colors from within tmux in iTerm2

How can I use vim (8.2) within a tmux session in iTerm2, with Solarized colors? I have the Solarized colors set with my terminal, as suggested in the docs for vim solarized colors plugin. When I call ...
0
votes
0answers
85 views

Send command from Tmux pane to Vim/Neovim

I wondered if there is a way to send a command from Tmux into any pane with the name of nvim or vim? The use case is to trigger a function which is defined in my init.vim file for toggling the ...
0
votes
1answer
53 views

What is the vim equialent of CTRL+B, CTRL+<arrow-key> in tmux? [duplicate]

In tmux you can resize a pane gradually using the key combination CTRL+B CTRL+<arrow-key> to resize a split between panes. Can the same be done in vim between a split-buffer pane?
2
votes
3answers
514 views

Pasting text on Vim inside tmux breaks indentation

Ubuntu: 18.04 bionic tmux: version 2.6 VIM: Vi IMproved 8.0 (2016 Sep 12, compiled Jun 06 2019 ) Included patches: 1-1453 Modified by pkg-vim-maintainers@lists.alioth.debian.org Compiled by pkg-vim-...
2
votes
0answers
147 views

<ESC> does not exit command-line mode. Neovim on tmux on WSL

nvim is not exiting command-line mode when the ESC key is hit. E.g., the key sequence :ff<ESC>ff gives :ffff at the command-line prompt. The expected behavior is that the first :ff be discarded ...
-1
votes
1answer
60 views

Neovim window rolls up when dividing screen horizontally with tmux

When I'm coding, I like to have neovim window up and command line window down to run my code on the screen. When I save a neovim file and divide the screen into two horizontally using tmux, the neovim ...
0
votes
2answers
61 views

conceal function not working in tmux

Version: vim 8.1 Problem: Latex objects like \int, ^, \alpha, \beta, etc, all get replaced by _ in tmux when using conceallevel=1,2. Expected: correct concealment, as it happens in normal terminal, ...
6
votes
3answers
3k views

Sending command to different tmux pane from vim

behave test language need to execute different lines of the behave feature file, for example, if I want to test the line number 99, I'll need to input the following line in the terminal behave ...
0
votes
2answers
79 views

Vim+Tmux unfocus airline when switching away

I'm using Vim with tmux and I wanted to know if there was a signal or something to 'deactivate' the vim window (like when you switch between vim windows) but also when you switch between Vim and Tmux. ...
2
votes
2answers
86 views

Perform action after invoking a <Plug> command

I use the following mapping to send code to a REPL using vim-slime and tmux: nmap <buffer> <S-CR> <Plug>SlimeLineSend How can I perform an action after I invoque this mapping?. For ...
27
votes
3answers
14k views

Can the split separator in vim be less than a full column wide?

I use a tiling window manager (awesome) + a terminal multiplexer (tmux) + splits inside of vim. I have no window decorations at all, so there is no visual split between them at all if the content of ...
4
votes
2answers
908 views

How to activate bracketed paste mode in GNOME Terminal for Vim inside tmux

Edit this issue happens inside a tmux session. The original value of $TERM before starting vim is: echo $TERM screen The issue appears for example when pasting this kind of indented code: def ...
1
vote
1answer
101 views

Compile program in same tmux window

I'm new to vim and I'm trying to setup my environment for c++ development, and I want to configure vim in a way that like vscode, if I push f5 key, It would compile the program in the existing tmux ...
0
votes
4answers
1k views

Nvim can not detect focus change inside tmux sessions

I use the following setting for automatic line number toggle. augroup numbertoggle autocmd! autocmd BufEnter,FocusGained,InsertLeave * set relativenumber autocmd BufLeave,FocusLost,InsertEnter ...
4
votes
8answers
2k views

Running code in a different tmux pane

I am new to vim and tmux. TL;DR I want to have tmux set up so that I have a pane for my (python) code and a pane for the output of the code. What I know Now, from vim I can do a command like :!...
1
vote
2answers
218 views

Vim auto save buffer on Tmux `select-pane`

How to make (N)Vim auto save buffer on Tmux select-pane? In my vimrc I tried: " Auto save when buffer lose focus autocmd FocusLost,BufLeave * silent! wa " Save on buffer change set autowrite But ...
2
votes
2answers
1k views

Change Neovim cursor in insert mode under st (simple terminal) and tmux

My Neovim cursor normally switches to a pipe symbol (|) when I'm in st, but it doesn't when tmux is open in st. Is there something special to do? Version: Neovim: v0.5.0-dev Tmux: 2.9a My ...
16
votes
2answers
3k views

Tmux is changing part of the background in vim

This only seems to happens when using vim inside of tmux. I'm also using iTerm 2. If I create a new tmux pane or resize a tmux pane, it immediately looks like the this: And then the only way to fix ...
2
votes
0answers
889 views

Vim+Tmux: How to switch between Tmux Windows and Vim Tab Pages Seamlessly using the Alt Key?

In Vim I can switch between tab pages with :tabnext- to go left and tabnext+ to go right, simulating the tabs on an IDE. In Tmux I can switch between windows using <prefix>p and <prefix>n ...
1
vote
1answer
122 views

Send current vim line to seperate tmux pane and move cursor down

I am trying to send the vim line that is under the cursor to another tmux pane and then move the cursor on vim down 1 line. For context, I have vim open on 1 pane, and python open on another. I want ...
1
vote
2answers
2k views

How to remap <C-W>hjkl to navigate tmux panes and vim splits

I'm trying to use vim-tmux-navigator. I'd like to use default key bindings to move between vim and tmux splits. Which is <C-W>hjkl. But it isn't working. Either you can't remap anything with C-...
3
votes
1answer
246 views

Cannot send `--` into tmux panes from vim

I've the following function and accompanying key-bindings to send texts from vim in one tmux pane to other: " copy yanked text to tmux pane function! Send_to_tmux(count) abort let _count = (a:...
1
vote
0answers
60 views

Sharing a copy register between vim on different machines?

The image below shows two terminals. Both are running vim instances on remote machines (ssh and a serial connection through an UART cable). Vim's on those machines don't have a way to access the ...
0
votes
0answers
38 views

Any way to add an existing Vim environment to a tmux session?

If I already have vim running with numerous documents open and I want to use tmux, it seems that I have to quit vim, start the tmux session and then reopen everything again. Is there anyway to start ...
4
votes
2answers
404 views

Equivalent to tmux CTRL+B z in vim?

In tmux if you have alot of panes open, you can press CTRL+B, z to zoom into that terminal pane. Is there a way to do the same thing in vim, to zoom into / out of the selected pane?
0
votes
0answers
103 views

What is the [0/0] that pops up in corner of tmux vim if I try to scroll up?

When I'm in vim on tmux with terminal and I scroll up, the cursor will jump to where my mouse is and show a [0/0] on the right corner of my window. When that happens, I can't type or move the cursor ...
1
vote
0answers
50 views

Update OS enviroment variables from inside VIM

I use vim inside tmux over an ssh session and I often run into the issue where the $DISPLAY variable gets changed, screwing up my copy-paste. When I log in, $DISPLAY gets assigned to something new: ...
3
votes
1answer
649 views

Vim Session keeping terminal state

I am currently using tmux to have two terminals on the left and vim on the right. One terminal is running Django server, and the other one is for general usage. I am trying to find out if I can ditch ...
1
vote
1answer
117 views

remote scrollbind with an offset (to increase the viewing area, over two screens)

Could I just duplicate what scrollbind does, and use tmux to send-keys to the other vim? I have vim on an android device (in termux), and want the effect of spreading vim over another device's ...
6
votes
1answer
805 views

Vim, tmux, and xterm-bracketed-paste

From Terminal.app on my Mac, I SSH in to a box where I run Vim 8.0.1601. Left at that, everything works fine. But if I launch Vim from within a tmux window, go to insert mode, and then attempt to ...
4
votes
2answers
414 views

sending variable commands in vim-slime

I am relatively new to vim and have started using the vim-slime plugin. One thing I use it for is to run python scripts, for example :SlimeSend1 python ~/myPythonFile.py I now would like to automate ...
2
votes
1answer
172 views

How to open file in specific window (create or reuse)?

I'm trying to develop a plugin that would show results of SQL queries, by executing them inside tmux split and using mysql pager option to save them to the specific file. What I want now is to either ...
3
votes
1answer
257 views

Fugitive Gbrowse while being ssh on a server

I work remotely via ssh on my dev machine which runs a tmux. I want to pipe the output of the Gbrowse back to my laptop. Is there any reasonable way to do that.
1
vote
1answer
912 views

What can Neovim/Vim's :terminal do that tmux can't?

I've been using tmux for a while, and recently tried :term in Neovim for a few days. Aside from some small trivial differences, it seems mostly the same to me? What is the advantage of using :term? ...
7
votes
1answer
3k views

Separate C-m and Enter

I am using zsh, urxvt, tmux and in there vim. I am not 100% sure who causes the effect but I would like to bind something to ctrl and m but not to carriage return in vim. Does somebody how this is ...
1
vote
2answers
858 views

How can I use tmux for copying if I can't access the system clipboard?

I'm testing out using vim with tmux. One thing that I could do with vim with a split window is yank text from one buffer and paste it into the other. This no longer works when I have vim buffers in ...
5
votes
1answer
4k views

Change cursor shape in different terminals

At home I use iTerm2 on MacOS X, and at work, I have a laptop with CygWin. I have another PC where I use gnome-terminal or terminator, and sometimes I use tmux. I'm looking to configure the cursor ...
1
vote
0answers
361 views

Nvim not getting correct terminal size opening session in tmux [closed]

MacOS Sierra 10.12.6 + iTerm2, build 3.1.4 + NeoVim 0.2.0_1. I run on iTerm a Tmux session loaded with teamocil [session] In one of tmux windows there's an instance of nvim working smoothly, ...
3
votes
1answer
279 views

Send file and line number to tmux

I want to send commands to tmux to run Elixir tests from vim. Using the % variable allows me to run the command to run a test for a single file. The relevant line in my .vimrc is nmap <silent> ...
2
votes
0answers
384 views

vim in tmux lose highlighting

I'm using vim 8.0 and tmux 2.5 on ubuntu. And I have set the TERM environment export TERM=screen-256color and run as tmux -2. Normally, nothing goes wrong. It's like the following picture: But ...