{"action":"created","issue":{"url":"https://api.github.com/repos/oleg-shilo/sublime-codemap/issues/14","repository_url":"https://api.github.com/repos/oleg-shilo/sublime-codemap","labels_url":"https://api.github.com/repos/oleg-shilo/sublime-codemap/issues/14/labels{/name}","comments_url":"https://api.github.com/repos/oleg-shilo/sublime-codemap/issues/14/comments","events_url":"https://api.github.com/repos/oleg-shilo/sublime-codemap/issues/14/events","html_url":"https://github.com/oleg-shilo/sublime-codemap/pull/14","id":262722438,"number":14,"title":"showing changes","user":{"login":"mg979","id":26169924,"avatar_url":"https://avatars3.githubusercontent.com/u/26169924?v=4","gravatar_id":"","url":"https://api.github.com/users/mg979","html_url":"https://github.com/mg979","followers_url":"https://api.github.com/users/mg979/followers","following_url":"https://api.github.com/users/mg979/following{/other_user}","gists_url":"https://api.github.com/users/mg979/gists{/gist_id}","starred_url":"https://api.github.com/users/mg979/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mg979/subscriptions","organizations_url":"https://api.github.com/users/mg979/orgs","repos_url":"https://api.github.com/users/mg979/repos","events_url":"https://api.github.com/users/mg979/events{/privacy}","received_events_url":"https://api.github.com/users/mg979/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":34,"created_at":"2017-10-04T09:31:46Z","updated_at":"2017-10-05T13:02:37Z","closed_at":"2017-10-05T12:02:41Z","author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/oleg-shilo/sublime-codemap/pulls/14","html_url":"https://github.com/oleg-shilo/sublime-codemap/pull/14","diff_url":"https://github.com/oleg-shilo/sublime-codemap/pull/14.diff","patch_url":"https://github.com/oleg-shilo/sublime-codemap/pull/14.patch"},"body":"Don't accept this PR. It's here to make a diff so I can show the the changes"},"comment":{"url":"https://api.github.com/repos/oleg-shilo/sublime-codemap/issues/comments/334457934","html_url":"https://github.com/oleg-shilo/sublime-codemap/pull/14#issuecomment-334457934","issue_url":"https://api.github.com/repos/oleg-shilo/sublime-codemap/issues/14","id":334457934,"user":{"login":"mg979","id":26169924,"avatar_url":"https://avatars3.githubusercontent.com/u/26169924?v=4","gravatar_id":"","url":"https://api.github.com/users/mg979","html_url":"https://github.com/mg979","followers_url":"https://api.github.com/users/mg979/followers","following_url":"https://api.github.com/users/mg979/following{/other_user}","gists_url":"https://api.github.com/users/mg979/gists{/gist_id}","starred_url":"https://api.github.com/users/mg979/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mg979/subscriptions","organizations_url":"https://api.github.com/users/mg979/orgs","repos_url":"https://api.github.com/users/mg979/repos","events_url":"https://api.github.com/users/mg979/events{/privacy}","received_events_url":"https://api.github.com/users/mg979/received_events","type":"User","site_admin":false},"created_at":"2017-10-05T13:02:37Z","updated_at":"2017-10-05T13:02:37Z","author_association":"CONTRIBUTOR","body":"By the way I'm liking your Favorites plugin, I thought you could make this:\r\n\r\n```\r\nclass show_favorites(sublime_plugin.TextCommand):\r\n    def run(self, edit, focus=False):\r\n\r\n        w = sublime.active_window()\r\n        fav_view = get_panel_view()\r\n        if focus and fav_view:\r\n            w.focus_view(fav_view)\r\n            w.focus_view(self.view)\r\n        else:\r\n            show_panel.run(self, edit)\r\n```\r\n\r\nThen a keybinding:\r\n\r\n`    { \"keys\": [...], \"command\": \"show_favorites\", \"args\": {\"focus\": true} },`\r\n\r\nSo that you can put map and favorites in the same group, then synch map to focus on it, and  this command to focus on favorites.\r\n\r\nAlso this in class show_panel:\r\n\r\n```\r\n        if not panel_view:\r\n\r\n            panel_group = -1\r\n            last_group = window.num_groups()-1\r\n            # look for CodeMap in last group\r\n            for view in window.views_in_group(last_group):\r\n                if os.path.basename(view.file_name()) == 'Code - Map':\r\n                    panel_group = last_group\r\n\r\n            # CodeMap not found\r\n            if panel_group == -1:\r\n                show_in_new_group = settings().get(\"show_in_new_group\", True)\r\n\r\n                if not show_in_new_group:\r\n                    if groups == 1:\r\n                        set_layout_columns(2)\r\n                        groups = window.num_groups()\r\n\r\n                else:\r\n                    panel_group = create_panel_group()\r\n```\r\n\r\nIf then you have keybindings like:\r\n\r\n`    { \"keys\": [\"alt+f\", \"alt+f\"], \"command\": \"show_favorites\", \"args\": {\"focus\": true} },`\r\n\r\nThis opens Favorites in the same CodeMap group, but if you press it again it just focuses on it. Old command to close if you need (or use command palette):\r\n\r\n`    { \"keys\": [\"alt+f\", \"alt+x\"], \"command\": \"show_favorites\"`\r\n"}}
{"actor":{"display_login":"mg979"}}