Closed mintisan closed 9 years ago
Interesting.. well at least "screen capture" feature or "clean pane history" should work because they are relatively simple.
Which terminal are you using? Are you sure alt
mappings work ok in your terminal?
When pressing prefix + alt + p
you should hit prefix
first, then alt-p
together.
Another thing you can try is changing the key bindings just to verify the script works. Put the following in .tmux.conf
:
set -g @screen-capture-key 'M'
Then reload the config file with tmux source ~/.tmux.conf
. Now when you hit prefix + M
does the "screen capture" feature work?
Which terminal are you using? Are you sure alt mappings work ok in your terminal?
Mac's own Terminal(2.5) and iTerm2(Build 2.1.1), and I am not sure if I remap
alt
key or not. I will paste may.tmux.conf
at last, u can check it
When pressing prefix + alt + p
you should hit prefix
first, then alt-p
together.
yes,
alt
key isoption
,right? if yes, the way I do just as u say
Then reload the config file with tmux source ~/.tmux.conf
. Now when you hit prefix + M
does the "screen capture" feature work?
yes, it works now
It seems like my alt
key not works right way.
Think you so much for your patience.
# General setting
set -g default-terminal "screen-256color" # use 256 colors
set -g display-time 1000 # status line messages display
set -g status-utf8 on # enable utf-8
set -g history-limit 100000 # scrollback buffer n lines
# bind to reload config
bind r source-file ~/.tmux.conf
# Set the prefix to Ctrl+b, just test
# Linux
# set-option -g prefix C-b
# bind-key C-b send-prefix
# Mac OS X
set-option -g prefix ^b
bind-key ^b send-prefix
# status bar infomation
set -g status on
set -g status-bg '#4e4e4e'
set -g status-fg '#bbbbbb'
set -g status-left-fg '#bbbbbb'
set -g status-left-bg '#4e4e4e'
set -g status-right-fg '#bbbbbb'
set -g status-right-bg '#4e4e4e'
set -g status-left-length 90
set -g status-right-length 90
set -g status-left "session#S:window#I.pane#P"
set -g status-right "%Y-%m-%d 星期%a %H:%M"
set -g status-justify "centre"
# pane border colors
set -g pane-active-border-fg '#55ff55'
set -g pane-border-fg '#555555'
# from http://endot.org/2011/12/06/my-tmux-configuration/
# keybindings to make resizing easier
bind -r C-h resize-pane -L
bind -r C-j resize-pane -D
bind -r C-k resize-pane -U
bind -r C-l resize-pane -R
# Highlight active window
set -g window-status-current-fg '#55ff55'
# List of plugins
set -g @continuum-restore 'on'
# Supports `github_username/repo` or full git repo URLs
set -g @tpm_plugins ' \
tmux-plugins/tpm \
tmux-plugins/tmux-sensible \
tmux-plugins/tmux-battery \
tmux-plugins/tmux-copycat \
tmux-plugins/tmux-resurrect \
tmux-plugins/tmux-continuum \
tmux-plugins/tmux-logging \
'
# Other examples:
# github_username/plugin_name \
# git@github.com/user/plugin \
# git@bitbucket.com/user/plugin \
# Initializes TMUX plugin manager.
# Keep this line at the very bottom of tmux.conf.
run-shell '~/.tmux/plugins/tpm/tpm'
Hey @mintisan,
your .tmux.conf
looks good, there's nothing unusual there.
As you said, it seems alt
(or option
) key does not work for you currently. You can easily fix this for Terminal.app
by setting "Use option as Meta key" in the options:
Does this fix the issue?
To test alt
/option
key separately, I usually just run cat -v
command in the terminal. Then, pressing for example alt-a
key should output the following on the screen ^[a
. alt-b
outputs ^[b
, alt-c
=> ^[c
etc.
@bruno-
After doing as what you sayed, it now works in 3 mode below:
prefix + shift + p
prefix + alt + shift + p
prefix + alt + c
but not in 2. "Screen capture"
mode when I enter prefix + alt + p
. It shows message No Previous Window
. But I am sure I enter alt +p
, not p
, which is Tmux's own keybing for previous window.
And I comment
# tmux-logging
# set -g @screen-capture-key 'M'
and tmux source ~/.tmux.conf
to reload .tmux
Should I tmux kill-server
or restart system?
Oh, yes, we should tmux kill-server
after changing Terminal's settting.
Or the 2. "Screen capture"
won't work .
Now All the default key-binding for 4 work mode are working...
I think you can close this Issue now.
Think you so much for your patience Again.
Hey,
aside from tmux kill-server
, you can just reload tmux config with tmux source ~/.tmux.conf
command and new config should work.
I'm glad you got it all working.
Just a followup for iTerm, similar issue. Need to set option to "+Esc" in the profile "keys" setting. See bottom of image.
Should the keyboard shortcuts work on OSX by replacing alt
with esc
? They are not for me in iTerm2.
other 3 work modes just has no response, no tips
if i missed some setup after installing...???
my system version is OX Yosemite 10.10