{"action":"created","issue":{"url":"https://api.github.com/repos/atom/vim-mode/issues/764","labels_url":"https://api.github.com/repos/atom/vim-mode/issues/764/labels{/name}","comments_url":"https://api.github.com/repos/atom/vim-mode/issues/764/comments","events_url":"https://api.github.com/repos/atom/vim-mode/issues/764/events","html_url":"https://github.com/atom/vim-mode/pull/764","id":94508759,"number":764,"title":"cancel operator-pending on unrecognized key strokes","user":{"login":"jacekkopecky","id":807315,"avatar_url":"https://avatars.githubusercontent.com/u/807315?v=3","gravatar_id":"","url":"https://api.github.com/users/jacekkopecky","html_url":"https://github.com/jacekkopecky","followers_url":"https://api.github.com/users/jacekkopecky/followers","following_url":"https://api.github.com/users/jacekkopecky/following{/other_user}","gists_url":"https://api.github.com/users/jacekkopecky/gists{/gist_id}","starred_url":"https://api.github.com/users/jacekkopecky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jacekkopecky/subscriptions","organizations_url":"https://api.github.com/users/jacekkopecky/orgs","repos_url":"https://api.github.com/users/jacekkopecky/repos","events_url":"https://api.github.com/users/jacekkopecky/events{/privacy}","received_events_url":"https://api.github.com/users/jacekkopecky/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-07-11T21:27:35Z","updated_at":"2015-07-18T17:53:31Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/atom/vim-mode/pulls/764","html_url":"https://github.com/atom/vim-mode/pull/764","diff_url":"https://github.com/atom/vim-mode/pull/764.diff","patch_url":"https://github.com/atom/vim-mode/pull/764.patch"},"body":"Fix #734 and #680 .\r\n\r\nThis fix overrides Atom's normal key binding resolution process for multi-keystroke key bindings: where Atom will do `ci3w` like this:\r\n 1. `c` -> change\r\n 1. `i` -> *some potential bindings, e.g. `iw`, `ip` etc., so let's wait*\r\n 1. `3` -> `i3` is not known and no key binding starts with `i3` so let's break it down\r\n   1. `i` on its own is unknown in operator-pending mode, so let's ignore it\r\n   1. let's try again `3` -> a prefix, good\r\n 1. `w` combines with `3` so the final result is `c3w` \r\n\r\nWhat we want is\r\n 1. `c` -> change\r\n 2. `i` as above\r\n 3. `3` leads to `i3` which is unknown and cancels `c`\r\n 4. `w` moves cursor to next word\r\n\r\nWe could beep on a cancellation like this.\r\n\r\nThe `atom.keymaps.cancelPendingState()` call is a private API, but I can't judge whether that's too bad for this PR."},"comment":{"url":"https://api.github.com/repos/atom/vim-mode/issues/comments/122571686","html_url":"https://github.com/atom/vim-mode/pull/764#issuecomment-122571686","issue_url":"https://api.github.com/repos/atom/vim-mode/issues/764","id":122571686,"user":{"login":"bronson","id":1776,"avatar_url":"https://avatars.githubusercontent.com/u/1776?v=3","gravatar_id":"","url":"https://api.github.com/users/bronson","html_url":"https://github.com/bronson","followers_url":"https://api.github.com/users/bronson/followers","following_url":"https://api.github.com/users/bronson/following{/other_user}","gists_url":"https://api.github.com/users/bronson/gists{/gist_id}","starred_url":"https://api.github.com/users/bronson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bronson/subscriptions","organizations_url":"https://api.github.com/users/bronson/orgs","repos_url":"https://api.github.com/users/bronson/repos","events_url":"https://api.github.com/users/bronson/events{/privacy}","received_events_url":"https://api.github.com/users/bronson/received_events","type":"User","site_admin":false},"created_at":"2015-07-18T17:53:31Z","updated_at":"2015-07-18T17:53:31Z","body":"Hm, vim-surround is starting to look notorious: https://github.com/atom/vim-mode/issues/657#issuecomment-122571442\r\n\r\nI wish I could mark packages as conflicting...  I don't want to break people using both vim-mode-next and vim-surround, but I don't want vim-surround's nasty keymap handling to hold up progress either...  Dunno."}}