-
-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiline mode exec remapping #370
Comments
Unless you use the However, in order to use C-Enter, your terminal needs to support inputting C-Enter. What is your terminal? If your terminal sends the same code for C-Enter as Enter, it is impossible for the line editor to distinguish C-Enter from Enter. Some terminals support configuring the code sent to the application when a specific key combination is pressed. You may need to configure the code for C-Enter (C-RET) as described in a table in §3.6.4. |
I am using tmux/bash. Does bash support CTRL+Enter I couldn't find anything online? |
Thanks, What is the terminal outside tmux? The terminal that sends the key input is the outside terminal, but not tmux. Tmux just passes the key input from the outside terminal to the terminal application (Bash in this case).
The plain Bash with GNU Readline doesn't handle CTRL + Enter by default, so if you use the plain Bash without ble.sh, you need to manually set up a keybinding. However, ble.sh handles CTRL + Enter by default (in the Emacs editing mode, |
Outside tmux I have bash. Ble.sh is installed as per instructions in the readme. Ctrl+enter does not result in accepting the command |
Bash is not a terminal. What is the outside terminal? There should be a terminal (
I'm asking about the outside terminal sitting on |
Could you give me the result of the following command? $ ble/widget/display-shell-version Edit: Could you run the above command in two cases: inside tmux and outside tmux? |
@Adventune Did you solve your problem? Could you find what is the outer terminal in your setup? Or if you don't know what is your outer terminal, what is your operating system and how do you open the terminal window? |
Sorry, forgot to get back to this. Here is the output of the command: GNU bash, version 5.1.16(1)-release (x86_64-pc-linux-gnu) [Ubuntu 22.04.3 LTS]
ble.sh, version 0.4.0-devel4+3f13393 (noarch) [git 2.34.1, GNU Make 4.3, GNU Awk 5.1.0, API: 3.0 (GNU MPFR 4.1.0, GNU MP 6.2.1)]
bash-completion, version 2.11 (hash:b42f5d6a7ad6d4921ec73838ba54a96d6bd30936, 77071 bytes) (noarch)
locale: LANG=en_US.UTF-8 LC_ADDRESS=fi_FI.UTF-8 LC_IDENTIFICATION=fi_FI.UTF-8 LC_MEASUREMENT=fi_FI.UTF-8 LC_MONETARY=fi_FI.UTF-8 LC_NAME=fi_FI.UTF-8 LC_NUMERIC=fi_FI.UTF-8 LC_PAPER=fi_FI.UTF-8 LC_TELEPHONE=fi_FI.UTF-8 LC_TIME=fi_FI.UTF-8
terminal: TERM=xterm-256color wcwidth=14.0-west/15.1-2+ri, vte:6800 (65;6800;1) Edit: GNU bash, version 5.1.16(1)-release (x86_64-pc-linux-gnu) [Ubuntu 22.04.3 LTS]
ble.sh, version 0.4.0-devel4+3f13393 (noarch) [git 2.34.1, GNU Make 4.3, GNU Awk 5.1.0, API: 3.0 (GNU MPFR 4.1.0, GNU MP 6.2.1)]
bash-completion, version 2.11 (hash:b42f5d6a7ad6d4921ec73838ba54a96d6bd30936, 77071 bytes) (noarch)
locale: LANG=en_US.UTF-8 LC_ADDRESS=fi_FI.UTF-8 LC_IDENTIFICATION=fi_FI.UTF-8 LC_MEASUREMENT=fi_FI.UTF-8 LC_MONETARY=fi_FI.UTF-8 LC_NAME=fi_FI.UTF-8 LC_NUMERIC=fi_FI.UTF-8 LC_PAPER=fi_FI.UTF-8 LC_TELEPHONE=fi_FI.UTF-8 LC_TIME=fi_FI.UTF-8
terminal: TERM=screen-256color wcwidth=14.0-west/15.1-2+ri, tmux:0 (84;0;0), vte:6800 (65;6800;1) |
Thanks, the above result implies that your outside terminal is one of the VTE-based terminals. However, it is still difficult to identify which specific terminal of the VTE-based one is yours. Can you tell which is your outside terminal? Or can you describe how you start the terminal? |
I run the default terminal application on Ubuntu. So I guess gnome-terminal? |
Thank you for your information. I first checked the settings of the GNOME terminal, but there don't seem to be configuration options for the sequences sent by each keypress. I also checked the source code of GNOME/vte, which does not seem to support Ctrl-Enter; They ignore all the modifier keys for Enter. The key input is processed in There seems to be a Feature Request #2658 at the upstream VTE, which suggests a distinct key sequence for Shift-Enter. To conclude, the terminal that you use does not support Ctrl-Enter (distinctly from Enter) and does not provide a way to customize it. You need to use another terminal that supports Ctrl-Enter or the feature called |
Thank you very much! Would you be able to recommend any terminals that would support |
Konsole would be one of the possible options. You may configure Konsole to send a proper sequence with Ctrl-Enter. The configuration is described in #187 (comment). You can specify You can find other combinations in Manual §3.6.4. xterm supports the |
Thank you! I'll look into those! |
Is it possible to remap the multiline execution key to another combination (eg. C-Enter)? I am using tmux-vim-navigator with C-j binded to navigate in the window and I am unable to execute multiline commands. I also couldn't find an option for the mapping.
The text was updated successfully, but these errors were encountered: