tmux overriding emacs shortcuts
So I've been searching for like 40 minutes now without success, and "C-x" being obscure to most search engines, that didn't help at all.
I've used tmux in combination with in-console emacs a few weeks ago and all worked fine. Then I didn't for some time and now I'm back on this configuration after customising my tmux a bit -- I wanted a totally distraction free environment for work, and tmux TTY seemed like a good place for that. Problem is now when I input C-x emacs doesn't pick it up anymore, which, you can guess, is very annoying.
I don't really know why it won't work, and I'm sure as hell I didn't set anything to overlap with this command.
Edit of course it works outside of tmux. So it must be a conflict with it but why ? and how to solve it without remapping emacs' commands ?
On a side note, I've read it's not possible to have 256 colour mode in TTY, is there really no way ? :/
Edit : About the 256 colors TTY, I've seen a few posts advising to use fbterm or some other terminal but all the ones cited were outdated. Is there really no other way ? Also I've been trying to have unicode characters working there but the answers were either the same as for 256 colours or configurations that didn't work on current version of Fedora 28.
Here is my .tmux.conf
# Reload config using C-b r
bind r source-file ~/.tmux.conf
# split panes using | and -
bind | split-window -h
bind - split-window -v
unbind '"'
unbind %
# switch panes using Ctrl-arrow without prefix
bind -n C-Left select-pane -L
bind -n C-Right select-pane -R
bind -n C-Up select-pane -U
bind -n C-Down select-pane -D
bind-key -r x kill-pane
# Resize panes
bind -n M-< resize-pane -L 5
bind -n M-> resize-pane -R 5
bind -n M-w resize-pane -U 5
bind -n M-W resize-pane -D 5
# Enable mouse control (clickable windows, panes, resizable panes)
set -g mouse on
set -g pane-border-fg colour8
set -g pane-active-border-fg colour7
set -g pane-active-border-bg default
# Status bar
set -g status-position top
And here is my .emacs
;; .emacs
;; Added by Package.el. This must come before configurations of
;; installed packages. Don't delete this line. If you don't want it,
;; just comment it out by adding a semicolon to the start of the line.
;; You may delete these explanatory comments.
(package-initialize)
(add-to-list 'package-archives
'("melpa-stable" . "https://stable.melpa.org/packages/") t)
;; Irony
(add-hook 'after-init-hook 'global-company-mode)
;; Always start smartparens mode in js-mode.
;(add-hook 'js-mode-hook #'smartparens-mode)
;; Company-Irony backend
(eval-after-load 'company
'(add-to-list 'company-backends 'company-irony))
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(ansi-color-faces-vector
[default default default italic underline success warning error])
'(column-number-mode t)
'(cua-mode t nil (cua-base))
'(custom-enabled-themes (quote (misterioso)))
'(diff-switches "-u")
'(package-selected-packages
(quote
(company-irony flycheck-irony company irony autopair which-key w3)))
'(show-paren-mode t))
;;
;; Epitech configuration
;;
(add-to-list 'load-path "~/.emacs.d/lisp")
(load "site-start.d/epitech-init.el")
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
)
;; Add a "lines" column
(global-linum-mode t)
(setq linum-format "%4d u2502 ")
;; `lines-tail`, highlight the part that goes beyond the
;; limit of `whitespace-line-column`
(require 'whitespace)
(setq whitespace-style '(face empty tabs lines-tail trailing))
(global-whitespace-mode t)
;; Auto whitespace-cleanup
(add-hook 'before-save-hook #'whitespace-cleanup)
;; Set TAB behaviour
;; TABS should AWLAYS be spaces
(setq-default indent-tabs-mode nil)
;; Make TABS 4 spaces
(setq default-tab-width 4)
;; Autopair
(electric-pair-mode)
;; Fix "<<EOF n<" issue in bash mode
(add-hook 'sh-mode-hook (lambda () (sh-electric-here-document-mode -1)))
;; Add in-terminal mouse support
(when (eq window-system nil)
(xterm-mouse-mode t))
Thanks for your time.
emacs keyboard-shortcuts tmux tty
add a comment |
So I've been searching for like 40 minutes now without success, and "C-x" being obscure to most search engines, that didn't help at all.
I've used tmux in combination with in-console emacs a few weeks ago and all worked fine. Then I didn't for some time and now I'm back on this configuration after customising my tmux a bit -- I wanted a totally distraction free environment for work, and tmux TTY seemed like a good place for that. Problem is now when I input C-x emacs doesn't pick it up anymore, which, you can guess, is very annoying.
I don't really know why it won't work, and I'm sure as hell I didn't set anything to overlap with this command.
Edit of course it works outside of tmux. So it must be a conflict with it but why ? and how to solve it without remapping emacs' commands ?
On a side note, I've read it's not possible to have 256 colour mode in TTY, is there really no way ? :/
Edit : About the 256 colors TTY, I've seen a few posts advising to use fbterm or some other terminal but all the ones cited were outdated. Is there really no other way ? Also I've been trying to have unicode characters working there but the answers were either the same as for 256 colours or configurations that didn't work on current version of Fedora 28.
Here is my .tmux.conf
# Reload config using C-b r
bind r source-file ~/.tmux.conf
# split panes using | and -
bind | split-window -h
bind - split-window -v
unbind '"'
unbind %
# switch panes using Ctrl-arrow without prefix
bind -n C-Left select-pane -L
bind -n C-Right select-pane -R
bind -n C-Up select-pane -U
bind -n C-Down select-pane -D
bind-key -r x kill-pane
# Resize panes
bind -n M-< resize-pane -L 5
bind -n M-> resize-pane -R 5
bind -n M-w resize-pane -U 5
bind -n M-W resize-pane -D 5
# Enable mouse control (clickable windows, panes, resizable panes)
set -g mouse on
set -g pane-border-fg colour8
set -g pane-active-border-fg colour7
set -g pane-active-border-bg default
# Status bar
set -g status-position top
And here is my .emacs
;; .emacs
;; Added by Package.el. This must come before configurations of
;; installed packages. Don't delete this line. If you don't want it,
;; just comment it out by adding a semicolon to the start of the line.
;; You may delete these explanatory comments.
(package-initialize)
(add-to-list 'package-archives
'("melpa-stable" . "https://stable.melpa.org/packages/") t)
;; Irony
(add-hook 'after-init-hook 'global-company-mode)
;; Always start smartparens mode in js-mode.
;(add-hook 'js-mode-hook #'smartparens-mode)
;; Company-Irony backend
(eval-after-load 'company
'(add-to-list 'company-backends 'company-irony))
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(ansi-color-faces-vector
[default default default italic underline success warning error])
'(column-number-mode t)
'(cua-mode t nil (cua-base))
'(custom-enabled-themes (quote (misterioso)))
'(diff-switches "-u")
'(package-selected-packages
(quote
(company-irony flycheck-irony company irony autopair which-key w3)))
'(show-paren-mode t))
;;
;; Epitech configuration
;;
(add-to-list 'load-path "~/.emacs.d/lisp")
(load "site-start.d/epitech-init.el")
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
)
;; Add a "lines" column
(global-linum-mode t)
(setq linum-format "%4d u2502 ")
;; `lines-tail`, highlight the part that goes beyond the
;; limit of `whitespace-line-column`
(require 'whitespace)
(setq whitespace-style '(face empty tabs lines-tail trailing))
(global-whitespace-mode t)
;; Auto whitespace-cleanup
(add-hook 'before-save-hook #'whitespace-cleanup)
;; Set TAB behaviour
;; TABS should AWLAYS be spaces
(setq-default indent-tabs-mode nil)
;; Make TABS 4 spaces
(setq default-tab-width 4)
;; Autopair
(electric-pair-mode)
;; Fix "<<EOF n<" issue in bash mode
(add-hook 'sh-mode-hook (lambda () (sh-electric-here-document-mode -1)))
;; Add in-terminal mouse support
(when (eq window-system nil)
(xterm-mouse-mode t))
Thanks for your time.
emacs keyboard-shortcuts tmux tty
Perhaps C-x is bound to something in tmux. Have you tried unbinding it?
– Jim Janney
Nov 12 '18 at 14:35
I'm sure I did but it stll wouldn't work. I'll try again. Edit : Well I just opened .tmux.conf and it seems like I tried that after posting as "unbind C-x" is sitting there right under r's bind. And now it works... Weird.
– Renard
Nov 13 '18 at 0:03
add a comment |
So I've been searching for like 40 minutes now without success, and "C-x" being obscure to most search engines, that didn't help at all.
I've used tmux in combination with in-console emacs a few weeks ago and all worked fine. Then I didn't for some time and now I'm back on this configuration after customising my tmux a bit -- I wanted a totally distraction free environment for work, and tmux TTY seemed like a good place for that. Problem is now when I input C-x emacs doesn't pick it up anymore, which, you can guess, is very annoying.
I don't really know why it won't work, and I'm sure as hell I didn't set anything to overlap with this command.
Edit of course it works outside of tmux. So it must be a conflict with it but why ? and how to solve it without remapping emacs' commands ?
On a side note, I've read it's not possible to have 256 colour mode in TTY, is there really no way ? :/
Edit : About the 256 colors TTY, I've seen a few posts advising to use fbterm or some other terminal but all the ones cited were outdated. Is there really no other way ? Also I've been trying to have unicode characters working there but the answers were either the same as for 256 colours or configurations that didn't work on current version of Fedora 28.
Here is my .tmux.conf
# Reload config using C-b r
bind r source-file ~/.tmux.conf
# split panes using | and -
bind | split-window -h
bind - split-window -v
unbind '"'
unbind %
# switch panes using Ctrl-arrow without prefix
bind -n C-Left select-pane -L
bind -n C-Right select-pane -R
bind -n C-Up select-pane -U
bind -n C-Down select-pane -D
bind-key -r x kill-pane
# Resize panes
bind -n M-< resize-pane -L 5
bind -n M-> resize-pane -R 5
bind -n M-w resize-pane -U 5
bind -n M-W resize-pane -D 5
# Enable mouse control (clickable windows, panes, resizable panes)
set -g mouse on
set -g pane-border-fg colour8
set -g pane-active-border-fg colour7
set -g pane-active-border-bg default
# Status bar
set -g status-position top
And here is my .emacs
;; .emacs
;; Added by Package.el. This must come before configurations of
;; installed packages. Don't delete this line. If you don't want it,
;; just comment it out by adding a semicolon to the start of the line.
;; You may delete these explanatory comments.
(package-initialize)
(add-to-list 'package-archives
'("melpa-stable" . "https://stable.melpa.org/packages/") t)
;; Irony
(add-hook 'after-init-hook 'global-company-mode)
;; Always start smartparens mode in js-mode.
;(add-hook 'js-mode-hook #'smartparens-mode)
;; Company-Irony backend
(eval-after-load 'company
'(add-to-list 'company-backends 'company-irony))
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(ansi-color-faces-vector
[default default default italic underline success warning error])
'(column-number-mode t)
'(cua-mode t nil (cua-base))
'(custom-enabled-themes (quote (misterioso)))
'(diff-switches "-u")
'(package-selected-packages
(quote
(company-irony flycheck-irony company irony autopair which-key w3)))
'(show-paren-mode t))
;;
;; Epitech configuration
;;
(add-to-list 'load-path "~/.emacs.d/lisp")
(load "site-start.d/epitech-init.el")
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
)
;; Add a "lines" column
(global-linum-mode t)
(setq linum-format "%4d u2502 ")
;; `lines-tail`, highlight the part that goes beyond the
;; limit of `whitespace-line-column`
(require 'whitespace)
(setq whitespace-style '(face empty tabs lines-tail trailing))
(global-whitespace-mode t)
;; Auto whitespace-cleanup
(add-hook 'before-save-hook #'whitespace-cleanup)
;; Set TAB behaviour
;; TABS should AWLAYS be spaces
(setq-default indent-tabs-mode nil)
;; Make TABS 4 spaces
(setq default-tab-width 4)
;; Autopair
(electric-pair-mode)
;; Fix "<<EOF n<" issue in bash mode
(add-hook 'sh-mode-hook (lambda () (sh-electric-here-document-mode -1)))
;; Add in-terminal mouse support
(when (eq window-system nil)
(xterm-mouse-mode t))
Thanks for your time.
emacs keyboard-shortcuts tmux tty
So I've been searching for like 40 minutes now without success, and "C-x" being obscure to most search engines, that didn't help at all.
I've used tmux in combination with in-console emacs a few weeks ago and all worked fine. Then I didn't for some time and now I'm back on this configuration after customising my tmux a bit -- I wanted a totally distraction free environment for work, and tmux TTY seemed like a good place for that. Problem is now when I input C-x emacs doesn't pick it up anymore, which, you can guess, is very annoying.
I don't really know why it won't work, and I'm sure as hell I didn't set anything to overlap with this command.
Edit of course it works outside of tmux. So it must be a conflict with it but why ? and how to solve it without remapping emacs' commands ?
On a side note, I've read it's not possible to have 256 colour mode in TTY, is there really no way ? :/
Edit : About the 256 colors TTY, I've seen a few posts advising to use fbterm or some other terminal but all the ones cited were outdated. Is there really no other way ? Also I've been trying to have unicode characters working there but the answers were either the same as for 256 colours or configurations that didn't work on current version of Fedora 28.
Here is my .tmux.conf
# Reload config using C-b r
bind r source-file ~/.tmux.conf
# split panes using | and -
bind | split-window -h
bind - split-window -v
unbind '"'
unbind %
# switch panes using Ctrl-arrow without prefix
bind -n C-Left select-pane -L
bind -n C-Right select-pane -R
bind -n C-Up select-pane -U
bind -n C-Down select-pane -D
bind-key -r x kill-pane
# Resize panes
bind -n M-< resize-pane -L 5
bind -n M-> resize-pane -R 5
bind -n M-w resize-pane -U 5
bind -n M-W resize-pane -D 5
# Enable mouse control (clickable windows, panes, resizable panes)
set -g mouse on
set -g pane-border-fg colour8
set -g pane-active-border-fg colour7
set -g pane-active-border-bg default
# Status bar
set -g status-position top
And here is my .emacs
;; .emacs
;; Added by Package.el. This must come before configurations of
;; installed packages. Don't delete this line. If you don't want it,
;; just comment it out by adding a semicolon to the start of the line.
;; You may delete these explanatory comments.
(package-initialize)
(add-to-list 'package-archives
'("melpa-stable" . "https://stable.melpa.org/packages/") t)
;; Irony
(add-hook 'after-init-hook 'global-company-mode)
;; Always start smartparens mode in js-mode.
;(add-hook 'js-mode-hook #'smartparens-mode)
;; Company-Irony backend
(eval-after-load 'company
'(add-to-list 'company-backends 'company-irony))
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(ansi-color-faces-vector
[default default default italic underline success warning error])
'(column-number-mode t)
'(cua-mode t nil (cua-base))
'(custom-enabled-themes (quote (misterioso)))
'(diff-switches "-u")
'(package-selected-packages
(quote
(company-irony flycheck-irony company irony autopair which-key w3)))
'(show-paren-mode t))
;;
;; Epitech configuration
;;
(add-to-list 'load-path "~/.emacs.d/lisp")
(load "site-start.d/epitech-init.el")
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
)
;; Add a "lines" column
(global-linum-mode t)
(setq linum-format "%4d u2502 ")
;; `lines-tail`, highlight the part that goes beyond the
;; limit of `whitespace-line-column`
(require 'whitespace)
(setq whitespace-style '(face empty tabs lines-tail trailing))
(global-whitespace-mode t)
;; Auto whitespace-cleanup
(add-hook 'before-save-hook #'whitespace-cleanup)
;; Set TAB behaviour
;; TABS should AWLAYS be spaces
(setq-default indent-tabs-mode nil)
;; Make TABS 4 spaces
(setq default-tab-width 4)
;; Autopair
(electric-pair-mode)
;; Fix "<<EOF n<" issue in bash mode
(add-hook 'sh-mode-hook (lambda () (sh-electric-here-document-mode -1)))
;; Add in-terminal mouse support
(when (eq window-system nil)
(xterm-mouse-mode t))
Thanks for your time.
emacs keyboard-shortcuts tmux tty
emacs keyboard-shortcuts tmux tty
edited Nov 12 '18 at 14:15
Renard
asked Nov 11 '18 at 1:47
RenardRenard
165
165
Perhaps C-x is bound to something in tmux. Have you tried unbinding it?
– Jim Janney
Nov 12 '18 at 14:35
I'm sure I did but it stll wouldn't work. I'll try again. Edit : Well I just opened .tmux.conf and it seems like I tried that after posting as "unbind C-x" is sitting there right under r's bind. And now it works... Weird.
– Renard
Nov 13 '18 at 0:03
add a comment |
Perhaps C-x is bound to something in tmux. Have you tried unbinding it?
– Jim Janney
Nov 12 '18 at 14:35
I'm sure I did but it stll wouldn't work. I'll try again. Edit : Well I just opened .tmux.conf and it seems like I tried that after posting as "unbind C-x" is sitting there right under r's bind. And now it works... Weird.
– Renard
Nov 13 '18 at 0:03
Perhaps C-x is bound to something in tmux. Have you tried unbinding it?
– Jim Janney
Nov 12 '18 at 14:35
Perhaps C-x is bound to something in tmux. Have you tried unbinding it?
– Jim Janney
Nov 12 '18 at 14:35
I'm sure I did but it stll wouldn't work. I'll try again. Edit : Well I just opened .tmux.conf and it seems like I tried that after posting as "unbind C-x" is sitting there right under r's bind. And now it works... Weird.
– Renard
Nov 13 '18 at 0:03
I'm sure I did but it stll wouldn't work. I'll try again. Edit : Well I just opened .tmux.conf and it seems like I tried that after posting as "unbind C-x" is sitting there right under r's bind. And now it works... Weird.
– Renard
Nov 13 '18 at 0:03
add a comment |
1 Answer
1
active
oldest
votes
I unbinded C-x and it didn't work so I left the unbind sitting in my conf. Now that I have booted on a new session and came back on the question it works fine. Case closed.
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
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: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
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
);
);
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
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53245152%2ftmux-overriding-emacs-shortcuts%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
I unbinded C-x and it didn't work so I left the unbind sitting in my conf. Now that I have booted on a new session and came back on the question it works fine. Case closed.
add a comment |
I unbinded C-x and it didn't work so I left the unbind sitting in my conf. Now that I have booted on a new session and came back on the question it works fine. Case closed.
add a comment |
I unbinded C-x and it didn't work so I left the unbind sitting in my conf. Now that I have booted on a new session and came back on the question it works fine. Case closed.
I unbinded C-x and it didn't work so I left the unbind sitting in my conf. Now that I have booted on a new session and came back on the question it works fine. Case closed.
answered Nov 13 '18 at 0:06
RenardRenard
165
165
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- 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.
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
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53245152%2ftmux-overriding-emacs-shortcuts%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
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
Required, but never shown
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
Required, but never shown
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
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
Perhaps C-x is bound to something in tmux. Have you tried unbinding it?
– Jim Janney
Nov 12 '18 at 14:35
I'm sure I did but it stll wouldn't work. I'll try again. Edit : Well I just opened .tmux.conf and it seems like I tried that after posting as "unbind C-x" is sitting there right under r's bind. And now it works... Weird.
– Renard
Nov 13 '18 at 0:03