{"action":"created","issue":{"url":"https://api.github.com/repos/jcfaria/Vim-R-plugin/issues/160","labels_url":"https://api.github.com/repos/jcfaria/Vim-R-plugin/issues/160/labels{/name}","comments_url":"https://api.github.com/repos/jcfaria/Vim-R-plugin/issues/160/comments","events_url":"https://api.github.com/repos/jcfaria/Vim-R-plugin/issues/160/events","html_url":"https://github.com/jcfaria/Vim-R-plugin/issues/160","id":58200826,"number":160,"title":"Support for pipe operator (%>%) and dplyr indentation","user":{"login":"enrico16","id":4481814,"avatar_url":"https://avatars.githubusercontent.com/u/4481814?v=3","gravatar_id":"","url":"https://api.github.com/users/enrico16","html_url":"https://github.com/enrico16","followers_url":"https://api.github.com/users/enrico16/followers","following_url":"https://api.github.com/users/enrico16/following{/other_user}","gists_url":"https://api.github.com/users/enrico16/gists{/gist_id}","starred_url":"https://api.github.com/users/enrico16/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/enrico16/subscriptions","organizations_url":"https://api.github.com/users/enrico16/orgs","repos_url":"https://api.github.com/users/enrico16/repos","events_url":"https://api.github.com/users/enrico16/events{/privacy}","received_events_url":"https://api.github.com/users/enrico16/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-02-19T12:15:24Z","updated_at":"2015-02-19T15:29:32Z","closed_at":null,"body":"Would it be possible to make vim indent correctly code written with the pipe (aka chain) operator %>%?\r\nThis is extensively used in dplyr-like workflows, e.g.:\r\n\r\n```r\r\nflights %>%\r\n    group_by(year, month, day) %>%\r\n    select(arr_delay, dep_delay) %>%\r\n    summarise(\r\n        arr = mean(arr_delay, na.rm = TRUE),\r\n        dep = mean(dep_delay, na.rm = TRUE)\r\n    ) %>%\r\n    filter(arr > 30 | dep > 30)\r\n```\r\n\r\nThanks!"},"comment":{"url":"https://api.github.com/repos/jcfaria/Vim-R-plugin/issues/comments/75071261","html_url":"https://github.com/jcfaria/Vim-R-plugin/issues/160#issuecomment-75071261","issue_url":"https://api.github.com/repos/jcfaria/Vim-R-plugin/issues/160","id":75071261,"user":{"login":"jalvesaq","id":891655,"avatar_url":"https://avatars.githubusercontent.com/u/891655?v=3","gravatar_id":"","url":"https://api.github.com/users/jalvesaq","html_url":"https://github.com/jalvesaq","followers_url":"https://api.github.com/users/jalvesaq/followers","following_url":"https://api.github.com/users/jalvesaq/following{/other_user}","gists_url":"https://api.github.com/users/jalvesaq/gists{/gist_id}","starred_url":"https://api.github.com/users/jalvesaq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jalvesaq/subscriptions","organizations_url":"https://api.github.com/users/jalvesaq/orgs","repos_url":"https://api.github.com/users/jalvesaq/repos","events_url":"https://api.github.com/users/jalvesaq/events{/privacy}","received_events_url":"https://api.github.com/users/jalvesaq/received_events","type":"User","site_admin":false},"created_at":"2015-02-19T15:29:32Z","updated_at":"2015-02-19T15:29:32Z","body":"Something must indicate the end of the indentation. Is it an empty line? Is the algorithm below correct?\r\n\r\n   1. If the previous line has the pattern `%.%$` and it is the first line in the paragraph to have this pattern, then increase indentation.\r\n   2. If this is the first line after an empty line and the indentation of the previous line was increased by the occurrence of the pattern `%.%$` one or more lines above, then decrease the indentation."}}