Split tmux windows with same keys as in Emacs?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP












1















In emacs, you split a window with C-x 2 (one above the other) or C-x 3 (one next to the other).



How can I get the same key bindings in tmux?



Also, once a window is split, in emacs you cycle through them with C-x o. Can I configure tmux to use the same key?










share|improve this question






















  • Have you read the man page for tmux? It should be obvious what to do. Unfortunately if you do it, then C-x stops working as a prefix key in Emacs because tmux will interpret it instead.

    – Kyle Jones
    Nov 7 '13 at 23:42











  • It would be nice if there were a tmux command I could use to disable those keys just for the one window in which I run emacs. Alternatively, I'd be happy to use C-b C-x 2 instead of the normal C-x 2 to split windows.

    – Frank
    Nov 8 '13 at 23:42















1















In emacs, you split a window with C-x 2 (one above the other) or C-x 3 (one next to the other).



How can I get the same key bindings in tmux?



Also, once a window is split, in emacs you cycle through them with C-x o. Can I configure tmux to use the same key?










share|improve this question






















  • Have you read the man page for tmux? It should be obvious what to do. Unfortunately if you do it, then C-x stops working as a prefix key in Emacs because tmux will interpret it instead.

    – Kyle Jones
    Nov 7 '13 at 23:42











  • It would be nice if there were a tmux command I could use to disable those keys just for the one window in which I run emacs. Alternatively, I'd be happy to use C-b C-x 2 instead of the normal C-x 2 to split windows.

    – Frank
    Nov 8 '13 at 23:42













1












1








1








In emacs, you split a window with C-x 2 (one above the other) or C-x 3 (one next to the other).



How can I get the same key bindings in tmux?



Also, once a window is split, in emacs you cycle through them with C-x o. Can I configure tmux to use the same key?










share|improve this question














In emacs, you split a window with C-x 2 (one above the other) or C-x 3 (one next to the other).



How can I get the same key bindings in tmux?



Also, once a window is split, in emacs you cycle through them with C-x o. Can I configure tmux to use the same key?







emacs tmux






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 7 '13 at 23:10









FrankFrank

1,0913109




1,0913109












  • Have you read the man page for tmux? It should be obvious what to do. Unfortunately if you do it, then C-x stops working as a prefix key in Emacs because tmux will interpret it instead.

    – Kyle Jones
    Nov 7 '13 at 23:42











  • It would be nice if there were a tmux command I could use to disable those keys just for the one window in which I run emacs. Alternatively, I'd be happy to use C-b C-x 2 instead of the normal C-x 2 to split windows.

    – Frank
    Nov 8 '13 at 23:42

















  • Have you read the man page for tmux? It should be obvious what to do. Unfortunately if you do it, then C-x stops working as a prefix key in Emacs because tmux will interpret it instead.

    – Kyle Jones
    Nov 7 '13 at 23:42











  • It would be nice if there were a tmux command I could use to disable those keys just for the one window in which I run emacs. Alternatively, I'd be happy to use C-b C-x 2 instead of the normal C-x 2 to split windows.

    – Frank
    Nov 8 '13 at 23:42
















Have you read the man page for tmux? It should be obvious what to do. Unfortunately if you do it, then C-x stops working as a prefix key in Emacs because tmux will interpret it instead.

– Kyle Jones
Nov 7 '13 at 23:42





Have you read the man page for tmux? It should be obvious what to do. Unfortunately if you do it, then C-x stops working as a prefix key in Emacs because tmux will interpret it instead.

– Kyle Jones
Nov 7 '13 at 23:42













It would be nice if there were a tmux command I could use to disable those keys just for the one window in which I run emacs. Alternatively, I'd be happy to use C-b C-x 2 instead of the normal C-x 2 to split windows.

– Frank
Nov 8 '13 at 23:42





It would be nice if there were a tmux command I could use to disable those keys just for the one window in which I run emacs. Alternatively, I'd be happy to use C-b C-x 2 instead of the normal C-x 2 to split windows.

– Frank
Nov 8 '13 at 23:42










1 Answer
1






active

oldest

votes


















-1














Have a look at the must read at http://pragprog.com/book/bhtmux/tmux; you'll get anything you need
Further on, try out this:




# Setting the prefix from C-b to C-d
# START:prefix
set -g prefix C-d
# END:prefix

# Ensure that we can send Ctrl-A to other apps
bind C-d send-prefix

# Free the original Ctrl-b prefix keybinding unbind C-b
unbind C-b

bind | split-window -h
bind _ split-window -v


And this for moving between panes:



bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R


Both from the previous reference and the man page.






share|improve this answer

























  • Much better now, thanks @Jason, I'll do my best next time.

    – csantosb
    Nov 23 '13 at 21:58











  • Sorry, I don't understand how this answers my questions and would give me C-x 2 and C-x 3 for splitting?

    – Frank
    Nov 24 '13 at 6:16











  • Put this code in your config file along with whatever you need

    – csantosb
    Nov 25 '13 at 16:23






  • 2





    @csantosb - I don't think those keys are what @frank is looking for. Emacs splits with Ctrl-x 2, and switches with Ctrl-x o.

    – Ken Williams
    Aug 10 '15 at 21:52










Your Answer








StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f99304%2fsplit-tmux-windows-with-same-keys-as-in-emacs%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









-1














Have a look at the must read at http://pragprog.com/book/bhtmux/tmux; you'll get anything you need
Further on, try out this:




# Setting the prefix from C-b to C-d
# START:prefix
set -g prefix C-d
# END:prefix

# Ensure that we can send Ctrl-A to other apps
bind C-d send-prefix

# Free the original Ctrl-b prefix keybinding unbind C-b
unbind C-b

bind | split-window -h
bind _ split-window -v


And this for moving between panes:



bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R


Both from the previous reference and the man page.






share|improve this answer

























  • Much better now, thanks @Jason, I'll do my best next time.

    – csantosb
    Nov 23 '13 at 21:58











  • Sorry, I don't understand how this answers my questions and would give me C-x 2 and C-x 3 for splitting?

    – Frank
    Nov 24 '13 at 6:16











  • Put this code in your config file along with whatever you need

    – csantosb
    Nov 25 '13 at 16:23






  • 2





    @csantosb - I don't think those keys are what @frank is looking for. Emacs splits with Ctrl-x 2, and switches with Ctrl-x o.

    – Ken Williams
    Aug 10 '15 at 21:52















-1














Have a look at the must read at http://pragprog.com/book/bhtmux/tmux; you'll get anything you need
Further on, try out this:




# Setting the prefix from C-b to C-d
# START:prefix
set -g prefix C-d
# END:prefix

# Ensure that we can send Ctrl-A to other apps
bind C-d send-prefix

# Free the original Ctrl-b prefix keybinding unbind C-b
unbind C-b

bind | split-window -h
bind _ split-window -v


And this for moving between panes:



bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R


Both from the previous reference and the man page.






share|improve this answer

























  • Much better now, thanks @Jason, I'll do my best next time.

    – csantosb
    Nov 23 '13 at 21:58











  • Sorry, I don't understand how this answers my questions and would give me C-x 2 and C-x 3 for splitting?

    – Frank
    Nov 24 '13 at 6:16











  • Put this code in your config file along with whatever you need

    – csantosb
    Nov 25 '13 at 16:23






  • 2





    @csantosb - I don't think those keys are what @frank is looking for. Emacs splits with Ctrl-x 2, and switches with Ctrl-x o.

    – Ken Williams
    Aug 10 '15 at 21:52













-1












-1








-1







Have a look at the must read at http://pragprog.com/book/bhtmux/tmux; you'll get anything you need
Further on, try out this:




# Setting the prefix from C-b to C-d
# START:prefix
set -g prefix C-d
# END:prefix

# Ensure that we can send Ctrl-A to other apps
bind C-d send-prefix

# Free the original Ctrl-b prefix keybinding unbind C-b
unbind C-b

bind | split-window -h
bind _ split-window -v


And this for moving between panes:



bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R


Both from the previous reference and the man page.






share|improve this answer















Have a look at the must read at http://pragprog.com/book/bhtmux/tmux; you'll get anything you need
Further on, try out this:




# Setting the prefix from C-b to C-d
# START:prefix
set -g prefix C-d
# END:prefix

# Ensure that we can send Ctrl-A to other apps
bind C-d send-prefix

# Free the original Ctrl-b prefix keybinding unbind C-b
unbind C-b

bind | split-window -h
bind _ split-window -v


And this for moving between panes:



bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R


Both from the previous reference and the man page.







share|improve this answer














share|improve this answer



share|improve this answer








edited Nov 25 '13 at 16:22

























answered Nov 23 '13 at 0:23









csantosbcsantosb

1215




1215












  • Much better now, thanks @Jason, I'll do my best next time.

    – csantosb
    Nov 23 '13 at 21:58











  • Sorry, I don't understand how this answers my questions and would give me C-x 2 and C-x 3 for splitting?

    – Frank
    Nov 24 '13 at 6:16











  • Put this code in your config file along with whatever you need

    – csantosb
    Nov 25 '13 at 16:23






  • 2





    @csantosb - I don't think those keys are what @frank is looking for. Emacs splits with Ctrl-x 2, and switches with Ctrl-x o.

    – Ken Williams
    Aug 10 '15 at 21:52

















  • Much better now, thanks @Jason, I'll do my best next time.

    – csantosb
    Nov 23 '13 at 21:58











  • Sorry, I don't understand how this answers my questions and would give me C-x 2 and C-x 3 for splitting?

    – Frank
    Nov 24 '13 at 6:16











  • Put this code in your config file along with whatever you need

    – csantosb
    Nov 25 '13 at 16:23






  • 2





    @csantosb - I don't think those keys are what @frank is looking for. Emacs splits with Ctrl-x 2, and switches with Ctrl-x o.

    – Ken Williams
    Aug 10 '15 at 21:52
















Much better now, thanks @Jason, I'll do my best next time.

– csantosb
Nov 23 '13 at 21:58





Much better now, thanks @Jason, I'll do my best next time.

– csantosb
Nov 23 '13 at 21:58













Sorry, I don't understand how this answers my questions and would give me C-x 2 and C-x 3 for splitting?

– Frank
Nov 24 '13 at 6:16





Sorry, I don't understand how this answers my questions and would give me C-x 2 and C-x 3 for splitting?

– Frank
Nov 24 '13 at 6:16













Put this code in your config file along with whatever you need

– csantosb
Nov 25 '13 at 16:23





Put this code in your config file along with whatever you need

– csantosb
Nov 25 '13 at 16:23




2




2





@csantosb - I don't think those keys are what @frank is looking for. Emacs splits with Ctrl-x 2, and switches with Ctrl-x o.

– Ken Williams
Aug 10 '15 at 21:52





@csantosb - I don't think those keys are what @frank is looking for. Emacs splits with Ctrl-x 2, and switches with Ctrl-x o.

– Ken Williams
Aug 10 '15 at 21:52

















draft saved

draft discarded
















































Thanks for contributing an answer to Unix & Linux Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f99304%2fsplit-tmux-windows-with-same-keys-as-in-emacs%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown






Popular posts from this blog

How to check contact read email or not when send email to Individual?

Displaying single band from multi-band raster using QGIS

How many registers does an x86_64 CPU actually have?