{"action":"created","issue":{"url":"https://api.github.com/repos/dag/vim-fish/issues/29","repository_url":"https://api.github.com/repos/dag/vim-fish","labels_url":"https://api.github.com/repos/dag/vim-fish/issues/29/labels{/name}","comments_url":"https://api.github.com/repos/dag/vim-fish/issues/29/comments","events_url":"https://api.github.com/repos/dag/vim-fish/issues/29/events","html_url":"https://github.com/dag/vim-fish/pull/29","id":89454039,"number":29,"title":"Improve fish#Indent().","user":{"login":"Raimondi","id":44153,"avatar_url":"https://avatars3.githubusercontent.com/u/44153?v=4","gravatar_id":"","url":"https://api.github.com/users/Raimondi","html_url":"https://github.com/Raimondi","followers_url":"https://api.github.com/users/Raimondi/followers","following_url":"https://api.github.com/users/Raimondi/following{/other_user}","gists_url":"https://api.github.com/users/Raimondi/gists{/gist_id}","starred_url":"https://api.github.com/users/Raimondi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Raimondi/subscriptions","organizations_url":"https://api.github.com/users/Raimondi/orgs","repos_url":"https://api.github.com/users/Raimondi/repos","events_url":"https://api.github.com/users/Raimondi/events{/privacy}","received_events_url":"https://api.github.com/users/Raimondi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2015-06-19T03:15:56Z","updated_at":"2017-11-22T10:06:20Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/dag/vim-fish/pulls/29","html_url":"https://github.com/dag/vim-fish/pull/29","diff_url":"https://github.com/dag/vim-fish/pull/29.diff","patch_url":"https://github.com/dag/vim-fish/pull/29.patch"},"body":"This PR addresses some problems with the current fish#indent() function:\n- Fix: multiline strings should not be modified.\n- Fix: \"end\" is always decreased by one.\n- Fix: \"case\" and \"else\" are always decreased by one.\n- Fix: continued lines are not treated differently.\n- Fix: \"if\", \"while\", etc followed by \"begin\" should increment next line\n  by two instead of by one.\n- Fix: \"case\" should be one more than \"switch\".\n- Fix: multiline strings and continued lines are considered in the\n  calculations for the next line.\n\nIn [this gist](https://gist.github.com/Raimondi/867c4cec6a256f446db0) you can compare the results of using `gg=G` in a really bad indented fish file with the current and the proposed fish#indent().\n"},"comment":{"url":"https://api.github.com/repos/dag/vim-fish/issues/comments/346302975","html_url":"https://github.com/dag/vim-fish/pull/29#issuecomment-346302975","issue_url":"https://api.github.com/repos/dag/vim-fish/issues/29","id":346302975,"user":{"login":"dag","id":319,"avatar_url":"https://avatars1.githubusercontent.com/u/319?v=4","gravatar_id":"","url":"https://api.github.com/users/dag","html_url":"https://github.com/dag","followers_url":"https://api.github.com/users/dag/followers","following_url":"https://api.github.com/users/dag/following{/other_user}","gists_url":"https://api.github.com/users/dag/gists{/gist_id}","starred_url":"https://api.github.com/users/dag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dag/subscriptions","organizations_url":"https://api.github.com/users/dag/orgs","repos_url":"https://api.github.com/users/dag/repos","events_url":"https://api.github.com/users/dag/events{/privacy}","received_events_url":"https://api.github.com/users/dag/received_events","type":"User","site_admin":false},"created_at":"2017-11-22T10:06:19Z","updated_at":"2017-11-22T10:06:19Z","author_association":"OWNER","body":"I'm trying to work through the PR queue but this is a bit much for me to review at the moment (not having touched vim scripting for years and not having vim, git, fish or vim-fish currently set up).\r\n\r\nHowever, if I remember correctly the idea was you use `gq` to format larger blocks of code, which will use the native `fish_indent` program that should probably handle every case correctly. `fish#Indent()` is meant to handle manual line-by-line input efficiently; is that working for you?"}}
{"actor":{"display_login":"dag"}}