{"action":"created","issue":{"url":"https://api.github.com/repos/lervag/vimtex/issues/592","repository_url":"https://api.github.com/repos/lervag/vimtex","labels_url":"https://api.github.com/repos/lervag/vimtex/issues/592/labels{/name}","comments_url":"https://api.github.com/repos/lervag/vimtex/issues/592/comments","events_url":"https://api.github.com/repos/lervag/vimtex/issues/592/events","html_url":"https://github.com/lervag/vimtex/issues/592","id":182316414,"number":592,"title":"Indentation issue with regard unbalanced brackets and parentheses.","user":{"login":"zhouyan","id":538601,"avatar_url":"https://avatars.githubusercontent.com/u/538601?v=3","gravatar_id":"","url":"https://api.github.com/users/zhouyan","html_url":"https://github.com/zhouyan","followers_url":"https://api.github.com/users/zhouyan/followers","following_url":"https://api.github.com/users/zhouyan/following{/other_user}","gists_url":"https://api.github.com/users/zhouyan/gists{/gist_id}","starred_url":"https://api.github.com/users/zhouyan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhouyan/subscriptions","organizations_url":"https://api.github.com/users/zhouyan/orgs","repos_url":"https://api.github.com/users/zhouyan/repos","events_url":"https://api.github.com/users/zhouyan/events{/privacy}","received_events_url":"https://api.github.com/users/zhouyan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":10,"created_at":"2016-10-11T16:49:24Z","updated_at":"2016-10-12T21:48:18Z","closed_at":null,"body":"Setting `vimtex_indent_enabled` to 1 will be enough to reproduce the following issue.\r\n\r\nThe `vimtex` indent file indent things between  `[`, `(` and their right counter-parts. However, unlike `{`, they are possibly unbalanced. For example, say an closed-open interval like `[0, 1)` appears often enough. And in some disciplines users will also need to use notions like `] a, b [`. Whenever the delimiters are unbalanced, there appears to be issues with the indentation. For example, consider the following two short paragraph\r\n\r\n```\r\nfirst $[0, 1)$\r\n\r\nnext\r\n```\r\n\r\nThe second paragraph and anything that follows will be indented one level. This is quite annoying. Ideally it is best to have the indent expression to analysis these situations. But they do not have to used in math mode. They can be used anywhere. And thus it maybe best not to indent things between them at all.\r\n\r\nI understand the where they can be useful. For example, `[` and `]` are commonly use to mark optional arguments. But most of the time, things between them are not long enough to be broken into lines for indentation to be of any use at all. The only one exception is perhaps `\\documentclass`. But that hardly is general."},"comment":{"url":"https://api.github.com/repos/lervag/vimtex/issues/comments/253349809","html_url":"https://github.com/lervag/vimtex/issues/592#issuecomment-253349809","issue_url":"https://api.github.com/repos/lervag/vimtex/issues/592","id":253349809,"user":{"login":"zhouyan","id":538601,"avatar_url":"https://avatars.githubusercontent.com/u/538601?v=3","gravatar_id":"","url":"https://api.github.com/users/zhouyan","html_url":"https://github.com/zhouyan","followers_url":"https://api.github.com/users/zhouyan/followers","following_url":"https://api.github.com/users/zhouyan/following{/other_user}","gists_url":"https://api.github.com/users/zhouyan/gists{/gist_id}","starred_url":"https://api.github.com/users/zhouyan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhouyan/subscriptions","organizations_url":"https://api.github.com/users/zhouyan/orgs","repos_url":"https://api.github.com/users/zhouyan/repos","events_url":"https://api.github.com/users/zhouyan/events{/privacy}","received_events_url":"https://api.github.com/users/zhouyan/received_events","type":"User","site_admin":false},"created_at":"2016-10-12T21:48:18Z","updated_at":"2016-10-12T21:48:18Z","body":"Please don't be bothered too much by my last few examples. I started to encounter the issues because I was writing a document with a lot half-open intervals. Those examples are just to make a point that it is probably a good idea to have the option of not indenting them at all,  because there are too many \"reasonable possible\" situations in TeX for them to always be dealt with correctly. Both examples were certainly uncommon and don't worth the effort to handle, even though they were real. Even handling \\verb is beyond what I hoped for.\n\nAnyway, many thanks for the improvement. I guess you decided not to have an option to have them disabled completely. I think that's fine.\n\n> On Oct 13, 2016, at 05:36, Karl Yngve Lervåg <notifications@github.com> wrote:\n> \n> Regarding shortvrb, I really have to say it makes the parsing very much more difficult. I hope you can accept that I won't handle it. If you use shortvrb to define \\verb|...| stuff that introduces unmatched delimiters, than vimtex simply won't handle that.\n> \n> I've pushed an update that handles the \\verb commands, though. I feel this should suffice.\n> \n> —\n> You are receiving this because you authored the thread.\n> Reply to this email directly, view it on GitHub, or mute the thread.\n> \n"}}
{"actor":{"display_login":"zhouyan"}}