zyedidia / micro

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

Usage with xterm #2278

Open syabro opened 2 years ago

syabro commented 2 years ago

I've used your manual

For best keybinding behavior, choose xterm defaults under Preferences->Profiles->Keys->Presets..., and select Esc+ for Left Option Key in the same menu. The newest versions also support true color.

But now in xterm ctrl + left/right are being used to move a word back/forward instead of alt.

Commit hash: OS: Terminal: iTerm2

How to get back to use alt+arrows in terminal?

zyedidia commented 2 years ago

The issue is that alt+arrows no longer moves by word in the shell (outside micro)? Instead of selecting xterm defaults you can select Terminal.app compatibility. Alternatively, if you still want ctrl+arrows to move by word in micro, you can select xterm defaults and manually add two more bindings:

For alt-left choose "Send escape sequence" and put b in the box (so it should send +Esc b). For alt-right choose "Send escape sequence" and put f in the box (so it should send +Esc f).