{"action":"created","issue":{"url":"https://api.github.com/repos/lervag/vimtex/issues/320","repository_url":"https://api.github.com/repos/lervag/vimtex","labels_url":"https://api.github.com/repos/lervag/vimtex/issues/320/labels{/name}","comments_url":"https://api.github.com/repos/lervag/vimtex/issues/320/comments","events_url":"https://api.github.com/repos/lervag/vimtex/issues/320/events","html_url":"https://github.com/lervag/vimtex/issues/320","id":125994400,"number":320,"title":"sentence text object","user":{"login":"nilsbecker","id":177614,"avatar_url":"https://avatars.githubusercontent.com/u/177614?v=3","gravatar_id":"","url":"https://api.github.com/users/nilsbecker","html_url":"https://github.com/nilsbecker","followers_url":"https://api.github.com/users/nilsbecker/followers","following_url":"https://api.github.com/users/nilsbecker/following{/other_user}","gists_url":"https://api.github.com/users/nilsbecker/gists{/gist_id}","starred_url":"https://api.github.com/users/nilsbecker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nilsbecker/subscriptions","organizations_url":"https://api.github.com/users/nilsbecker/orgs","repos_url":"https://api.github.com/users/nilsbecker/repos","events_url":"https://api.github.com/users/nilsbecker/events{/privacy}","received_events_url":"https://api.github.com/users/nilsbecker/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":13,"created_at":"2016-01-11T17:22:08Z","updated_at":"2016-04-15T19:49:06Z","closed_at":null,"body":"i noticed that invoking `das` at the position `*` below,\r\n```\r\n...\r\nx = y.\r\n\\end{equation}\r\nThis is a * new sentence.\r\n```\r\nalso deletes the closing `\\end{equation}`. this is somewhat annoying and unintuitive, since for example, `dap` does not delete `\\end{equation}` presently. so, it's not true that the object `s` is nested inside `p`.\r\n\r\nthis made me think that maybe the `s` text object should generally stop at environments? \r\n\r\non second though this is not so clear-cut.  equation or other (text formatting) environments may be a legitimate part of a sentence, so one may actually want to delete them with `das`. but then, not even a paragraph deletion would delete the environment, it seems.\r\n\r\nthe behavior at the moment non-intuitive since paragraphs borders are not always also sentence borders. to solve this, it seems one would want to either make paragraphs span environments, or make sentences stop at environments. \r\n\r\nit seems that the first option would possibly break #226 again? could the formatting with `gq` in #226 be made to work just by modifying `gq` and keeping a more naive paragraph text object which only sees blank lines as borders? this may be nonsense, sorry if so.\r\n\r\nthe second option is possibly easier: make sentences stop at any environment. then the simple rule 'sentences go from . to . within a paragraph' would still apply. the `s` could possibly be defined to always be inside the current `p`..\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/lervag/vimtex/issues/comments/210615615","html_url":"https://github.com/lervag/vimtex/issues/320#issuecomment-210615615","issue_url":"https://api.github.com/repos/lervag/vimtex/issues/320","id":210615615,"user":{"login":"nilsbecker","id":177614,"avatar_url":"https://avatars.githubusercontent.com/u/177614?v=3","gravatar_id":"","url":"https://api.github.com/users/nilsbecker","html_url":"https://github.com/nilsbecker","followers_url":"https://api.github.com/users/nilsbecker/followers","following_url":"https://api.github.com/users/nilsbecker/following{/other_user}","gists_url":"https://api.github.com/users/nilsbecker/gists{/gist_id}","starred_url":"https://api.github.com/users/nilsbecker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nilsbecker/subscriptions","organizations_url":"https://api.github.com/users/nilsbecker/orgs","repos_url":"https://api.github.com/users/nilsbecker/repos","events_url":"https://api.github.com/users/nilsbecker/events{/privacy}","received_events_url":"https://api.github.com/users/nilsbecker/received_events","type":"User","site_admin":false},"created_at":"2016-04-15T19:49:06Z","updated_at":"2016-04-15T19:49:06Z","body":"> After having worked for quite some time with the current altered behaviour for { and }, I've decided that I don't really like it. I propose to revert to standard Vim behaviour for these motions.\r\n\r\ni too have been thinking that using standard vim behavior as much as possible is good. e.g. it's intuitive to look at a block of contiguous line and then select them with `vap`, irrespective of whether they contain also an `equation` block. and actually this also corresponds to latex semantics; equations without preceding empty lines are formatted in the same paragraph. \r\n\r\nso i would vote: `p` text object between empty lines as usual, and `{,}` moving between so-defined paragraphs, as usual.\r\n\r\nfor `s` i'm torn. how well would the proposed delimiting work? would it stop sentences just at `\\begin` or `\\end`? if yes then common formatting commands would not disrupt a sentence, which is good. is there a common environment that is often used within the flow of a sentence? i can't think of any right now, but i would argue that `$...$` and `\\( .. \\)` should not disrupt a sentence. hmm if it works well why not. otherwise standard full stop to full stop/?/! would also work for me.\r\n\r\nthis simplified logic puts more of the formatting burden on the definition of `gq`. test-driven development sounds good! see also my comment in #317 ."}}