tmux 覆盖 emacs 快捷方式
tmux overriding emacs shortcuts
所以我已经搜索了大约 40 分钟但没有成功,而且 "C-x" 对于大多数搜索引擎来说是模糊的,这根本没有帮助。
几周前,我将 tmux 与控制台内的 emacs 结合使用,一切正常。然后我有一段时间没有这样做了,现在我在稍微定制了我的 tmux 之后又回到了这个配置——我想要一个完全不受干扰的工作环境,而 tmux TTY 似乎是一个不错的选择。现在的问题是,当我输入 C-x 时,emacs 不再接受它,您可以猜到,这非常烦人。
我真的不知道为什么它不起作用,而且我很确定我没有设置任何与此命令重叠的东西。
编辑当然它在 tmux 之外工作。所以它一定与它有冲突,但为什么呢?以及如何在不重新映射 emacs 命令的情况下解决它?
附带一提,我读到在 TTY 中不可能有 256 色模式,真的没有办法吗? :/
编辑: 关于 256 色 TTY,我看过一些建议使用 fbterm 或其他终端的帖子,但所有引用的都已过时。真的没有别的办法吗?此外,我一直在尝试让 unicode 字符在那里工作,但答案要么与 256 色相同,要么在当前版本的 Fedora 28 上不起作用的配置相同。
这是我的。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
这是我的 .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))
感谢您的宝贵时间。
我解除了绑定 C-x 但它不起作用,所以我将解除绑定留在了我的 conf 中。现在我已经启动了一个新会话并回到了它工作正常的问题。案件结案。
所以我已经搜索了大约 40 分钟但没有成功,而且 "C-x" 对于大多数搜索引擎来说是模糊的,这根本没有帮助。 几周前,我将 tmux 与控制台内的 emacs 结合使用,一切正常。然后我有一段时间没有这样做了,现在我在稍微定制了我的 tmux 之后又回到了这个配置——我想要一个完全不受干扰的工作环境,而 tmux TTY 似乎是一个不错的选择。现在的问题是,当我输入 C-x 时,emacs 不再接受它,您可以猜到,这非常烦人。 我真的不知道为什么它不起作用,而且我很确定我没有设置任何与此命令重叠的东西。 编辑当然它在 tmux 之外工作。所以它一定与它有冲突,但为什么呢?以及如何在不重新映射 emacs 命令的情况下解决它?
附带一提,我读到在 TTY 中不可能有 256 色模式,真的没有办法吗? :/
编辑: 关于 256 色 TTY,我看过一些建议使用 fbterm 或其他终端的帖子,但所有引用的都已过时。真的没有别的办法吗?此外,我一直在尝试让 unicode 字符在那里工作,但答案要么与 256 色相同,要么在当前版本的 Fedora 28 上不起作用的配置相同。
这是我的。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
这是我的 .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))
感谢您的宝贵时间。
我解除了绑定 C-x 但它不起作用,所以我将解除绑定留在了我的 conf 中。现在我已经启动了一个新会话并回到了它工作正常的问题。案件结案。