{"action":"created","issue":{"url":"https://api.github.com/repos/tweekmonster/braceless.vim/issues/6","repository_url":"https://api.github.com/repos/tweekmonster/braceless.vim","labels_url":"https://api.github.com/repos/tweekmonster/braceless.vim/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/tweekmonster/braceless.vim/issues/6/comments","events_url":"https://api.github.com/repos/tweekmonster/braceless.vim/issues/6/events","html_url":"https://github.com/tweekmonster/braceless.vim/issues/6","id":133969675,"number":6,"title":"Folding functions inconsistent depending on indent","user":{"login":"AlbericC","id":7861071,"avatar_url":"https://avatars.githubusercontent.com/u/7861071?v=3","gravatar_id":"","url":"https://api.github.com/users/AlbericC","html_url":"https://github.com/AlbericC","followers_url":"https://api.github.com/users/AlbericC/followers","following_url":"https://api.github.com/users/AlbericC/following{/other_user}","gists_url":"https://api.github.com/users/AlbericC/gists{/gist_id}","starred_url":"https://api.github.com/users/AlbericC/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlbericC/subscriptions","organizations_url":"https://api.github.com/users/AlbericC/orgs","repos_url":"https://api.github.com/users/AlbericC/repos","events_url":"https://api.github.com/users/AlbericC/events{/privacy}","received_events_url":"https://api.github.com/users/AlbericC/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-02-16T12:32:17Z","updated_at":"2016-02-16T15:25:17Z","closed_at":null,"body":"with this sample code, folding `myfunction` leaves the two blank lines above the def in line 7, while folding `myotherfunction` also folds the blank lines above the `if` statement. \r\n\r\nIs there any way to always leave the blanks or always fold blank lines ?\r\n\r\n~~~ python \r\ndef myfunction():\r\n    print(\"going\")\r\n    for i in range(10):\r\n        print(\"loop {}\".format(i))\r\n\r\n\r\ndef myotherfunction():\r\n    print(\"going\")\r\n    for i in range(10):\r\n        print(\"loop {}\".format(i))\r\n    return \r\n\r\n\r\nif __name__ == '__main__':\r\n    myfunction()\r\n    myotherfunction()\r\n~~~"},"comment":{"url":"https://api.github.com/repos/tweekmonster/braceless.vim/issues/comments/184727825","html_url":"https://github.com/tweekmonster/braceless.vim/issues/6#issuecomment-184727825","issue_url":"https://api.github.com/repos/tweekmonster/braceless.vim/issues/6","id":184727825,"user":{"login":"tweekmonster","id":111942,"avatar_url":"https://avatars.githubusercontent.com/u/111942?v=3","gravatar_id":"","url":"https://api.github.com/users/tweekmonster","html_url":"https://github.com/tweekmonster","followers_url":"https://api.github.com/users/tweekmonster/followers","following_url":"https://api.github.com/users/tweekmonster/following{/other_user}","gists_url":"https://api.github.com/users/tweekmonster/gists{/gist_id}","starred_url":"https://api.github.com/users/tweekmonster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tweekmonster/subscriptions","organizations_url":"https://api.github.com/users/tweekmonster/orgs","repos_url":"https://api.github.com/users/tweekmonster/repos","events_url":"https://api.github.com/users/tweekmonster/events{/privacy}","received_events_url":"https://api.github.com/users/tweekmonster/received_events","type":"User","site_admin":false},"created_at":"2016-02-16T15:25:17Z","updated_at":"2016-02-16T15:25:17Z","body":"Just tried some things and it looks like I can do either.\r\n\r\n1. If I exclude blank lines from folding, attempting to fold between your example functions will result in \"no fold found\".  If you wrapped the whole thing in a class, the blank lines between the functions would fold the class.\r\n\r\n2. If the blank lines are included in the block above it, (blank lines will match the def's since they're the closest matching indent), folding while on the blank lines will fold up to the functions.  If they were wrapped in a class, it would still fold up to the functions.\r\n\r\nI'm inclined to say 2 is the best way and is most likely to be the expected behavior.  What do you think?"}}