zyedidia / micro

A modern and intuitive terminal-based text editor
https://micro-editor.github.io
MIT License
25.03k stars 1.17k forks source link

I can't use micro in tmux to select multiple lines with shift + arrow keys. #2843

Open FanFanChina opened 1 year ago

FanFanChina commented 1 year ago

When I use micro in tmux, I want to select multiple lines with shift + arrow keys. But when I hold shift and click on the arrow keys, the following appears: [1;2A] [1;2B] [1;2D] [1;2C]

cyrus01337 commented 1 year ago

Can confirm with default Micro settings, the same also occurs with Ctrl as a modifier, but I do not believe this is an issue with Micro as the keybinds work fine in Nano.

What fixed this is modifying Tmux's terminal capabilities to xterm (xterm-256color also works if your terminal supports it), you can do this by shoving the following into your Tmux config:

set-option -g default-terminal "xterm"

For information on what this does, here's the entry in the official Tmux wiki. Here's a reference to how I found my answer.

FanFanChina commented 1 year ago

thanks,this is really tmux's problem.