{"action":"created","issue":{"url":"https://api.github.com/repos/fish-shell/fish-shell/issues/2630","labels_url":"https://api.github.com/repos/fish-shell/fish-shell/issues/2630/labels{/name}","comments_url":"https://api.github.com/repos/fish-shell/fish-shell/issues/2630/comments","events_url":"https://api.github.com/repos/fish-shell/fish-shell/issues/2630/events","html_url":"https://github.com/fish-shell/fish-shell/pull/2630","id":123590168,"number":2630,"title":"improve handling of the escape character","user":{"login":"krader1961","id":7545917,"avatar_url":"https://avatars.githubusercontent.com/u/7545917?v=3","gravatar_id":"","url":"https://api.github.com/users/krader1961","html_url":"https://github.com/krader1961","followers_url":"https://api.github.com/users/krader1961/followers","following_url":"https://api.github.com/users/krader1961/following{/other_user}","gists_url":"https://api.github.com/users/krader1961/gists{/gist_id}","starred_url":"https://api.github.com/users/krader1961/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krader1961/subscriptions","organizations_url":"https://api.github.com/users/krader1961/orgs","repos_url":"https://api.github.com/users/krader1961/repos","events_url":"https://api.github.com/users/krader1961/events{/privacy}","received_events_url":"https://api.github.com/users/krader1961/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"ridiculousfish","id":920838,"avatar_url":"https://avatars.githubusercontent.com/u/920838?v=3","gravatar_id":"","url":"https://api.github.com/users/ridiculousfish","html_url":"https://github.com/ridiculousfish","followers_url":"https://api.github.com/users/ridiculousfish/followers","following_url":"https://api.github.com/users/ridiculousfish/following{/other_user}","gists_url":"https://api.github.com/users/ridiculousfish/gists{/gist_id}","starred_url":"https://api.github.com/users/ridiculousfish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ridiculousfish/subscriptions","organizations_url":"https://api.github.com/users/ridiculousfish/orgs","repos_url":"https://api.github.com/users/ridiculousfish/repos","events_url":"https://api.github.com/users/ridiculousfish/events{/privacy}","received_events_url":"https://api.github.com/users/ridiculousfish/received_events","type":"User","site_admin":false},"milestone":null,"comments":15,"created_at":"2015-12-23T02:08:53Z","updated_at":"2016-01-29T05:40:37Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/fish-shell/fish-shell/pulls/2630","html_url":"https://github.com/fish-shell/fish-shell/pull/2630","diff_url":"https://github.com/fish-shell/fish-shell/pull/2630.diff","patch_url":"https://github.com/fish-shell/fish-shell/pull/2630.patch"},"body":"Increase the delay between seeing an escape character and giving up on\r\nwhether additional characters that match a key binding are seen. I'm\r\nsetting the value to 500 ms to match the readline library. We don't need\r\nsuch a large window for sequences transmitted by a terminal (even over ssh\r\nwhere network delays can be a problem).  However, we can't expect humans to\r\nreliably press the escape key followed by another key with an inter-char\r\ndelay of less than ~250 ms based on my testing and research. A value of\r\n500 ms provides a nice experience even for people using \"fish_vi_mode\"\r\nbindings as a half second to switch from insert to normal mode is still\r\nfast enough that most people won't even notice.\r\n\r\nResolves #1356"},"comment":{"url":"https://api.github.com/repos/fish-shell/fish-shell/issues/comments/176583634","html_url":"https://github.com/fish-shell/fish-shell/pull/2630#issuecomment-176583634","issue_url":"https://api.github.com/repos/fish-shell/fish-shell/issues/2630","id":176583634,"user":{"login":"ridiculousfish","id":920838,"avatar_url":"https://avatars.githubusercontent.com/u/920838?v=3","gravatar_id":"","url":"https://api.github.com/users/ridiculousfish","html_url":"https://github.com/ridiculousfish","followers_url":"https://api.github.com/users/ridiculousfish/followers","following_url":"https://api.github.com/users/ridiculousfish/following{/other_user}","gists_url":"https://api.github.com/users/ridiculousfish/gists{/gist_id}","starred_url":"https://api.github.com/users/ridiculousfish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ridiculousfish/subscriptions","organizations_url":"https://api.github.com/users/ridiculousfish/orgs","repos_url":"https://api.github.com/users/ridiculousfish/repos","events_url":"https://api.github.com/users/ridiculousfish/events{/privacy}","received_events_url":"https://api.github.com/users/ridiculousfish/received_events","type":"User","site_admin":false},"created_at":"2016-01-29T05:40:37Z","updated_at":"2016-01-29T05:40:37Z","body":"Finally groked this and overall it's a really nice fix. fish is opposed to configuration on principle, but this isn't a case of disagreement so much as reflecting differences in terminal configurations, or even keyboard hardware. I can think of no way to detect the right behavior automatically, so configuration is justified here.\r\n\r\nTwo thoughts:\r\n\r\n1. Dropping the delay in vi mode is a great idea. We can say that that escape-as-meta is unsupported by default in fish_vi_mode, though you can configure it using the variable.\r\n\r\n2. 500 ms feels awfully long. Escape-as-meta is an advanced feature, and (speculating) most escape-as-meta users are fast typists. Also non-EaM users will be negatively impacted by a long delay, because escape is used to e.g. clear the pager. I think we should lower this to a level where it feels comfortable for both EaM and otherwise. Users who require a longer delay will have that ability, but we ought to tune for most users who will just use escape as escape. 300 ms seems about right to me. What do you think?"}}