{"action":"created","comment":{"url":"https://api.github.com/repos/atom/wrap-guide/pulls/comments/35483729","id":35483729,"diff_hunk":"@@ -32,3 +44,7 @@ module.exports =\n \n     newColumns = undefined if newColumns.length is 0\n     atom.config.set('wrap-guide.columns', newColumns)\n+\n+  toggle: ->\n+    currentState = atom.config.get('wrap-guide.enabled')","path":"lib/main.coffee","position":34,"original_position":34,"commit_id":"180716283428fde5ed34d084fecf1de7126fd0f8","original_commit_id":"180716283428fde5ed34d084fecf1de7126fd0f8","user":{"login":"thomasjo","id":3622,"avatar_url":"https://avatars.githubusercontent.com/u/3622?v=3","gravatar_id":"","url":"https://api.github.com/users/thomasjo","html_url":"https://github.com/thomasjo","followers_url":"https://api.github.com/users/thomasjo/followers","following_url":"https://api.github.com/users/thomasjo/following{/other_user}","gists_url":"https://api.github.com/users/thomasjo/gists{/gist_id}","starred_url":"https://api.github.com/users/thomasjo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thomasjo/subscriptions","organizations_url":"https://api.github.com/users/thomasjo/orgs","repos_url":"https://api.github.com/users/thomasjo/repos","events_url":"https://api.github.com/users/thomasjo/events{/privacy}","received_events_url":"https://api.github.com/users/thomasjo/received_events","type":"User","site_admin":false},"body":"I initially thought about that too, but that still makes it \"annoying\" to disable permanently for those people who don't want the wrap guide. I'm open to changing the currently implemented behavior if you think that would be better and/or less confusing. It *is* easier to permanently disable now though, since I exposed a config schema for the package.","created_at":"2015-07-25T15:02:55Z","updated_at":"2015-07-25T15:02:55Z","html_url":"https://github.com/atom/wrap-guide/pull/39#discussion_r35483729","pull_request_url":"https://api.github.com/repos/atom/wrap-guide/pulls/39","_links":{"self":{"href":"https://api.github.com/repos/atom/wrap-guide/pulls/comments/35483729"},"html":{"href":"https://github.com/atom/wrap-guide/pull/39#discussion_r35483729"},"pull_request":{"href":"https://api.github.com/repos/atom/wrap-guide/pulls/39"}}},"pull_request":{"url":"https://api.github.com/repos/atom/wrap-guide/pulls/39","id":40716080,"html_url":"https://github.com/atom/wrap-guide/pull/39","diff_url":"https://github.com/atom/wrap-guide/pull/39.diff","patch_url":"https://github.com/atom/wrap-guide/pull/39.patch","issue_url":"https://api.github.com/repos/atom/wrap-guide/issues/39","number":39,"state":"open","locked":false,"title":"Add toggle command","user":{"login":"thomasjo","id":3622,"avatar_url":"https://avatars.githubusercontent.com/u/3622?v=3","gravatar_id":"","url":"https://api.github.com/users/thomasjo","html_url":"https://github.com/thomasjo","followers_url":"https://api.github.com/users/thomasjo/followers","following_url":"https://api.github.com/users/thomasjo/following{/other_user}","gists_url":"https://api.github.com/users/thomasjo/gists{/gist_id}","starred_url":"https://api.github.com/users/thomasjo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thomasjo/subscriptions","organizations_url":"https://api.github.com/users/thomasjo/orgs","repos_url":"https://api.github.com/users/thomasjo/repos","events_url":"https://api.github.com/users/thomasjo/events{/privacy}","received_events_url":"https://api.github.com/users/thomasjo/received_events","type":"User","site_admin":false},"body":":warning: This PR is still work in progress as it contains no specs. And it definitely needs some... :warning:\r\n\r\nWrap guide already had basic support for enabling/disabling, but it was only exposed on a scope level. Hence I first added/exposed package configuration option `wrap-guide.enabled` so that the wrap guide can be disabled globally via config (it could in the past as well, it just wasn't obvious that you could). As the title eludes to, I've also added a `toggle` command for \"flipping\" the state of the `enabled` setting.\r\n\r\nI haven't verified this, but given how the config stuff works with scope cascading, I'm pretty sure it's possible to still disable the wrap guide globally, yet enable it for individual scopes. This is something that should be verified by specs.","created_at":"2015-07-23T20:43:53Z","updated_at":"2015-07-25T15:02:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1f43a1cc225a7ace4d9591b2388054e1d8f80e97","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/atom/wrap-guide/pulls/39/commits","review_comments_url":"https://api.github.com/repos/atom/wrap-guide/pulls/39/comments","review_comment_url":"https://api.github.com/repos/atom/wrap-guide/pulls/comments{/number}","comments_url":"https://api.github.com/repos/atom/wrap-guide/issues/39/comments","statuses_url":"https://api.github.com/repos/atom/wrap-guide/statuses/180716283428fde5ed34d084fecf1de7126fd0f8","head":{"label":"atom:tj-toggle-command","ref":"tj-toggle-command","sha":"180716283428fde5ed34d084fecf1de7126fd0f8","user":{"login":"atom","id":1089146,"avatar_url":"https://avatars.githubusercontent.com/u/1089146?v=3","gravatar_id":"","url":"https://api.github.com/users/atom","html_url":"https://github.com/atom","followers_url":"https://api.github.com/users/atom/followers","following_url":"https://api.github.com/users/atom/following{/other_user}","gists_url":"https://api.github.com/users/atom/gists{/gist_id}","starred_url":"https://api.github.com/users/atom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atom/subscriptions","organizations_url":"https://api.github.com/users/atom/orgs","repos_url":"https://api.github.com/users/atom/repos","events_url":"https://api.github.com/users/atom/events{/privacy}","received_events_url":"https://api.github.com/users/atom/received_events","type":"Organization","site_admin":false},"repo":{"id":12070396,"name":"wrap-guide","full_name":"atom/wrap-guide","owner":{"login":"atom","id":1089146,"avatar_url":"https://avatars.githubusercontent.com/u/1089146?v=3","gravatar_id":"","url":"https://api.github.com/users/atom","html_url":"https://github.com/atom","followers_url":"https://api.github.com/users/atom/followers","following_url":"https://api.github.com/users/atom/following{/other_user}","gists_url":"https://api.github.com/users/atom/gists{/gist_id}","starred_url":"https://api.github.com/users/atom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atom/subscriptions","organizations_url":"https://api.github.com/users/atom/orgs","repos_url":"https://api.github.com/users/atom/repos","events_url":"https://api.github.com/users/atom/events{/privacy}","received_events_url":"https://api.github.com/users/atom/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/atom/wrap-guide","description":"Don't cross the line","fork":false,"url":"https://api.github.com/repos/atom/wrap-guide","forks_url":"https://api.github.com/repos/atom/wrap-guide/forks","keys_url":"https://api.github.com/repos/atom/wrap-guide/keys{/key_id}","collaborators_url":"https://api.github.com/repos/atom/wrap-guide/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/atom/wrap-guide/teams","hooks_url":"https://api.github.com/repos/atom/wrap-guide/hooks","issue_events_url":"https://api.github.com/repos/atom/wrap-guide/issues/events{/number}","events_url":"https://api.github.com/repos/atom/wrap-guide/events","assignees_url":"https://api.github.com/repos/atom/wrap-guide/assignees{/user}","branches_url":"https://api.github.com/repos/atom/wrap-guide/branches{/branch}","tags_url":"https://api.github.com/repos/atom/wrap-guide/tags","blobs_url":"https://api.github.com/repos/atom/wrap-guide/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/atom/wrap-guide/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/atom/wrap-guide/git/refs{/sha}","trees_url":"https://api.github.com/repos/atom/wrap-guide/git/trees{/sha}","statuses_url":"https://api.github.com/repos/atom/wrap-guide/statuses/{sha}","languages_url":"https://api.github.com/repos/atom/wrap-guide/languages","stargazers_url":"https://api.github.com/repos/atom/wrap-guide/stargazers","contributors_url":"https://api.github.com/repos/atom/wrap-guide/contributors","subscribers_url":"https://api.github.com/repos/atom/wrap-guide/subscribers","subscription_url":"https://api.github.com/repos/atom/wrap-guide/subscription","commits_url":"https://api.github.com/repos/atom/wrap-guide/commits{/sha}","git_commits_url":"https://api.github.com/repos/atom/wrap-guide/git/commits{/sha}","comments_url":"https://api.github.com/repos/atom/wrap-guide/comments{/number}","issue_comment_url":"https://api.github.com/repos/atom/wrap-guide/issues/comments{/number}","contents_url":"https://api.github.com/repos/atom/wrap-guide/contents/{+path}","compare_url":"https://api.github.com/repos/atom/wrap-guide/compare/{base}...{head}","merges_url":"https://api.github.com/repos/atom/wrap-guide/merges","archive_url":"https://api.github.com/repos/atom/wrap-guide/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/atom/wrap-guide/downloads","issues_url":"https://api.github.com/repos/atom/wrap-guide/issues{/number}","pulls_url":"https://api.github.com/repos/atom/wrap-guide/pulls{/number}","milestones_url":"https://api.github.com/repos/atom/wrap-guide/milestones{/number}","notifications_url":"https://api.github.com/repos/atom/wrap-guide/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/atom/wrap-guide/labels{/name}","releases_url":"https://api.github.com/repos/atom/wrap-guide/releases{/id}","created_at":"2013-08-13T01:33:50Z","updated_at":"2015-07-19T22:30:21Z","pushed_at":"2015-07-25T13:28:40Z","git_url":"git://github.com/atom/wrap-guide.git","ssh_url":"git@github.com:atom/wrap-guide.git","clone_url":"https://github.com/atom/wrap-guide.git","svn_url":"https://github.com/atom/wrap-guide","homepage":null,"size":730,"stargazers_count":16,"watchers_count":16,"language":"CoffeeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":8,"mirror_url":null,"open_issues_count":7,"forks":8,"open_issues":7,"watchers":16,"default_branch":"master"}},"base":{"label":"atom:master","ref":"master","sha":"7a872a2b910bde81038bb679c6ad36ad6cb32f1e","user":{"login":"atom","id":1089146,"avatar_url":"https://avatars.githubusercontent.com/u/1089146?v=3","gravatar_id":"","url":"https://api.github.com/users/atom","html_url":"https://github.com/atom","followers_url":"https://api.github.com/users/atom/followers","following_url":"https://api.github.com/users/atom/following{/other_user}","gists_url":"https://api.github.com/users/atom/gists{/gist_id}","starred_url":"https://api.github.com/users/atom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atom/subscriptions","organizations_url":"https://api.github.com/users/atom/orgs","repos_url":"https://api.github.com/users/atom/repos","events_url":"https://api.github.com/users/atom/events{/privacy}","received_events_url":"https://api.github.com/users/atom/received_events","type":"Organization","site_admin":false},"repo":{"id":12070396,"name":"wrap-guide","full_name":"atom/wrap-guide","owner":{"login":"atom","id":1089146,"avatar_url":"https://avatars.githubusercontent.com/u/1089146?v=3","gravatar_id":"","url":"https://api.github.com/users/atom","html_url":"https://github.com/atom","followers_url":"https://api.github.com/users/atom/followers","following_url":"https://api.github.com/users/atom/following{/other_user}","gists_url":"https://api.github.com/users/atom/gists{/gist_id}","starred_url":"https://api.github.com/users/atom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atom/subscriptions","organizations_url":"https://api.github.com/users/atom/orgs","repos_url":"https://api.github.com/users/atom/repos","events_url":"https://api.github.com/users/atom/events{/privacy}","received_events_url":"https://api.github.com/users/atom/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/atom/wrap-guide","description":"Don't cross the line","fork":false,"url":"https://api.github.com/repos/atom/wrap-guide","forks_url":"https://api.github.com/repos/atom/wrap-guide/forks","keys_url":"https://api.github.com/repos/atom/wrap-guide/keys{/key_id}","collaborators_url":"https://api.github.com/repos/atom/wrap-guide/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/atom/wrap-guide/teams","hooks_url":"https://api.github.com/repos/atom/wrap-guide/hooks","issue_events_url":"https://api.github.com/repos/atom/wrap-guide/issues/events{/number}","events_url":"https://api.github.com/repos/atom/wrap-guide/events","assignees_url":"https://api.github.com/repos/atom/wrap-guide/assignees{/user}","branches_url":"https://api.github.com/repos/atom/wrap-guide/branches{/branch}","tags_url":"https://api.github.com/repos/atom/wrap-guide/tags","blobs_url":"https://api.github.com/repos/atom/wrap-guide/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/atom/wrap-guide/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/atom/wrap-guide/git/refs{/sha}","trees_url":"https://api.github.com/repos/atom/wrap-guide/git/trees{/sha}","statuses_url":"https://api.github.com/repos/atom/wrap-guide/statuses/{sha}","languages_url":"https://api.github.com/repos/atom/wrap-guide/languages","stargazers_url":"https://api.github.com/repos/atom/wrap-guide/stargazers","contributors_url":"https://api.github.com/repos/atom/wrap-guide/contributors","subscribers_url":"https://api.github.com/repos/atom/wrap-guide/subscribers","subscription_url":"https://api.github.com/repos/atom/wrap-guide/subscription","commits_url":"https://api.github.com/repos/atom/wrap-guide/commits{/sha}","git_commits_url":"https://api.github.com/repos/atom/wrap-guide/git/commits{/sha}","comments_url":"https://api.github.com/repos/atom/wrap-guide/comments{/number}","issue_comment_url":"https://api.github.com/repos/atom/wrap-guide/issues/comments{/number}","contents_url":"https://api.github.com/repos/atom/wrap-guide/contents/{+path}","compare_url":"https://api.github.com/repos/atom/wrap-guide/compare/{base}...{head}","merges_url":"https://api.github.com/repos/atom/wrap-guide/merges","archive_url":"https://api.github.com/repos/atom/wrap-guide/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/atom/wrap-guide/downloads","issues_url":"https://api.github.com/repos/atom/wrap-guide/issues{/number}","pulls_url":"https://api.github.com/repos/atom/wrap-guide/pulls{/number}","milestones_url":"https://api.github.com/repos/atom/wrap-guide/milestones{/number}","notifications_url":"https://api.github.com/repos/atom/wrap-guide/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/atom/wrap-guide/labels{/name}","releases_url":"https://api.github.com/repos/atom/wrap-guide/releases{/id}","created_at":"2013-08-13T01:33:50Z","updated_at":"2015-07-19T22:30:21Z","pushed_at":"2015-07-25T13:28:40Z","git_url":"git://github.com/atom/wrap-guide.git","ssh_url":"git@github.com:atom/wrap-guide.git","clone_url":"https://github.com/atom/wrap-guide.git","svn_url":"https://github.com/atom/wrap-guide","homepage":null,"size":730,"stargazers_count":16,"watchers_count":16,"language":"CoffeeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":8,"mirror_url":null,"open_issues_count":7,"forks":8,"open_issues":7,"watchers":16,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/atom/wrap-guide/pulls/39"},"html":{"href":"https://github.com/atom/wrap-guide/pull/39"},"issue":{"href":"https://api.github.com/repos/atom/wrap-guide/issues/39"},"comments":{"href":"https://api.github.com/repos/atom/wrap-guide/issues/39/comments"},"review_comments":{"href":"https://api.github.com/repos/atom/wrap-guide/pulls/39/comments"},"review_comment":{"href":"https://api.github.com/repos/atom/wrap-guide/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/atom/wrap-guide/pulls/39/commits"},"statuses":{"href":"https://api.github.com/repos/atom/wrap-guide/statuses/180716283428fde5ed34d084fecf1de7126fd0f8"}}}}