{"action":"created","issue":{"url":"https://api.github.com/repos/SirVer/ultisnips/issues/514","labels_url":"https://api.github.com/repos/SirVer/ultisnips/issues/514/labels{/name}","comments_url":"https://api.github.com/repos/SirVer/ultisnips/issues/514/comments","events_url":"https://api.github.com/repos/SirVer/ultisnips/issues/514/events","html_url":"https://github.com/SirVer/ultisnips/pull/514","id":87239078,"number":514,"title":"[RFC] Fire autocommands when setting up and tearing down inner mappings","user":{"login":"wincent","id":7074,"avatar_url":"https://avatars.githubusercontent.com/u/7074?v=3","gravatar_id":"","url":"https://api.github.com/users/wincent","html_url":"https://github.com/wincent","followers_url":"https://api.github.com/users/wincent/followers","following_url":"https://api.github.com/users/wincent/following{/other_user}","gists_url":"https://api.github.com/users/wincent/gists{/gist_id}","starred_url":"https://api.github.com/users/wincent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wincent/subscriptions","organizations_url":"https://api.github.com/users/wincent/orgs","repos_url":"https://api.github.com/users/wincent/repos","events_url":"https://api.github.com/users/wincent/events{/privacy}","received_events_url":"https://api.github.com/users/wincent/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-06-11T07:12:11Z","updated_at":"2015-06-15T15:03:13Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/SirVer/ultisnips/pulls/514","html_url":"https://github.com/SirVer/ultisnips/pull/514","diff_url":"https://github.com/SirVer/ultisnips/pull/514.diff","patch_url":"https://github.com/SirVer/ultisnips/pull/514.patch"},"body":"It can be useful to set up mappings that apply only during expansion of\r\na snippet. UltiSnips does this internally with the `_map_inner_keys` and\r\n`_unmap_inner_keys` methods.\r\n\r\nThis commit adds some `User` autocommands so that users of UltiSnips can\r\nset up their own mappings and tear them down at the same time as\r\n`_map_inner_keys` and `_unmap_inner_keys`.\r\n\r\nThis is particularly useful for people who are writing their own\r\nexpansion and jump functions using `UltiSnips#JumpForwards` and\r\n`UltiSnips#ExpandSnippet()` and friends. Here's an example from my own\r\ndotfiles:\r\n\r\n- https://github.com/wincent/wincent/commit/0664b627e7390c7ab5b047ee5818801481d0f46c\r\n- https://github.com/wincent/wincent/commit/3740c248ee498220f3e7361b5e41023bd6cb2dbf\r\n\r\nUsing this approach I've been able to get rid of Supertab and have a\r\nmore nuanced autocompletion experience that works exactly as I'd like\r\nwith YouCompleteMe.\n\n<!-- Reviewable:start -->\n[<img src=\"https://reviewable.io/review_button.png\" height=40 alt=\"Review on Reviewable\"/>](https://reviewable.io/reviews/sirver/ultisnips/514)\n<!-- Reviewable:end -->\n"},"comment":{"url":"https://api.github.com/repos/SirVer/ultisnips/issues/comments/112099325","html_url":"https://github.com/SirVer/ultisnips/pull/514#issuecomment-112099325","issue_url":"https://api.github.com/repos/SirVer/ultisnips/issues/514","id":112099325,"user":{"login":"wincent","id":7074,"avatar_url":"https://avatars.githubusercontent.com/u/7074?v=3","gravatar_id":"","url":"https://api.github.com/users/wincent","html_url":"https://github.com/wincent","followers_url":"https://api.github.com/users/wincent/followers","following_url":"https://api.github.com/users/wincent/following{/other_user}","gists_url":"https://api.github.com/users/wincent/gists{/gist_id}","starred_url":"https://api.github.com/users/wincent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wincent/subscriptions","organizations_url":"https://api.github.com/users/wincent/orgs","repos_url":"https://api.github.com/users/wincent/repos","events_url":"https://api.github.com/users/wincent/events{/privacy}","received_events_url":"https://api.github.com/users/wincent/received_events","type":"User","site_admin":false},"created_at":"2015-06-15T15:03:13Z","updated_at":"2015-06-15T15:03:13Z","body":"Wow, I just looked at the tmux-based test harness you have set up... That is seriously brilliant; I think I'm going to steal the idea for my own plug-in."}}