Byobu mouse scrolling - [OSX + Iterm2] - horizontal-scrolling

I am trying to enable the mouse scrolling functionality in my local (non-ssh) byobu installation.
What I have tried doing :
Pressing F7 and scrolling with the mouse results in the following
Enabled the "Save lines to scrollback option" in Iterm2
Changed my ~/.tmux.conf to
set -ga terminal-overrides 'xterm*:smcup#:rmcup#'
set-option -g mouse on
Nothing seems to enable mouse scrolling. I have read pretty much all information on StackOverflow & Google to no avail.

You're modifying the incorrect tmux config for byobu.
Add the following line to the file ~/.byobu/.tmux.conf
set-option -g mouse on
Press F5 to reload your byobu profile (or start a new session). With iTerm 2 "Report mouse wheel events" enabled (the default), you should be able to mouse scroll your byobu sessions.

Related

cannot go back to terminal mode in terminal inside vim

I use :terminal command in vim to bring terminal
And to copy texts in terminal, I exit terminal mode using <C-\><C-n>. But I can't go back to terminal mode again.
I tried pressing i, But it gives error as modifiable is off
How to go back to terminal mode again?
pressing i will put the terminal in terminal mode, see here. But cannot use arrow keys.
Using arrow keys will give error as Cannot make changes 'modifiable' is off
Try use :q or :q! from normal mode.

How to bind a key to open the highlighted file with vim?

If I highlighted a filename in the copy mode, how could I open that file with vim by a hotkey?
I'm imagining something like:
bind-key -T copy-mode-vi 'C-o' send-keys -X copy-pipe-and-cancel "vim $(tmux paste-buffer)"
but that doesn't work, plus piping is redundant in this case.
I know there is tmux-open which should do similar thing, but it doesn't work for me somehow.
Environment: OSX 10.13.5, iTerm2 3.1.7, Tmux stable 2.7 built by homebrew
I normally have these settings in my vimrc
set hidden
set path+=**
Then you can just press gf when you cursor is over a word. If you want to open it on a new window, press Ctrl-w gf. If you just use gf you can go back by pressing Ctrl-6.

Vim + tmux: background with different colors

Does anyone know why when I'm within tmux, the background is darker on the right side and lighter on the left side?
Put
set -g default-terminal "screen-256color" in .tmux.conf
and
xterm-256color in the iTerm 2 settings.

tmux colour scheme changes when opening Vim?

I have an issue where my tmux status bar colour scheme changes after opening Vim and I would prefer it not to.
My tmux status bar colour scheme works fine by itself. See the following image for an example:
...notice the white bar and the blue/black/red sections of the status bar as well, this is all as expected and you can see the settings for this here: https://github.com/Integralist/Fresh-Install/blob/master/Shell/.tmux.conf#L78-L86
When I open Vim inside tmux the status bar colour scheme is overridden by Vim's colour scheme (Tomorrow Night). See the following image for an example:
And when I close Vim the tmux status bar colour scheme stays changed. See the following image for an example:
Again, even if there wasn't a way to prevent Vim from overriding the tmux status bar colour scheme while Vim was open I'd prefer it if there was a way to change the tmux status bar colour scheme back to normal when Vim was closed.
I've tried checking the $TERM env var and it seems it is always set to screen-256color. For example...
echo $TERM (tmux only) == screen-256color
echo $TERM (Vim only) == screen-256color
echo $TERM (Vim inside tmux) == screen-256color
echo $TERM (tmux only, but after opening Vim) == screen-256color
My .zshrc file has the following setting: export TERM="screen-256color" you can see the full file here: https://github.com/Integralist/Fresh-Install/blob/master/Shell/.zshrc
My .vimrc file has the following setting: set background=light and colorscheme Tomorrow-Night you can see the full file here: https://github.com/Integralist/Fresh-Install/blob/master/Shell/.vimrc
My .tmux.conf file has the following setting: set -g default-terminal "screen-256color" you can see the full file here: https://github.com/Integralist/Fresh-Install/blob/master/Shell/.tmux.conf
The following is my software set-up:
Mac OSX 10.9.2
Standard Mac Terminal.app (I don't use iTerm)
tmux 1.9a (installed via Homebrew)
Vim 7.4 (installed via Homebrew)
Does any one have any suggestions on how to resolve this issue? I'm hoping it's I'm just missing a setting somewhere in the .tmux.conf file to say "don't allow your colours to be overridden" or "when vim is opened, reapply tmux status bar colour scheme".
Any help greatly appreciated. Thanks.
I didn't go deep into your vim config, but in your plugin list I found tmuxline, This plugin applies your vim *-line color theme on your tmux status line. very likely it doesn't restore your original tmux color settings when you exit vim.
try to disable the plugin and see if it helps.

vim + tmux visual mode not highlighting

When I run vim in tmux, the syntax highlighting works fine except for the visual mode, it works but doesn't change the colors of the selected text, which I find quite annoying.
The problem stays the same even when I switch the colorscheme(I am currently using molokai)
I have the option set t_Co=256 on my vimrc
My .tmux.conf file is the same as the t-williams.conf example(just added the line "set -f default-terminal "xterm"")
I already tried some solutions to problems related to the 256 color support
any tips?
The recommended setting for tmux is
set -g default-terminal "screen-256color"
and you don't need
set t_Co=256
in your ~/.vimrc.
Make sure your terminal declares itself as a 256 color supported terminal (for example, xterm-256color). This will set the TERM in bash, which is read by tmux, and will automatically set the default-terminal setting to screen-256color.
For example, in the Terminal on OS X you can change this in the settings under the "Advanced" tab. The "Declare terminal as" option:

Resources