{"action":"created","comment":{"url":"https://api.github.com/repos/VSCodeVim/Vim/pulls/comments/70494398","id":70494398,"diff_hunk":"@@ -779,14 +779,27 @@ export class PutCommand extends BaseCommand {\n     canBePrefixedWithCount = true;\n     canBeRepeatedWithDot = true;\n \n-    public async exec(position: Position, vimState: VimState, before: boolean = false): Promise<VimState> {\n+    public async exec(position: Position, vimState: VimState, before: boolean = false, adjustIndent: boolean = false): Promise<VimState> {\n         const register = Register.get(vimState);\n-        const text = register.text;\n         const dest = before ? position : position.getRight();\n+        let text = register.text;\n \n         if (register.registerMode === RegisterMode.CharacterWise) {\n           await TextEditor.insertAt(text, dest);\n         } else {\n+          if (adjustIndent) {\n+            // Adjust indent to current line\n+            let indentationWidth = TextEditor.getLeftIndentation(TextEditor.getLineAt(position).text);\n+            let firstLineIdentationWidth = TextEditor.getLeftIndentation(text.split('\\n')[0]);","path":"src/actions/actions.ts","position":17,"original_position":17,"commit_id":"6a9f912291b21fd0d0afe5e85748887dbdf07b75","original_commit_id":"6a9f912291b21fd0d0afe5e85748887dbdf07b75","user":{"login":"johnfn","id":167745,"avatar_url":"https://avatars.githubusercontent.com/u/167745?v=3","gravatar_id":"","url":"https://api.github.com/users/johnfn","html_url":"https://github.com/johnfn","followers_url":"https://api.github.com/users/johnfn/followers","following_url":"https://api.github.com/users/johnfn/following{/other_user}","gists_url":"https://api.github.com/users/johnfn/gists{/gist_id}","starred_url":"https://api.github.com/users/johnfn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnfn/subscriptions","organizations_url":"https://api.github.com/users/johnfn/orgs","repos_url":"https://api.github.com/users/johnfn/repos","events_url":"https://api.github.com/users/johnfn/events{/privacy}","received_events_url":"https://api.github.com/users/johnfn/received_events","type":"User","site_admin":false},"body":"Why do you have to split on \\n if you already got a single line?","created_at":"2016-07-12T18:28:19Z","updated_at":"2016-07-12T18:28:19Z","html_url":"https://github.com/VSCodeVim/Vim/pull/412#discussion_r70494398","pull_request_url":"https://api.github.com/repos/VSCodeVim/Vim/pulls/412","_links":{"self":{"href":"https://api.github.com/repos/VSCodeVim/Vim/pulls/comments/70494398"},"html":{"href":"https://github.com/VSCodeVim/Vim/pull/412#discussion_r70494398"},"pull_request":{"href":"https://api.github.com/repos/VSCodeVim/Vim/pulls/412"}}},"pull_request":{"url":"https://api.github.com/repos/VSCodeVim/Vim/pulls/412","id":76738496,"html_url":"https://github.com/VSCodeVim/Vim/pull/412","diff_url":"https://github.com/VSCodeVim/Vim/pull/412.diff","patch_url":"https://github.com/VSCodeVim/Vim/pull/412.patch","issue_url":"https://api.github.com/repos/VSCodeVim/Vim/issues/412","number":412,"state":"open","locked":false,"title":"[p, [p, gp and gP","user":{"login":"rebornix","id":876920,"avatar_url":"https://avatars.githubusercontent.com/u/876920?v=3","gravatar_id":"","url":"https://api.github.com/users/rebornix","html_url":"https://github.com/rebornix","followers_url":"https://api.github.com/users/rebornix/followers","following_url":"https://api.github.com/users/rebornix/following{/other_user}","gists_url":"https://api.github.com/users/rebornix/gists{/gist_id}","starred_url":"https://api.github.com/users/rebornix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rebornix/subscriptions","organizations_url":"https://api.github.com/users/rebornix/orgs","repos_url":"https://api.github.com/users/rebornix/repos","events_url":"https://api.github.com/users/rebornix/events{/privacy}","received_events_url":"https://api.github.com/users/rebornix/received_events","type":"User","site_admin":false},"body":"Yay! We love PRs! 🎊\r\n\r\nPlease include a description of your change & check your PR against this list, thanks:\r\n\r\n- [x] Commit message has a short title & issue references\r\n- [x] Commits are squashed \r\n- [x] It builds and tests pass (e.g `gulp tslint`)\r\n\r\n1. Fix #407.\r\n2. Support [p, [p, gp and gP and have all features covered with test cases.","created_at":"2016-07-08T11:25:40Z","updated_at":"2016-07-12T18:28:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"92f166404ce4156768d488522c70a3d5826856a9","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/VSCodeVim/Vim/pulls/412/commits","review_comments_url":"https://api.github.com/repos/VSCodeVim/Vim/pulls/412/comments","review_comment_url":"https://api.github.com/repos/VSCodeVim/Vim/pulls/comments{/number}","comments_url":"https://api.github.com/repos/VSCodeVim/Vim/issues/412/comments","statuses_url":"https://api.github.com/repos/VSCodeVim/Vim/statuses/6a9f912291b21fd0d0afe5e85748887dbdf07b75","head":{"label":"rebornix:PWithIndent","ref":"PWithIndent","sha":"6a9f912291b21fd0d0afe5e85748887dbdf07b75","user":{"login":"rebornix","id":876920,"avatar_url":"https://avatars.githubusercontent.com/u/876920?v=3","gravatar_id":"","url":"https://api.github.com/users/rebornix","html_url":"https://github.com/rebornix","followers_url":"https://api.github.com/users/rebornix/followers","following_url":"https://api.github.com/users/rebornix/following{/other_user}","gists_url":"https://api.github.com/users/rebornix/gists{/gist_id}","starred_url":"https://api.github.com/users/rebornix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rebornix/subscriptions","organizations_url":"https://api.github.com/users/rebornix/orgs","repos_url":"https://api.github.com/users/rebornix/repos","events_url":"https://api.github.com/users/rebornix/events{/privacy}","received_events_url":"https://api.github.com/users/rebornix/received_events","type":"User","site_admin":false},"repo":{"id":61377983,"name":"Vim","full_name":"rebornix/Vim","owner":{"login":"rebornix","id":876920,"avatar_url":"https://avatars.githubusercontent.com/u/876920?v=3","gravatar_id":"","url":"https://api.github.com/users/rebornix","html_url":"https://github.com/rebornix","followers_url":"https://api.github.com/users/rebornix/followers","following_url":"https://api.github.com/users/rebornix/following{/other_user}","gists_url":"https://api.github.com/users/rebornix/gists{/gist_id}","starred_url":"https://api.github.com/users/rebornix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rebornix/subscriptions","organizations_url":"https://api.github.com/users/rebornix/orgs","repos_url":"https://api.github.com/users/rebornix/repos","events_url":"https://api.github.com/users/rebornix/events{/privacy}","received_events_url":"https://api.github.com/users/rebornix/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rebornix/Vim","description":"Vim for Visual Studio Code","fork":true,"url":"https://api.github.com/repos/rebornix/Vim","forks_url":"https://api.github.com/repos/rebornix/Vim/forks","keys_url":"https://api.github.com/repos/rebornix/Vim/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rebornix/Vim/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rebornix/Vim/teams","hooks_url":"https://api.github.com/repos/rebornix/Vim/hooks","issue_events_url":"https://api.github.com/repos/rebornix/Vim/issues/events{/number}","events_url":"https://api.github.com/repos/rebornix/Vim/events","assignees_url":"https://api.github.com/repos/rebornix/Vim/assignees{/user}","branches_url":"https://api.github.com/repos/rebornix/Vim/branches{/branch}","tags_url":"https://api.github.com/repos/rebornix/Vim/tags","blobs_url":"https://api.github.com/repos/rebornix/Vim/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rebornix/Vim/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rebornix/Vim/git/refs{/sha}","trees_url":"https://api.github.com/repos/rebornix/Vim/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rebornix/Vim/statuses/{sha}","languages_url":"https://api.github.com/repos/rebornix/Vim/languages","stargazers_url":"https://api.github.com/repos/rebornix/Vim/stargazers","contributors_url":"https://api.github.com/repos/rebornix/Vim/contributors","subscribers_url":"https://api.github.com/repos/rebornix/Vim/subscribers","subscription_url":"https://api.github.com/repos/rebornix/Vim/subscription","commits_url":"https://api.github.com/repos/rebornix/Vim/commits{/sha}","git_commits_url":"https://api.github.com/repos/rebornix/Vim/git/commits{/sha}","comments_url":"https://api.github.com/repos/rebornix/Vim/comments{/number}","issue_comment_url":"https://api.github.com/repos/rebornix/Vim/issues/comments{/number}","contents_url":"https://api.github.com/repos/rebornix/Vim/contents/{+path}","compare_url":"https://api.github.com/repos/rebornix/Vim/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rebornix/Vim/merges","archive_url":"https://api.github.com/repos/rebornix/Vim/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rebornix/Vim/downloads","issues_url":"https://api.github.com/repos/rebornix/Vim/issues{/number}","pulls_url":"https://api.github.com/repos/rebornix/Vim/pulls{/number}","milestones_url":"https://api.github.com/repos/rebornix/Vim/milestones{/number}","notifications_url":"https://api.github.com/repos/rebornix/Vim/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rebornix/Vim/labels{/name}","releases_url":"https://api.github.com/repos/rebornix/Vim/releases{/id}","deployments_url":"https://api.github.com/repos/rebornix/Vim/deployments","created_at":"2016-06-17T14:04:24Z","updated_at":"2016-06-17T14:04:25Z","pushed_at":"2016-07-12T14:14:52Z","git_url":"git://github.com/rebornix/Vim.git","ssh_url":"git@github.com:rebornix/Vim.git","clone_url":"https://github.com/rebornix/Vim.git","svn_url":"https://github.com/rebornix/Vim","homepage":"http://aka.ms/vscodevim","size":975,"stargazers_count":0,"watchers_count":0,"language":"TypeScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"VSCodeVim:master","ref":"master","sha":"fd33d3bf40196215e17c09f3b6d52dc93ea7fb18","user":{"login":"VSCodeVim","id":15813386,"avatar_url":"https://avatars.githubusercontent.com/u/15813386?v=3","gravatar_id":"","url":"https://api.github.com/users/VSCodeVim","html_url":"https://github.com/VSCodeVim","followers_url":"https://api.github.com/users/VSCodeVim/followers","following_url":"https://api.github.com/users/VSCodeVim/following{/other_user}","gists_url":"https://api.github.com/users/VSCodeVim/gists{/gist_id}","starred_url":"https://api.github.com/users/VSCodeVim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VSCodeVim/subscriptions","organizations_url":"https://api.github.com/users/VSCodeVim/orgs","repos_url":"https://api.github.com/users/VSCodeVim/repos","events_url":"https://api.github.com/users/VSCodeVim/events{/privacy}","received_events_url":"https://api.github.com/users/VSCodeVim/received_events","type":"Organization","site_admin":false},"repo":{"id":46041284,"name":"Vim","full_name":"VSCodeVim/Vim","owner":{"login":"VSCodeVim","id":15813386,"avatar_url":"https://avatars.githubusercontent.com/u/15813386?v=3","gravatar_id":"","url":"https://api.github.com/users/VSCodeVim","html_url":"https://github.com/VSCodeVim","followers_url":"https://api.github.com/users/VSCodeVim/followers","following_url":"https://api.github.com/users/VSCodeVim/following{/other_user}","gists_url":"https://api.github.com/users/VSCodeVim/gists{/gist_id}","starred_url":"https://api.github.com/users/VSCodeVim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VSCodeVim/subscriptions","organizations_url":"https://api.github.com/users/VSCodeVim/orgs","repos_url":"https://api.github.com/users/VSCodeVim/repos","events_url":"https://api.github.com/users/VSCodeVim/events{/privacy}","received_events_url":"https://api.github.com/users/VSCodeVim/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/VSCodeVim/Vim","description":"Vim for Visual Studio Code","fork":false,"url":"https://api.github.com/repos/VSCodeVim/Vim","forks_url":"https://api.github.com/repos/VSCodeVim/Vim/forks","keys_url":"https://api.github.com/repos/VSCodeVim/Vim/keys{/key_id}","collaborators_url":"https://api.github.com/repos/VSCodeVim/Vim/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/VSCodeVim/Vim/teams","hooks_url":"https://api.github.com/repos/VSCodeVim/Vim/hooks","issue_events_url":"https://api.github.com/repos/VSCodeVim/Vim/issues/events{/number}","events_url":"https://api.github.com/repos/VSCodeVim/Vim/events","assignees_url":"https://api.github.com/repos/VSCodeVim/Vim/assignees{/user}","branches_url":"https://api.github.com/repos/VSCodeVim/Vim/branches{/branch}","tags_url":"https://api.github.com/repos/VSCodeVim/Vim/tags","blobs_url":"https://api.github.com/repos/VSCodeVim/Vim/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/VSCodeVim/Vim/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/VSCodeVim/Vim/git/refs{/sha}","trees_url":"https://api.github.com/repos/VSCodeVim/Vim/git/trees{/sha}","statuses_url":"https://api.github.com/repos/VSCodeVim/Vim/statuses/{sha}","languages_url":"https://api.github.com/repos/VSCodeVim/Vim/languages","stargazers_url":"https://api.github.com/repos/VSCodeVim/Vim/stargazers","contributors_url":"https://api.github.com/repos/VSCodeVim/Vim/contributors","subscribers_url":"https://api.github.com/repos/VSCodeVim/Vim/subscribers","subscription_url":"https://api.github.com/repos/VSCodeVim/Vim/subscription","commits_url":"https://api.github.com/repos/VSCodeVim/Vim/commits{/sha}","git_commits_url":"https://api.github.com/repos/VSCodeVim/Vim/git/commits{/sha}","comments_url":"https://api.github.com/repos/VSCodeVim/Vim/comments{/number}","issue_comment_url":"https://api.github.com/repos/VSCodeVim/Vim/issues/comments{/number}","contents_url":"https://api.github.com/repos/VSCodeVim/Vim/contents/{+path}","compare_url":"https://api.github.com/repos/VSCodeVim/Vim/compare/{base}...{head}","merges_url":"https://api.github.com/repos/VSCodeVim/Vim/merges","archive_url":"https://api.github.com/repos/VSCodeVim/Vim/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/VSCodeVim/Vim/downloads","issues_url":"https://api.github.com/repos/VSCodeVim/Vim/issues{/number}","pulls_url":"https://api.github.com/repos/VSCodeVim/Vim/pulls{/number}","milestones_url":"https://api.github.com/repos/VSCodeVim/Vim/milestones{/number}","notifications_url":"https://api.github.com/repos/VSCodeVim/Vim/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/VSCodeVim/Vim/labels{/name}","releases_url":"https://api.github.com/repos/VSCodeVim/Vim/releases{/id}","deployments_url":"https://api.github.com/repos/VSCodeVim/Vim/deployments","created_at":"2015-11-12T09:02:23Z","updated_at":"2016-07-12T08:29:14Z","pushed_at":"2016-07-12T18:12:52Z","git_url":"git://github.com/VSCodeVim/Vim.git","ssh_url":"git@github.com:VSCodeVim/Vim.git","clone_url":"https://github.com/VSCodeVim/Vim.git","svn_url":"https://github.com/VSCodeVim/Vim","homepage":"http://aka.ms/vscodevim","size":1213,"stargazers_count":517,"watchers_count":517,"language":"TypeScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":83,"mirror_url":null,"open_issues_count":49,"forks":83,"open_issues":49,"watchers":517,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/VSCodeVim/Vim/pulls/412"},"html":{"href":"https://github.com/VSCodeVim/Vim/pull/412"},"issue":{"href":"https://api.github.com/repos/VSCodeVim/Vim/issues/412"},"comments":{"href":"https://api.github.com/repos/VSCodeVim/Vim/issues/412/comments"},"review_comments":{"href":"https://api.github.com/repos/VSCodeVim/Vim/pulls/412/comments"},"review_comment":{"href":"https://api.github.com/repos/VSCodeVim/Vim/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/VSCodeVim/Vim/pulls/412/commits"},"statuses":{"href":"https://api.github.com/repos/VSCodeVim/Vim/statuses/6a9f912291b21fd0d0afe5e85748887dbdf07b75"}}}}
{"actor":{"display_login":"johnfn"}}