{"action":"created","issue":{"url":"https://api.github.com/repos/spyder-ide/spyder/issues/4289","repository_url":"https://api.github.com/repos/spyder-ide/spyder","labels_url":"https://api.github.com/repos/spyder-ide/spyder/issues/4289/labels{/name}","comments_url":"https://api.github.com/repos/spyder-ide/spyder/issues/4289/comments","events_url":"https://api.github.com/repos/spyder-ide/spyder/issues/4289/events","html_url":"https://github.com/spyder-ide/spyder/pull/4289","id":216145784,"number":4289,"title":"[WIP] PR: Add snippets support to the Editor","user":{"login":"rlaverde","id":2024217,"avatar_url":"https://avatars1.githubusercontent.com/u/2024217?v=3","gravatar_id":"","url":"https://api.github.com/users/rlaverde","html_url":"https://github.com/rlaverde","followers_url":"https://api.github.com/users/rlaverde/followers","following_url":"https://api.github.com/users/rlaverde/following{/other_user}","gists_url":"https://api.github.com/users/rlaverde/gists{/gist_id}","starred_url":"https://api.github.com/users/rlaverde/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rlaverde/subscriptions","organizations_url":"https://api.github.com/users/rlaverde/orgs","repos_url":"https://api.github.com/users/rlaverde/repos","events_url":"https://api.github.com/users/rlaverde/events{/privacy}","received_events_url":"https://api.github.com/users/rlaverde/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"rlaverde","id":2024217,"avatar_url":"https://avatars1.githubusercontent.com/u/2024217?v=3","gravatar_id":"","url":"https://api.github.com/users/rlaverde","html_url":"https://github.com/rlaverde","followers_url":"https://api.github.com/users/rlaverde/followers","following_url":"https://api.github.com/users/rlaverde/following{/other_user}","gists_url":"https://api.github.com/users/rlaverde/gists{/gist_id}","starred_url":"https://api.github.com/users/rlaverde/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rlaverde/subscriptions","organizations_url":"https://api.github.com/users/rlaverde/orgs","repos_url":"https://api.github.com/users/rlaverde/repos","events_url":"https://api.github.com/users/rlaverde/events{/privacy}","received_events_url":"https://api.github.com/users/rlaverde/received_events","type":"User","site_admin":false},"assignees":[{"login":"rlaverde","id":2024217,"avatar_url":"https://avatars1.githubusercontent.com/u/2024217?v=3","gravatar_id":"","url":"https://api.github.com/users/rlaverde","html_url":"https://github.com/rlaverde","followers_url":"https://api.github.com/users/rlaverde/followers","following_url":"https://api.github.com/users/rlaverde/following{/other_user}","gists_url":"https://api.github.com/users/rlaverde/gists{/gist_id}","starred_url":"https://api.github.com/users/rlaverde/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rlaverde/subscriptions","organizations_url":"https://api.github.com/users/rlaverde/orgs","repos_url":"https://api.github.com/users/rlaverde/repos","events_url":"https://api.github.com/users/rlaverde/events{/privacy}","received_events_url":"https://api.github.com/users/rlaverde/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/spyder-ide/spyder/milestones/23","html_url":"https://github.com/spyder-ide/spyder/milestone/23","labels_url":"https://api.github.com/repos/spyder-ide/spyder/milestones/23/labels","id":1159297,"number":23,"title":"v4.0beta1","description":"","creator":{"login":"goanpeca","id":3627835,"avatar_url":"https://avatars0.githubusercontent.com/u/3627835?v=3","gravatar_id":"","url":"https://api.github.com/users/goanpeca","html_url":"https://github.com/goanpeca","followers_url":"https://api.github.com/users/goanpeca/followers","following_url":"https://api.github.com/users/goanpeca/following{/other_user}","gists_url":"https://api.github.com/users/goanpeca/gists{/gist_id}","starred_url":"https://api.github.com/users/goanpeca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/goanpeca/subscriptions","organizations_url":"https://api.github.com/users/goanpeca/orgs","repos_url":"https://api.github.com/users/goanpeca/repos","events_url":"https://api.github.com/users/goanpeca/events{/privacy}","received_events_url":"https://api.github.com/users/goanpeca/received_events","type":"User","site_admin":false},"open_issues":64,"closed_issues":40,"state":"open","created_at":"2015-06-10T21:26:57Z","updated_at":"2017-03-22T21:36:19Z","due_on":null,"closed_at":null},"comments":10,"created_at":"2017-03-22T17:20:53Z","updated_at":"2017-03-23T14:19:24Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/spyder-ide/spyder/pulls/4289","html_url":"https://github.com/spyder-ide/spyder/pull/4289","diff_url":"https://github.com/spyder-ide/spyder/pull/4289.diff","patch_url":"https://github.com/spyder-ide/spyder/pull/4289.patch"},"body":"Fixes #588\r\n\r\n-----------------------------\r\nI added just a basic support, at the moment:\r\n- load and save snippets to `snippets` directory in the config folder\r\n- insert snippets in the text editor\r\n\r\nTODO:\r\n- [ ] Add variables to snippets `${1:'default_value'}`\r\n- [ ] Implement auto selection and throught variables using tab\r\n- [ ] Expose saving functionality in editor config preferences\r\n- [ ] Decouple some functionality in another class `Snippet` that will be make it more maintainable and extensible (It will be useful to add things like scope or language in a future)\r\n- [ ] Add some basics snippets that will be distributed with spyder ?\r\n- [ ] Add some tests and docstrings\r\n\r\nI'm not sure what language should be use it, at the moment is using `json`, but I'm planning to use `yaml`, because It is easy to read and write (for humans), and allows comments."},"comment":{"url":"https://api.github.com/repos/spyder-ide/spyder/issues/comments/288733494","html_url":"https://github.com/spyder-ide/spyder/pull/4289#issuecomment-288733494","issue_url":"https://api.github.com/repos/spyder-ide/spyder/issues/4289","id":288733494,"user":{"login":"rlaverde","id":2024217,"avatar_url":"https://avatars1.githubusercontent.com/u/2024217?v=3","gravatar_id":"","url":"https://api.github.com/users/rlaverde","html_url":"https://github.com/rlaverde","followers_url":"https://api.github.com/users/rlaverde/followers","following_url":"https://api.github.com/users/rlaverde/following{/other_user}","gists_url":"https://api.github.com/users/rlaverde/gists{/gist_id}","starred_url":"https://api.github.com/users/rlaverde/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rlaverde/subscriptions","organizations_url":"https://api.github.com/users/rlaverde/orgs","repos_url":"https://api.github.com/users/rlaverde/repos","events_url":"https://api.github.com/users/rlaverde/events{/privacy}","received_events_url":"https://api.github.com/users/rlaverde/received_events","type":"User","site_admin":false},"created_at":"2017-03-23T14:19:24Z","updated_at":"2017-03-23T14:19:24Z","body":"> don't know if we already depend on pyyaml?\r\n\r\nno, we will need to add it"}}
{"actor":{"display_login":"rlaverde"}}