{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang-nursery/fmt-rfcs/issues/37","repository_url":"https://api.github.com/repos/rust-lang-nursery/fmt-rfcs","labels_url":"https://api.github.com/repos/rust-lang-nursery/fmt-rfcs/issues/37/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang-nursery/fmt-rfcs/issues/37/comments","events_url":"https://api.github.com/repos/rust-lang-nursery/fmt-rfcs/issues/37/events","html_url":"https://github.com/rust-lang-nursery/fmt-rfcs/issues/37","id":186578181,"number":37,"title":"To indent empty lines or not?","user":{"login":"bruno-medeiros","id":4324232,"avatar_url":"https://avatars.githubusercontent.com/u/4324232?v=3","gravatar_id":"","url":"https://api.github.com/users/bruno-medeiros","html_url":"https://github.com/bruno-medeiros","followers_url":"https://api.github.com/users/bruno-medeiros/followers","following_url":"https://api.github.com/users/bruno-medeiros/following{/other_user}","gists_url":"https://api.github.com/users/bruno-medeiros/gists{/gist_id}","starred_url":"https://api.github.com/users/bruno-medeiros/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bruno-medeiros/subscriptions","organizations_url":"https://api.github.com/users/bruno-medeiros/orgs","repos_url":"https://api.github.com/users/bruno-medeiros/repos","events_url":"https://api.github.com/users/bruno-medeiros/events{/privacy}","received_events_url":"https://api.github.com/users/bruno-medeiros/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2016-11-01T16:23:25Z","updated_at":"2016-11-07T16:36:32Z","closed_at":null,"body":"I don't know if this has been discussed elsewhere, but should empty lines indented or not? For example:\r\n\r\n``` \r\n    blah(1);\r\n    \r\n    blah(2);\r\n``` \r\n\r\nShould the empty line in between the \"blah\"s be indented like the other two lines? I'd like to make a case for yes. It doesn't make any difference for viewing code on a page, but it makes a subtle difference when using/editing code in an editor: \r\n\r\nWhen you are using the navigation cursor, and it is positioned say just before \"blah\" (column 4), and you move the cursor up to the next line, the cursor will jump back to column 0, and then when you move the cursor to the next line (with \"blah\"), the cursor will return to column 4 - if the editor is smart enough (which most are). However nearly every editor I know will still have the cursor on column 0 on the empty line, unless there is whitespace indentation there too. I think it would be preferable if the cursor were always on column 4.\r\n\r\nBased on my experience working on IDEs, it is not easy at all to \"emulate\" in the editor UI a cursor navigation/editing functionality that would look the same as if there was indentation when there isn't one. \r\n\r\nContrast this with the issue of tabs vs spaces: my preference there would be tabs, (because of better cursor navigation/editing behaviour) but I don't mind spaces much either way because it is relatively straightforward to implement in the editor UI functionality that will make editing and navigation in space-indented code behave the same as if it was using tabs, thus making the issue invisible to the user. But the same is not possible with regards to place a cursor where there is no actual text, that would be much more complex. Complex enough to be worthwhile addressing this in the formatting guidelines themselves, especially in the absence of any cons.\r\n\r\nI know this is very, *very* small issue in the grand scheme of things. Even as far as formatting and style goes, it's very minor, but still, it seems to be it would be better this way."},"comment":{"url":"https://api.github.com/repos/rust-lang-nursery/fmt-rfcs/issues/comments/258886915","html_url":"https://github.com/rust-lang-nursery/fmt-rfcs/issues/37#issuecomment-258886915","issue_url":"https://api.github.com/repos/rust-lang-nursery/fmt-rfcs/issues/37","id":258886915,"user":{"login":"bruno-medeiros","id":4324232,"avatar_url":"https://avatars.githubusercontent.com/u/4324232?v=3","gravatar_id":"","url":"https://api.github.com/users/bruno-medeiros","html_url":"https://github.com/bruno-medeiros","followers_url":"https://api.github.com/users/bruno-medeiros/followers","following_url":"https://api.github.com/users/bruno-medeiros/following{/other_user}","gists_url":"https://api.github.com/users/bruno-medeiros/gists{/gist_id}","starred_url":"https://api.github.com/users/bruno-medeiros/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bruno-medeiros/subscriptions","organizations_url":"https://api.github.com/users/bruno-medeiros/orgs","repos_url":"https://api.github.com/users/bruno-medeiros/repos","events_url":"https://api.github.com/users/bruno-medeiros/events{/privacy}","received_events_url":"https://api.github.com/users/bruno-medeiros/received_events","type":"User","site_admin":false},"created_at":"2016-11-07T16:36:32Z","updated_at":"2016-11-07T16:36:32Z","body":"> And git was only presented as one tool; many, many, many tools are this way. We even validate that no file has trailing whitespace and fail the build, ourselves.\r\n\r\n@steveklabnik Well, which tool checks/removes it, doesn't really matter. What matters is if removing trailing whitespace is of actual value, or is it just dogma. As I mentioned above, we can agree that *normalizing* whitespace is of some value. But that doesn't mean it has to be the done in way that removes trailing whitespace."}}
{"actor":{"display_login":"bruno-medeiros"}}