How can I create a shortcut to resize panes in a tmux window?
Clash Royale CLAN TAG#URR8PPP
up vote
4
down vote
favorite
I am having lots of issues with tmux
in mac
.
Another problem I have is that I can not bind a key in my tmux.conf
to be able to resize my panes.
What I need is the CTRL-b: resize-pane -U 10
I currently do to increase the size of the pane upwards in 10 cells (or downwards or left or right) to be done by a key shortcut and not to actually have to type this over and over (which I currently do unfortunately).
But I can not find a way to configure this since in mac it seems that CTRL
and other keys work diffently than linux.
Can anyone please help out? I have been trying too long to figure this out and for my first Mac
I am really starting to dislike them.....
linux command-line ssh osx tmux
add a comment |Â
up vote
4
down vote
favorite
I am having lots of issues with tmux
in mac
.
Another problem I have is that I can not bind a key in my tmux.conf
to be able to resize my panes.
What I need is the CTRL-b: resize-pane -U 10
I currently do to increase the size of the pane upwards in 10 cells (or downwards or left or right) to be done by a key shortcut and not to actually have to type this over and over (which I currently do unfortunately).
But I can not find a way to configure this since in mac it seems that CTRL
and other keys work diffently than linux.
Can anyone please help out? I have been trying too long to figure this out and for my first Mac
I am really starting to dislike them.....
linux command-line ssh osx tmux
add a comment |Â
up vote
4
down vote
favorite
up vote
4
down vote
favorite
I am having lots of issues with tmux
in mac
.
Another problem I have is that I can not bind a key in my tmux.conf
to be able to resize my panes.
What I need is the CTRL-b: resize-pane -U 10
I currently do to increase the size of the pane upwards in 10 cells (or downwards or left or right) to be done by a key shortcut and not to actually have to type this over and over (which I currently do unfortunately).
But I can not find a way to configure this since in mac it seems that CTRL
and other keys work diffently than linux.
Can anyone please help out? I have been trying too long to figure this out and for my first Mac
I am really starting to dislike them.....
linux command-line ssh osx tmux
I am having lots of issues with tmux
in mac
.
Another problem I have is that I can not bind a key in my tmux.conf
to be able to resize my panes.
What I need is the CTRL-b: resize-pane -U 10
I currently do to increase the size of the pane upwards in 10 cells (or downwards or left or right) to be done by a key shortcut and not to actually have to type this over and over (which I currently do unfortunately).
But I can not find a way to configure this since in mac it seems that CTRL
and other keys work diffently than linux.
Can anyone please help out? I have been trying too long to figure this out and for my first Mac
I am really starting to dislike them.....
linux command-line ssh osx tmux
linux command-line ssh osx tmux
edited Apr 13 '17 at 12:37
Communityâ¦
1
1
asked Jul 4 '13 at 18:07
Jim
2,806123257
2,806123257
add a comment |Â
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
3
down vote
accepted
In ~/.tmux.conf
:
bind e resize-pane -U 10
Then, tmux source-file ~/.tmux.conf
. (another useful shortcut: use the same principle).
1
1) Sobind e resize-pane -U 10
is one line intmux
that binds the keye
with the resize? Should I have pressed thectrl-b
beforee
? 2) I am not sure what you mean withtmux source-file ~/.tmux.conf
. Doesn'ttmux
read the home directory's conf file?
â Jim
Jul 4 '13 at 19:43
@Jim: Yes, you hit the prefix key first. Thene
. Yes,tmux
does that, but it is faster to have it as a shortcut as well, so you don't have to restarttmux
every time you make an improvement/extension in/to the init file.
â Emanuel Berg
Jul 4 '13 at 19:44
Sotmux source-file ~/.tmux.conf
is another line intmux.conf
?
â Jim
Jul 4 '13 at 19:46
@Jim: No, that would be something you type. In the init file, it could look like this:bind u source-file ~/.tmux.conf
if you want this foru
.
â Emanuel Berg
Jul 4 '13 at 19:50
1
why are you usingbind
and notbind-key
?
â Charlie Parker
Jan 28 '16 at 22:04
 |Â
show 2 more comments
up vote
1
down vote
Below are my keybindings that let me resize a pane.
It uses Alt + direction, where the keys for the directions are known from Vim:
k
h l
j
# Resize the current pane using Alt + direction
bind -n M-k resize-pane -U 5
bind -n M-j resize-pane -D 5
bind -n M-h resize-pane -L 5
bind -n M-l resize-pane -R 5
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
3
down vote
accepted
In ~/.tmux.conf
:
bind e resize-pane -U 10
Then, tmux source-file ~/.tmux.conf
. (another useful shortcut: use the same principle).
1
1) Sobind e resize-pane -U 10
is one line intmux
that binds the keye
with the resize? Should I have pressed thectrl-b
beforee
? 2) I am not sure what you mean withtmux source-file ~/.tmux.conf
. Doesn'ttmux
read the home directory's conf file?
â Jim
Jul 4 '13 at 19:43
@Jim: Yes, you hit the prefix key first. Thene
. Yes,tmux
does that, but it is faster to have it as a shortcut as well, so you don't have to restarttmux
every time you make an improvement/extension in/to the init file.
â Emanuel Berg
Jul 4 '13 at 19:44
Sotmux source-file ~/.tmux.conf
is another line intmux.conf
?
â Jim
Jul 4 '13 at 19:46
@Jim: No, that would be something you type. In the init file, it could look like this:bind u source-file ~/.tmux.conf
if you want this foru
.
â Emanuel Berg
Jul 4 '13 at 19:50
1
why are you usingbind
and notbind-key
?
â Charlie Parker
Jan 28 '16 at 22:04
 |Â
show 2 more comments
up vote
3
down vote
accepted
In ~/.tmux.conf
:
bind e resize-pane -U 10
Then, tmux source-file ~/.tmux.conf
. (another useful shortcut: use the same principle).
1
1) Sobind e resize-pane -U 10
is one line intmux
that binds the keye
with the resize? Should I have pressed thectrl-b
beforee
? 2) I am not sure what you mean withtmux source-file ~/.tmux.conf
. Doesn'ttmux
read the home directory's conf file?
â Jim
Jul 4 '13 at 19:43
@Jim: Yes, you hit the prefix key first. Thene
. Yes,tmux
does that, but it is faster to have it as a shortcut as well, so you don't have to restarttmux
every time you make an improvement/extension in/to the init file.
â Emanuel Berg
Jul 4 '13 at 19:44
Sotmux source-file ~/.tmux.conf
is another line intmux.conf
?
â Jim
Jul 4 '13 at 19:46
@Jim: No, that would be something you type. In the init file, it could look like this:bind u source-file ~/.tmux.conf
if you want this foru
.
â Emanuel Berg
Jul 4 '13 at 19:50
1
why are you usingbind
and notbind-key
?
â Charlie Parker
Jan 28 '16 at 22:04
 |Â
show 2 more comments
up vote
3
down vote
accepted
up vote
3
down vote
accepted
In ~/.tmux.conf
:
bind e resize-pane -U 10
Then, tmux source-file ~/.tmux.conf
. (another useful shortcut: use the same principle).
In ~/.tmux.conf
:
bind e resize-pane -U 10
Then, tmux source-file ~/.tmux.conf
. (another useful shortcut: use the same principle).
edited 2 mins ago
Mateen Ulhaq
1897
1897
answered Jul 4 '13 at 19:40
Emanuel Berg
3,60452852
3,60452852
1
1) Sobind e resize-pane -U 10
is one line intmux
that binds the keye
with the resize? Should I have pressed thectrl-b
beforee
? 2) I am not sure what you mean withtmux source-file ~/.tmux.conf
. Doesn'ttmux
read the home directory's conf file?
â Jim
Jul 4 '13 at 19:43
@Jim: Yes, you hit the prefix key first. Thene
. Yes,tmux
does that, but it is faster to have it as a shortcut as well, so you don't have to restarttmux
every time you make an improvement/extension in/to the init file.
â Emanuel Berg
Jul 4 '13 at 19:44
Sotmux source-file ~/.tmux.conf
is another line intmux.conf
?
â Jim
Jul 4 '13 at 19:46
@Jim: No, that would be something you type. In the init file, it could look like this:bind u source-file ~/.tmux.conf
if you want this foru
.
â Emanuel Berg
Jul 4 '13 at 19:50
1
why are you usingbind
and notbind-key
?
â Charlie Parker
Jan 28 '16 at 22:04
 |Â
show 2 more comments
1
1) Sobind e resize-pane -U 10
is one line intmux
that binds the keye
with the resize? Should I have pressed thectrl-b
beforee
? 2) I am not sure what you mean withtmux source-file ~/.tmux.conf
. Doesn'ttmux
read the home directory's conf file?
â Jim
Jul 4 '13 at 19:43
@Jim: Yes, you hit the prefix key first. Thene
. Yes,tmux
does that, but it is faster to have it as a shortcut as well, so you don't have to restarttmux
every time you make an improvement/extension in/to the init file.
â Emanuel Berg
Jul 4 '13 at 19:44
Sotmux source-file ~/.tmux.conf
is another line intmux.conf
?
â Jim
Jul 4 '13 at 19:46
@Jim: No, that would be something you type. In the init file, it could look like this:bind u source-file ~/.tmux.conf
if you want this foru
.
â Emanuel Berg
Jul 4 '13 at 19:50
1
why are you usingbind
and notbind-key
?
â Charlie Parker
Jan 28 '16 at 22:04
1
1
1) So
bind e resize-pane -U 10
is one line in tmux
that binds the key e
with the resize? Should I have pressed the ctrl-b
before e
? 2) I am not sure what you mean with tmux source-file ~/.tmux.conf
. Doesn't tmux
read the home directory's conf file?â Jim
Jul 4 '13 at 19:43
1) So
bind e resize-pane -U 10
is one line in tmux
that binds the key e
with the resize? Should I have pressed the ctrl-b
before e
? 2) I am not sure what you mean with tmux source-file ~/.tmux.conf
. Doesn't tmux
read the home directory's conf file?â Jim
Jul 4 '13 at 19:43
@Jim: Yes, you hit the prefix key first. Then
e
. Yes, tmux
does that, but it is faster to have it as a shortcut as well, so you don't have to restart tmux
every time you make an improvement/extension in/to the init file.â Emanuel Berg
Jul 4 '13 at 19:44
@Jim: Yes, you hit the prefix key first. Then
e
. Yes, tmux
does that, but it is faster to have it as a shortcut as well, so you don't have to restart tmux
every time you make an improvement/extension in/to the init file.â Emanuel Berg
Jul 4 '13 at 19:44
So
tmux source-file ~/.tmux.conf
is another line in tmux.conf
?â Jim
Jul 4 '13 at 19:46
So
tmux source-file ~/.tmux.conf
is another line in tmux.conf
?â Jim
Jul 4 '13 at 19:46
@Jim: No, that would be something you type. In the init file, it could look like this:
bind u source-file ~/.tmux.conf
if you want this for u
.â Emanuel Berg
Jul 4 '13 at 19:50
@Jim: No, that would be something you type. In the init file, it could look like this:
bind u source-file ~/.tmux.conf
if you want this for u
.â Emanuel Berg
Jul 4 '13 at 19:50
1
1
why are you using
bind
and not bind-key
?â Charlie Parker
Jan 28 '16 at 22:04
why are you using
bind
and not bind-key
?â Charlie Parker
Jan 28 '16 at 22:04
 |Â
show 2 more comments
up vote
1
down vote
Below are my keybindings that let me resize a pane.
It uses Alt + direction, where the keys for the directions are known from Vim:
k
h l
j
# Resize the current pane using Alt + direction
bind -n M-k resize-pane -U 5
bind -n M-j resize-pane -D 5
bind -n M-h resize-pane -L 5
bind -n M-l resize-pane -R 5
add a comment |Â
up vote
1
down vote
Below are my keybindings that let me resize a pane.
It uses Alt + direction, where the keys for the directions are known from Vim:
k
h l
j
# Resize the current pane using Alt + direction
bind -n M-k resize-pane -U 5
bind -n M-j resize-pane -D 5
bind -n M-h resize-pane -L 5
bind -n M-l resize-pane -R 5
add a comment |Â
up vote
1
down vote
up vote
1
down vote
Below are my keybindings that let me resize a pane.
It uses Alt + direction, where the keys for the directions are known from Vim:
k
h l
j
# Resize the current pane using Alt + direction
bind -n M-k resize-pane -U 5
bind -n M-j resize-pane -D 5
bind -n M-h resize-pane -L 5
bind -n M-l resize-pane -R 5
Below are my keybindings that let me resize a pane.
It uses Alt + direction, where the keys for the directions are known from Vim:
k
h l
j
# Resize the current pane using Alt + direction
bind -n M-k resize-pane -U 5
bind -n M-j resize-pane -D 5
bind -n M-h resize-pane -L 5
bind -n M-l resize-pane -R 5
edited Nov 17 '17 at 7:10
answered Nov 15 '17 at 13:56
Matthias Braun
1,72211120
1,72211120
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f81782%2fhow-can-i-create-a-shortcut-to-resize-panes-in-a-tmux-window%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password