{"action":"created","issue":{"url":"https://api.github.com/repos/rhysd/vim-crystal/issues/23","labels_url":"https://api.github.com/repos/rhysd/vim-crystal/issues/23/labels{/name}","comments_url":"https://api.github.com/repos/rhysd/vim-crystal/issues/23/comments","events_url":"https://api.github.com/repos/rhysd/vim-crystal/issues/23/events","html_url":"https://github.com/rhysd/vim-crystal/issues/23","id":112001420,"number":23,"title":"CrystalFormat appends extra space to the head of buffer","user":{"login":"rhysd","id":823277,"avatar_url":"https://avatars.githubusercontent.com/u/823277?v=3","gravatar_id":"","url":"https://api.github.com/users/rhysd","html_url":"https://github.com/rhysd","followers_url":"https://api.github.com/users/rhysd/followers","following_url":"https://api.github.com/users/rhysd/following{/other_user}","gists_url":"https://api.github.com/users/rhysd/gists{/gist_id}","starred_url":"https://api.github.com/users/rhysd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rhysd/subscriptions","organizations_url":"https://api.github.com/users/rhysd/orgs","repos_url":"https://api.github.com/users/rhysd/repos","events_url":"https://api.github.com/users/rhysd/events{/privacy}","received_events_url":"https://api.github.com/users/rhysd/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/rhysd/vim-crystal/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":{"login":"rhysd","id":823277,"avatar_url":"https://avatars.githubusercontent.com/u/823277?v=3","gravatar_id":"","url":"https://api.github.com/users/rhysd","html_url":"https://github.com/rhysd","followers_url":"https://api.github.com/users/rhysd/followers","following_url":"https://api.github.com/users/rhysd/following{/other_user}","gists_url":"https://api.github.com/users/rhysd/gists{/gist_id}","starred_url":"https://api.github.com/users/rhysd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rhysd/subscriptions","organizations_url":"https://api.github.com/users/rhysd/orgs","repos_url":"https://api.github.com/users/rhysd/repos","events_url":"https://api.github.com/users/rhysd/events{/privacy}","received_events_url":"https://api.github.com/users/rhysd/received_events","type":"User","site_admin":false},"milestone":null,"comments":3,"created_at":"2015-10-18T05:08:34Z","updated_at":"2015-10-18T05:26:00Z","closed_at":null,"body":"Reported by @will in #21.\r\nIt caused on auto saving.\r\n\r\n```diff\r\ndiff --git i/src/pg.cr w/src/pg.cr\r\nindex b4a8352..6229194 100644\r\n--- i/src/pg.cr\r\n+++ w/src/pg.cr\r\n@@ -1,4 +1,4 @@\r\n-require \"./core_ext/*\"\r\n+ require \"./core_ext/*\"\r\n require \"./pg/*\"\r\n\r\n module PG\r\n@@ -8,3 +8,4 @@ module PG\r\n     conn\r\n   end\r\n end\r\n+\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/rhysd/vim-crystal/issues/comments/148980021","html_url":"https://github.com/rhysd/vim-crystal/issues/23#issuecomment-148980021","issue_url":"https://api.github.com/repos/rhysd/vim-crystal/issues/23","id":148980021,"user":{"login":"rhysd","id":823277,"avatar_url":"https://avatars.githubusercontent.com/u/823277?v=3","gravatar_id":"","url":"https://api.github.com/users/rhysd","html_url":"https://github.com/rhysd","followers_url":"https://api.github.com/users/rhysd/followers","following_url":"https://api.github.com/users/rhysd/following{/other_user}","gists_url":"https://api.github.com/users/rhysd/gists{/gist_id}","starred_url":"https://api.github.com/users/rhysd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rhysd/subscriptions","organizations_url":"https://api.github.com/users/rhysd/orgs","repos_url":"https://api.github.com/users/rhysd/repos","events_url":"https://api.github.com/users/rhysd/events{/privacy}","received_events_url":"https://api.github.com/users/rhysd/received_events","type":"User","site_admin":false},"created_at":"2015-10-18T05:26:00Z","updated_at":"2015-10-18T05:26:00Z","body":"vim-crystal formatting process is\r\n\r\n1. Get whole buffer and format it with `crystal tool format`.  The result is preserved to `g` register.\r\n2. Delete current buffer with `gg\"_G`\r\n3. Put the `g` register content by `\"gp`.\r\n\r\nI think 3. behavior may depend on some options and I've not noticed that yet."}}