msknathan / mintty

Automatically exported from code.google.com/p/mintty
GNU General Public License v3.0
0 stars 0 forks source link

Shift-ESC sends CSI on vim #351

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
- What steps will reproduce the problem?
1. Start vim in cygwin
2. Go into insert mode, and press shift-esc

- What is the expected output? What do you see instead?

It should exit the insert mode. Instead, it inserts the character <9b>.
In xterm on xorg, it exits the insert mode.

- What versions of mintty, Cygwin/MSYS, and Windows are you using?
mintty 1.1.1

- Please provide any additional information below.

To overcome this, I use this in vimrc:
imap <special> <CSI> <ESC>

But vim, on ":help CSI" mentions that this strange code sequence should be sent 
on Alt-ESC. Xterm on Xorg does not send CSI for shift-esc.

Original issue reported on code.google.com by virik...@gmail.com on 6 Sep 2012 at 8:40

GoogleCodeExporter commented 9 years ago
I've an issue with this, because my brain got somehow used to 'shift' being 
irrelevant for exiting the insert mode, and I press that sequence from time to 
time. It's hard for me to relearn some coordination about that, and I even 
don't want to relearn, only for mintty. So I think it may be a bug worth 
reporting.

Original comment by virik...@gmail.com on 6 Sep 2012 at 8:43

GoogleCodeExporter commented 9 years ago
This works as intended. It's documented at 
http://code.google.com/p/mintty/wiki/Keycodes#Special_keys. The point is to 
allow to distinguish Shift+Escape from plain Escape, and to be able to easily 
enter the CSI character. Alt+Escape on Windows is a system-wide shortcut for 
switching window, so can't (or at least shouldn't) be used in applications.

Mapping <CSI> to <ESC> is the right thing to do if this gets in your way. (Btw, 
why is the '<special>' needed there? I couldn't work it out from a quick look 
at the vim manual.)

Original comment by andy.koppe on 6 Sep 2012 at 11:43

GoogleCodeExporter commented 9 years ago
Ok, thank you. I didn't know it was intended.

For the <special>, I simply read: help map-special  in vim.

As all has been clarified, feel free to close this issue if you want.

Original comment by virik...@gmail.com on 6 Sep 2012 at 2:22