{"action":"created","issue":{"url":"https://api.github.com/repos/machakann/vim-sandwich/issues/56","repository_url":"https://api.github.com/repos/machakann/vim-sandwich","labels_url":"https://api.github.com/repos/machakann/vim-sandwich/issues/56/labels{/name}","comments_url":"https://api.github.com/repos/machakann/vim-sandwich/issues/56/comments","events_url":"https://api.github.com/repos/machakann/vim-sandwich/issues/56/events","html_url":"https://github.com/machakann/vim-sandwich/issues/56","id":276724305,"number":56,"title":"textobj-sandwich-query: check for sandwiches after default vim text-objects","user":{"login":"albertfgu","id":8164679,"avatar_url":"https://avatars3.githubusercontent.com/u/8164679?v=4","gravatar_id":"","url":"https://api.github.com/users/albertfgu","html_url":"https://github.com/albertfgu","followers_url":"https://api.github.com/users/albertfgu/followers","following_url":"https://api.github.com/users/albertfgu/following{/other_user}","gists_url":"https://api.github.com/users/albertfgu/gists{/gist_id}","starred_url":"https://api.github.com/users/albertfgu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/albertfgu/subscriptions","organizations_url":"https://api.github.com/users/albertfgu/orgs","repos_url":"https://api.github.com/users/albertfgu/repos","events_url":"https://api.github.com/users/albertfgu/events{/privacy}","received_events_url":"https://api.github.com/users/albertfgu/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-11-25T04:19:18Z","updated_at":"2017-11-25T20:03:45Z","closed_at":null,"author_association":"NONE","body":"I would like to map the sandwich query textobjects to just 'i' and 'a', e.g. `xmap i  <Plug>(textobj-sandwich-query-i)`. This way a command just as `di(` is consistent between both the sandwich-defined textobject and the default vim textobject, and it saves a lot of keystrokes.\r\n\r\nHowever, this breaks when attempting to use the default textobjects such as `iw` (sandwich will search for surrounding 'w' characters). Ideally, when parsing a textobject it should first check for default vim textobjects before using the query. Is there any way to make this work?"},"comment":{"url":"https://api.github.com/repos/machakann/vim-sandwich/issues/comments/346962769","html_url":"https://github.com/machakann/vim-sandwich/issues/56#issuecomment-346962769","issue_url":"https://api.github.com/repos/machakann/vim-sandwich/issues/56","id":346962769,"user":{"login":"albertfgu","id":8164679,"avatar_url":"https://avatars3.githubusercontent.com/u/8164679?v=4","gravatar_id":"","url":"https://api.github.com/users/albertfgu","html_url":"https://github.com/albertfgu","followers_url":"https://api.github.com/users/albertfgu/followers","following_url":"https://api.github.com/users/albertfgu/following{/other_user}","gists_url":"https://api.github.com/users/albertfgu/gists{/gist_id}","starred_url":"https://api.github.com/users/albertfgu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/albertfgu/subscriptions","organizations_url":"https://api.github.com/users/albertfgu/orgs","repos_url":"https://api.github.com/users/albertfgu/repos","events_url":"https://api.github.com/users/albertfgu/events{/privacy}","received_events_url":"https://api.github.com/users/albertfgu/received_events","type":"User","site_admin":false},"created_at":"2017-11-25T20:03:45Z","updated_at":"2017-11-25T20:03:45Z","author_association":"NONE","body":"I also noticed related problems because of these same character sandwiches. For example, in Latex, sandwich defines the very useful \\[ and \\{ sandwich objects. Therefore, when trying to match on surrounding '\\' characters (e.g. `sr\\|`), it doesn't work because it seems that it is waiting to resolve the '\\' in case the next character in the query is '[' or '{'.\r\n\r\nIf I may make a suggestion, the fact that the query textobjects default to \"same character user input\" behavior seems to be related to both issues. Perhaps this behavior could be toggled off? Alternatively, make this the default, but toggle it off if mappings for the `textobj-sandwich-literal-query` objects are defined. This way the behaviour of all possible textobjects should be unambiguous."}}
{"actor":{"display_login":"albertfgu"}}