{"action":"created","comment":{"url":"https://api.github.com/repos/vim/vim/pulls/comments/45510168","id":45510168,"diff_hunk":"@@ -0,0 +1,18 @@\n+if empty($MAN_PN)\n+  finish\n+endif\n+\n+command! -nargs=0 MANPAGER call s:MANPAGER() | delcommand MANPAGER\n+\n+fun! s:MANPAGER()\n+  bwipe!\n+\n+  let page = expand('$MAN_PN')\n+  let page_pattern = '\\v\\w+(\\-\\w+)*'\n+  let sec_pattern = '\\v\\(' . '\\w+(\\+\\w+)*' . '\\)'\n+  let sec = substitute(matchstr(page, sec_pattern), '\\v^\\(|\\)$', '', 'g')\n+  let page = substitute(page, sec_pattern, '', '')\n+\n+  setlocal filetype=man\n+  exe 'Man ' . sec . ' ' . page","path":"runtime/plugin/manpager.vim","position":17,"original_position":17,"commit_id":"732f041238aecfbb875da15560e7198b55dc5c48","original_commit_id":"732f041238aecfbb875da15560e7198b55dc5c48","user":{"login":"ZyX-I","id":322097,"avatar_url":"https://avatars.githubusercontent.com/u/322097?v=3","gravatar_id":"","url":"https://api.github.com/users/ZyX-I","html_url":"https://github.com/ZyX-I","followers_url":"https://api.github.com/users/ZyX-I/followers","following_url":"https://api.github.com/users/ZyX-I/following{/other_user}","gists_url":"https://api.github.com/users/ZyX-I/gists{/gist_id}","starred_url":"https://api.github.com/users/ZyX-I/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ZyX-I/subscriptions","organizations_url":"https://api.github.com/users/ZyX-I/orgs","repos_url":"https://api.github.com/users/ZyX-I/repos","events_url":"https://api.github.com/users/ZyX-I/events{/privacy}","received_events_url":"https://api.github.com/users/ZyX-I/received_events","type":"User","site_admin":false},"body":"`execute 'Man' sec page` is enough. Inserting spaces and concatenation looks better when implicit.","created_at":"2015-11-20T19:49:01Z","updated_at":"2015-11-20T19:49:01Z","html_url":"https://github.com/vim/vim/pull/491#discussion_r45510168","pull_request_url":"https://api.github.com/repos/vim/vim/pulls/491","_links":{"self":{"href":"https://api.github.com/repos/vim/vim/pulls/comments/45510168"},"html":{"href":"https://github.com/vim/vim/pull/491#discussion_r45510168"},"pull_request":{"href":"https://api.github.com/repos/vim/vim/pulls/491"}}},"pull_request":{"url":"https://api.github.com/repos/vim/vim/pulls/491","id":51389429,"html_url":"https://github.com/vim/vim/pull/491","diff_url":"https://github.com/vim/vim/pull/491.diff","patch_url":"https://github.com/vim/vim/pull/491.patch","issue_url":"https://api.github.com/repos/vim/vim/issues/491","number":491,"state":"open","locked":false,"title":"propose vim as manpager that syntax highlights and follows symlinks","user":{"login":"Konfekt","id":7195553,"avatar_url":"https://avatars.githubusercontent.com/u/7195553?v=3","gravatar_id":"","url":"https://api.github.com/users/Konfekt","html_url":"https://github.com/Konfekt","followers_url":"https://api.github.com/users/Konfekt/followers","following_url":"https://api.github.com/users/Konfekt/following{/other_user}","gists_url":"https://api.github.com/users/Konfekt/gists{/gist_id}","starred_url":"https://api.github.com/users/Konfekt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Konfekt/subscriptions","organizations_url":"https://api.github.com/users/Konfekt/orgs","repos_url":"https://api.github.com/users/Konfekt/repos","events_url":"https://api.github.com/users/Konfekt/events{/privacy}","received_events_url":"https://api.github.com/users/Konfekt/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-11-20T18:16:24Z","updated_at":"2015-11-20T19:49:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7dc6e10aa039dab22e6eeea0664a013106dc1157","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/vim/vim/pulls/491/commits","review_comments_url":"https://api.github.com/repos/vim/vim/pulls/491/comments","review_comment_url":"https://api.github.com/repos/vim/vim/pulls/comments{/number}","comments_url":"https://api.github.com/repos/vim/vim/issues/491/comments","statuses_url":"https://api.github.com/repos/vim/vim/statuses/732f041238aecfbb875da15560e7198b55dc5c48","head":{"label":"Konfekt:patch-1","ref":"patch-1","sha":"732f041238aecfbb875da15560e7198b55dc5c48","user":{"login":"Konfekt","id":7195553,"avatar_url":"https://avatars.githubusercontent.com/u/7195553?v=3","gravatar_id":"","url":"https://api.github.com/users/Konfekt","html_url":"https://github.com/Konfekt","followers_url":"https://api.github.com/users/Konfekt/followers","following_url":"https://api.github.com/users/Konfekt/following{/other_user}","gists_url":"https://api.github.com/users/Konfekt/gists{/gist_id}","starred_url":"https://api.github.com/users/Konfekt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Konfekt/subscriptions","organizations_url":"https://api.github.com/users/Konfekt/orgs","repos_url":"https://api.github.com/users/Konfekt/repos","events_url":"https://api.github.com/users/Konfekt/events{/privacy}","received_events_url":"https://api.github.com/users/Konfekt/received_events","type":"User","site_admin":false},"repo":{"id":46578193,"name":"vim","full_name":"Konfekt/vim","owner":{"login":"Konfekt","id":7195553,"avatar_url":"https://avatars.githubusercontent.com/u/7195553?v=3","gravatar_id":"","url":"https://api.github.com/users/Konfekt","html_url":"https://github.com/Konfekt","followers_url":"https://api.github.com/users/Konfekt/followers","following_url":"https://api.github.com/users/Konfekt/following{/other_user}","gists_url":"https://api.github.com/users/Konfekt/gists{/gist_id}","starred_url":"https://api.github.com/users/Konfekt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Konfekt/subscriptions","organizations_url":"https://api.github.com/users/Konfekt/orgs","repos_url":"https://api.github.com/users/Konfekt/repos","events_url":"https://api.github.com/users/Konfekt/events{/privacy}","received_events_url":"https://api.github.com/users/Konfekt/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Konfekt/vim","description":"The official Vim repository","fork":true,"url":"https://api.github.com/repos/Konfekt/vim","forks_url":"https://api.github.com/repos/Konfekt/vim/forks","keys_url":"https://api.github.com/repos/Konfekt/vim/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Konfekt/vim/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Konfekt/vim/teams","hooks_url":"https://api.github.com/repos/Konfekt/vim/hooks","issue_events_url":"https://api.github.com/repos/Konfekt/vim/issues/events{/number}","events_url":"https://api.github.com/repos/Konfekt/vim/events","assignees_url":"https://api.github.com/repos/Konfekt/vim/assignees{/user}","branches_url":"https://api.github.com/repos/Konfekt/vim/branches{/branch}","tags_url":"https://api.github.com/repos/Konfekt/vim/tags","blobs_url":"https://api.github.com/repos/Konfekt/vim/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Konfekt/vim/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Konfekt/vim/git/refs{/sha}","trees_url":"https://api.github.com/repos/Konfekt/vim/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Konfekt/vim/statuses/{sha}","languages_url":"https://api.github.com/repos/Konfekt/vim/languages","stargazers_url":"https://api.github.com/repos/Konfekt/vim/stargazers","contributors_url":"https://api.github.com/repos/Konfekt/vim/contributors","subscribers_url":"https://api.github.com/repos/Konfekt/vim/subscribers","subscription_url":"https://api.github.com/repos/Konfekt/vim/subscription","commits_url":"https://api.github.com/repos/Konfekt/vim/commits{/sha}","git_commits_url":"https://api.github.com/repos/Konfekt/vim/git/commits{/sha}","comments_url":"https://api.github.com/repos/Konfekt/vim/comments{/number}","issue_comment_url":"https://api.github.com/repos/Konfekt/vim/issues/comments{/number}","contents_url":"https://api.github.com/repos/Konfekt/vim/contents/{+path}","compare_url":"https://api.github.com/repos/Konfekt/vim/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Konfekt/vim/merges","archive_url":"https://api.github.com/repos/Konfekt/vim/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Konfekt/vim/downloads","issues_url":"https://api.github.com/repos/Konfekt/vim/issues{/number}","pulls_url":"https://api.github.com/repos/Konfekt/vim/pulls{/number}","milestones_url":"https://api.github.com/repos/Konfekt/vim/milestones{/number}","notifications_url":"https://api.github.com/repos/Konfekt/vim/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Konfekt/vim/labels{/name}","releases_url":"https://api.github.com/repos/Konfekt/vim/releases{/id}","created_at":"2015-11-20T18:01:06Z","updated_at":"2015-11-20T18:01:27Z","pushed_at":"2015-11-20T18:15:21Z","git_url":"git://github.com/Konfekt/vim.git","ssh_url":"git@github.com:Konfekt/vim.git","clone_url":"https://github.com/Konfekt/vim.git","svn_url":"https://github.com/Konfekt/vim","homepage":"http://www.vim.org","size":36757,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_downloads":false,"has_wiki":false,"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":"vim:master","ref":"master","sha":"e392eb41f8dfc01bd13634e534ac6b4d505326f4","user":{"login":"vim","id":11618545,"avatar_url":"https://avatars.githubusercontent.com/u/11618545?v=3","gravatar_id":"","url":"https://api.github.com/users/vim","html_url":"https://github.com/vim","followers_url":"https://api.github.com/users/vim/followers","following_url":"https://api.github.com/users/vim/following{/other_user}","gists_url":"https://api.github.com/users/vim/gists{/gist_id}","starred_url":"https://api.github.com/users/vim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vim/subscriptions","organizations_url":"https://api.github.com/users/vim/orgs","repos_url":"https://api.github.com/users/vim/repos","events_url":"https://api.github.com/users/vim/events{/privacy}","received_events_url":"https://api.github.com/users/vim/received_events","type":"Organization","site_admin":false},"repo":{"id":40997482,"name":"vim","full_name":"vim/vim","owner":{"login":"vim","id":11618545,"avatar_url":"https://avatars.githubusercontent.com/u/11618545?v=3","gravatar_id":"","url":"https://api.github.com/users/vim","html_url":"https://github.com/vim","followers_url":"https://api.github.com/users/vim/followers","following_url":"https://api.github.com/users/vim/following{/other_user}","gists_url":"https://api.github.com/users/vim/gists{/gist_id}","starred_url":"https://api.github.com/users/vim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vim/subscriptions","organizations_url":"https://api.github.com/users/vim/orgs","repos_url":"https://api.github.com/users/vim/repos","events_url":"https://api.github.com/users/vim/events{/privacy}","received_events_url":"https://api.github.com/users/vim/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/vim/vim","description":"The official Vim repository","fork":false,"url":"https://api.github.com/repos/vim/vim","forks_url":"https://api.github.com/repos/vim/vim/forks","keys_url":"https://api.github.com/repos/vim/vim/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vim/vim/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vim/vim/teams","hooks_url":"https://api.github.com/repos/vim/vim/hooks","issue_events_url":"https://api.github.com/repos/vim/vim/issues/events{/number}","events_url":"https://api.github.com/repos/vim/vim/events","assignees_url":"https://api.github.com/repos/vim/vim/assignees{/user}","branches_url":"https://api.github.com/repos/vim/vim/branches{/branch}","tags_url":"https://api.github.com/repos/vim/vim/tags","blobs_url":"https://api.github.com/repos/vim/vim/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vim/vim/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vim/vim/git/refs{/sha}","trees_url":"https://api.github.com/repos/vim/vim/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vim/vim/statuses/{sha}","languages_url":"https://api.github.com/repos/vim/vim/languages","stargazers_url":"https://api.github.com/repos/vim/vim/stargazers","contributors_url":"https://api.github.com/repos/vim/vim/contributors","subscribers_url":"https://api.github.com/repos/vim/vim/subscribers","subscription_url":"https://api.github.com/repos/vim/vim/subscription","commits_url":"https://api.github.com/repos/vim/vim/commits{/sha}","git_commits_url":"https://api.github.com/repos/vim/vim/git/commits{/sha}","comments_url":"https://api.github.com/repos/vim/vim/comments{/number}","issue_comment_url":"https://api.github.com/repos/vim/vim/issues/comments{/number}","contents_url":"https://api.github.com/repos/vim/vim/contents/{+path}","compare_url":"https://api.github.com/repos/vim/vim/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vim/vim/merges","archive_url":"https://api.github.com/repos/vim/vim/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vim/vim/downloads","issues_url":"https://api.github.com/repos/vim/vim/issues{/number}","pulls_url":"https://api.github.com/repos/vim/vim/pulls{/number}","milestones_url":"https://api.github.com/repos/vim/vim/milestones{/number}","notifications_url":"https://api.github.com/repos/vim/vim/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vim/vim/labels{/name}","releases_url":"https://api.github.com/repos/vim/vim/releases{/id}","created_at":"2015-08-18T21:03:56Z","updated_at":"2015-11-20T19:47:28Z","pushed_at":"2015-11-20T18:16:25Z","git_url":"git://github.com/vim/vim.git","ssh_url":"git@github.com:vim/vim.git","clone_url":"https://github.com/vim/vim.git","svn_url":"https://github.com/vim/vim","homepage":"http://www.vim.org","size":40634,"stargazers_count":2425,"watchers_count":2425,"language":"C","has_issues":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":181,"mirror_url":null,"open_issues_count":160,"forks":181,"open_issues":160,"watchers":2425,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/vim/vim/pulls/491"},"html":{"href":"https://github.com/vim/vim/pull/491"},"issue":{"href":"https://api.github.com/repos/vim/vim/issues/491"},"comments":{"href":"https://api.github.com/repos/vim/vim/issues/491/comments"},"review_comments":{"href":"https://api.github.com/repos/vim/vim/pulls/491/comments"},"review_comment":{"href":"https://api.github.com/repos/vim/vim/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/vim/vim/pulls/491/commits"},"statuses":{"href":"https://api.github.com/repos/vim/vim/statuses/732f041238aecfbb875da15560e7198b55dc5c48"}}}}