{"action":"opened","number":486,"pull_request":{"url":"https://api.github.com/repos/VSCodeVim/Vim/pulls/486","id":78122389,"html_url":"https://github.com/VSCodeVim/Vim/pull/486","diff_url":"https://github.com/VSCodeVim/Vim/pull/486.diff","patch_url":"https://github.com/VSCodeVim/Vim/pull/486.patch","issue_url":"https://api.github.com/repos/VSCodeVim/Vim/issues/486","number":486,"state":"open","locked":false,"title":"[WIP] Screen lines and characters.","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\nWe are adding APIs for screen lines/characters in Insider and this PR is integrating those APIs for following commands\r\n\r\n- [x] `g0`\r\n- [x] `g^`\r\n- [x] :1234: `g$`\r\n- [x] `gm`\r\n- [x] :1234: `gk`\r\n- [x] :1234: `gj`\r\n\r\nAs @johnfn mentioned while I did #478, the way we implment Movement in VSCodeVim is calculating the target Position or Selection and update the View in a central place (modelHandler). We are likely doing this from the very beginning.\r\n\r\nWhile we are exposing commands in VS Code, we try to avoid exposing View Model information as they are way too complex and always require additional work. Take `scroll to next screen line` as example, we want VSCodeVim just provides the Position information and handle the movment ourselves, but for other extension authors or just users who want to customize key bindings, they have to leverage other APIs to move the cursor to target position.\r\n\r\nSo in this PR, I'm calling VS Code API to do the real movment or selection and return the correct Position/Movement information after the command is executed.","created_at":"2016-07-20T10:21:26Z","updated_at":"2016-07-20T10:21:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/VSCodeVim/Vim/pulls/486/commits","review_comments_url":"https://api.github.com/repos/VSCodeVim/Vim/pulls/486/comments","review_comment_url":"https://api.github.com/repos/VSCodeVim/Vim/pulls/comments{/number}","comments_url":"https://api.github.com/repos/VSCodeVim/Vim/issues/486/comments","statuses_url":"https://api.github.com/repos/VSCodeVim/Vim/statuses/a8f5c6f9be3518cfdb4d1b596aece12197b5a625","head":{"label":"rebornix:ScreenLine","ref":"ScreenLine","sha":"a8f5c6f9be3518cfdb4d1b596aece12197b5a625","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-20T09:47:38Z","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":1167,"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":"4807373719719748273128a9e83622b57050f821","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-18T22:47:37Z","pushed_at":"2016-07-20T07:18:18Z","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":1315,"stargazers_count":533,"watchers_count":533,"language":"TypeScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":87,"mirror_url":null,"open_issues_count":54,"forks":87,"open_issues":54,"watchers":533,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/VSCodeVim/Vim/pulls/486"},"html":{"href":"https://github.com/VSCodeVim/Vim/pull/486"},"issue":{"href":"https://api.github.com/repos/VSCodeVim/Vim/issues/486"},"comments":{"href":"https://api.github.com/repos/VSCodeVim/Vim/issues/486/comments"},"review_comments":{"href":"https://api.github.com/repos/VSCodeVim/Vim/pulls/486/comments"},"review_comment":{"href":"https://api.github.com/repos/VSCodeVim/Vim/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/VSCodeVim/Vim/pulls/486/commits"},"statuses":{"href":"https://api.github.com/repos/VSCodeVim/Vim/statuses/a8f5c6f9be3518cfdb4d1b596aece12197b5a625"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":81,"deletions":0,"changed_files":1}}
{"actor":{"display_login":"rebornix"}}