{"action":"closed","number":196,"pull_request":{"url":"https://api.github.com/repos/itchyny/lightline.vim/pulls/196","id":90509348,"html_url":"https://github.com/itchyny/lightline.vim/pull/196","diff_url":"https://github.com/itchyny/lightline.vim/pull/196.diff","patch_url":"https://github.com/itchyny/lightline.vim/pull/196.patch","issue_url":"https://api.github.com/repos/itchyny/lightline.vim/issues/196","number":196,"state":"closed","locked":false,"title":"Include short mode mappings for small windows","user":{"login":"indiesquidge","id":3409645,"avatar_url":"https://avatars.githubusercontent.com/u/3409645?v=3","gravatar_id":"","url":"https://api.github.com/users/indiesquidge","html_url":"https://github.com/indiesquidge","followers_url":"https://api.github.com/users/indiesquidge/followers","following_url":"https://api.github.com/users/indiesquidge/following{/other_user}","gists_url":"https://api.github.com/users/indiesquidge/gists{/gist_id}","starred_url":"https://api.github.com/users/indiesquidge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/indiesquidge/subscriptions","organizations_url":"https://api.github.com/users/indiesquidge/orgs","repos_url":"https://api.github.com/users/indiesquidge/repos","events_url":"https://api.github.com/users/indiesquidge/events{/privacy}","received_events_url":"https://api.github.com/users/indiesquidge/received_events","type":"User","site_admin":false},"body":"This is simple way of only using mode letters once the buffer window is below a certain width. (Possibly when shrinking the terminal window itself, but more commonly when using something like [Tmux](https://tmux.github.io/), which allows for arbitrarily-sized shell panes to be open in the same window.)\r\n\r\nIt allows for a cleaner responsive design in my opinion. I use it as a component function that looks something like this:\r\n\r\n```vim\r\n      \\ 'component_function': {\r\n      \\   'mode': 'LightLineMode',\r\n      \\   ...\r\n      \\ }\r\n\r\nfunction! LightLineMode()\r\n  return winwidth(0) > 30 ? lightline#mode() : lightline#shortmode()\r\nendfunction\r\n```\r\n\r\nHere is an example of how it would play out as the window shrinks to a small size:\r\n\r\n<img width=\"584\" alt=\"screen shot 2016-10-23 at 1 42 07 am\" src=\"https://cloud.githubusercontent.com/assets/3409645/19625106/e979e252-98c3-11e6-8b1f-91de5c73a6ca.png\">\r\n<img width=\"504\" alt=\"screen shot 2016-10-23 at 1 42 36 am\" src=\"https://cloud.githubusercontent.com/assets/3409645/19625105/e9799dd8-98c3-11e6-9bbe-8ba1489aaa14.png\">\r\n<img width=\"303\" alt=\"screen shot 2016-10-23 at 1 57 08 am\" src=\"https://cloud.githubusercontent.com/assets/3409645/19625115/12cdb822-98c4-11e6-8c4f-c692c9a82a2c.png\">\r\n<img width=\"224\" alt=\"screen shot 2016-10-23 at 1 55 48 am\" src=\"https://cloud.githubusercontent.com/assets/3409645/19625117/30975a2a-98c4-11e6-90c6-f21056fd85aa.png\">\r\n\r\nNot a terribly complex feature obviously, but it's been a nice add-on for me to keep the lightline from looking too squished at any size.\r\n\r\nLet me know what you think! Love the plugin, thanks for making it 💛 ","created_at":"2016-10-23T09:01:16Z","updated_at":"2016-10-23T17:01:00Z","closed_at":"2016-10-23T17:01:00Z","merged_at":null,"merge_commit_sha":"29bdd3dbd04d2d0fc2d1c2c499d4fb772f2ad0c7","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/itchyny/lightline.vim/pulls/196/commits","review_comments_url":"https://api.github.com/repos/itchyny/lightline.vim/pulls/196/comments","review_comment_url":"https://api.github.com/repos/itchyny/lightline.vim/pulls/comments{/number}","comments_url":"https://api.github.com/repos/itchyny/lightline.vim/issues/196/comments","statuses_url":"https://api.github.com/repos/itchyny/lightline.vim/statuses/50691c8c20ca405f184b2c238b504f7486c86fc7","head":{"label":"indiesquidge:responsive-lightline","ref":"responsive-lightline","sha":"50691c8c20ca405f184b2c238b504f7486c86fc7","user":{"login":"indiesquidge","id":3409645,"avatar_url":"https://avatars.githubusercontent.com/u/3409645?v=3","gravatar_id":"","url":"https://api.github.com/users/indiesquidge","html_url":"https://github.com/indiesquidge","followers_url":"https://api.github.com/users/indiesquidge/followers","following_url":"https://api.github.com/users/indiesquidge/following{/other_user}","gists_url":"https://api.github.com/users/indiesquidge/gists{/gist_id}","starred_url":"https://api.github.com/users/indiesquidge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/indiesquidge/subscriptions","organizations_url":"https://api.github.com/users/indiesquidge/orgs","repos_url":"https://api.github.com/users/indiesquidge/repos","events_url":"https://api.github.com/users/indiesquidge/events{/privacy}","received_events_url":"https://api.github.com/users/indiesquidge/received_events","type":"User","site_admin":false},"repo":{"id":39811106,"name":"lightline.vim","full_name":"indiesquidge/lightline.vim","owner":{"login":"indiesquidge","id":3409645,"avatar_url":"https://avatars.githubusercontent.com/u/3409645?v=3","gravatar_id":"","url":"https://api.github.com/users/indiesquidge","html_url":"https://github.com/indiesquidge","followers_url":"https://api.github.com/users/indiesquidge/followers","following_url":"https://api.github.com/users/indiesquidge/following{/other_user}","gists_url":"https://api.github.com/users/indiesquidge/gists{/gist_id}","starred_url":"https://api.github.com/users/indiesquidge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/indiesquidge/subscriptions","organizations_url":"https://api.github.com/users/indiesquidge/orgs","repos_url":"https://api.github.com/users/indiesquidge/repos","events_url":"https://api.github.com/users/indiesquidge/events{/privacy}","received_events_url":"https://api.github.com/users/indiesquidge/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/indiesquidge/lightline.vim","description":"A light and configurable statusline/tabline for Vim","fork":true,"url":"https://api.github.com/repos/indiesquidge/lightline.vim","forks_url":"https://api.github.com/repos/indiesquidge/lightline.vim/forks","keys_url":"https://api.github.com/repos/indiesquidge/lightline.vim/keys{/key_id}","collaborators_url":"https://api.github.com/repos/indiesquidge/lightline.vim/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/indiesquidge/lightline.vim/teams","hooks_url":"https://api.github.com/repos/indiesquidge/lightline.vim/hooks","issue_events_url":"https://api.github.com/repos/indiesquidge/lightline.vim/issues/events{/number}","events_url":"https://api.github.com/repos/indiesquidge/lightline.vim/events","assignees_url":"https://api.github.com/repos/indiesquidge/lightline.vim/assignees{/user}","branches_url":"https://api.github.com/repos/indiesquidge/lightline.vim/branches{/branch}","tags_url":"https://api.github.com/repos/indiesquidge/lightline.vim/tags","blobs_url":"https://api.github.com/repos/indiesquidge/lightline.vim/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/indiesquidge/lightline.vim/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/indiesquidge/lightline.vim/git/refs{/sha}","trees_url":"https://api.github.com/repos/indiesquidge/lightline.vim/git/trees{/sha}","statuses_url":"https://api.github.com/repos/indiesquidge/lightline.vim/statuses/{sha}","languages_url":"https://api.github.com/repos/indiesquidge/lightline.vim/languages","stargazers_url":"https://api.github.com/repos/indiesquidge/lightline.vim/stargazers","contributors_url":"https://api.github.com/repos/indiesquidge/lightline.vim/contributors","subscribers_url":"https://api.github.com/repos/indiesquidge/lightline.vim/subscribers","subscription_url":"https://api.github.com/repos/indiesquidge/lightline.vim/subscription","commits_url":"https://api.github.com/repos/indiesquidge/lightline.vim/commits{/sha}","git_commits_url":"https://api.github.com/repos/indiesquidge/lightline.vim/git/commits{/sha}","comments_url":"https://api.github.com/repos/indiesquidge/lightline.vim/comments{/number}","issue_comment_url":"https://api.github.com/repos/indiesquidge/lightline.vim/issues/comments{/number}","contents_url":"https://api.github.com/repos/indiesquidge/lightline.vim/contents/{+path}","compare_url":"https://api.github.com/repos/indiesquidge/lightline.vim/compare/{base}...{head}","merges_url":"https://api.github.com/repos/indiesquidge/lightline.vim/merges","archive_url":"https://api.github.com/repos/indiesquidge/lightline.vim/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/indiesquidge/lightline.vim/downloads","issues_url":"https://api.github.com/repos/indiesquidge/lightline.vim/issues{/number}","pulls_url":"https://api.github.com/repos/indiesquidge/lightline.vim/pulls{/number}","milestones_url":"https://api.github.com/repos/indiesquidge/lightline.vim/milestones{/number}","notifications_url":"https://api.github.com/repos/indiesquidge/lightline.vim/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/indiesquidge/lightline.vim/labels{/name}","releases_url":"https://api.github.com/repos/indiesquidge/lightline.vim/releases{/id}","deployments_url":"https://api.github.com/repos/indiesquidge/lightline.vim/deployments","created_at":"2015-07-28T03:28:57Z","updated_at":"2016-07-10T02:36:08Z","pushed_at":"2016-10-23T08:17:48Z","git_url":"git://github.com/indiesquidge/lightline.vim.git","ssh_url":"git@github.com:indiesquidge/lightline.vim.git","clone_url":"https://github.com/indiesquidge/lightline.vim.git","svn_url":"https://github.com/indiesquidge/lightline.vim","homepage":"","size":490,"stargazers_count":0,"watchers_count":0,"language":"VimL","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":"itchyny:master","ref":"master","sha":"f06368d396b507b45b8304825a07aed560c40276","user":{"login":"itchyny","id":375258,"avatar_url":"https://avatars.githubusercontent.com/u/375258?v=3","gravatar_id":"","url":"https://api.github.com/users/itchyny","html_url":"https://github.com/itchyny","followers_url":"https://api.github.com/users/itchyny/followers","following_url":"https://api.github.com/users/itchyny/following{/other_user}","gists_url":"https://api.github.com/users/itchyny/gists{/gist_id}","starred_url":"https://api.github.com/users/itchyny/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/itchyny/subscriptions","organizations_url":"https://api.github.com/users/itchyny/orgs","repos_url":"https://api.github.com/users/itchyny/repos","events_url":"https://api.github.com/users/itchyny/events{/privacy}","received_events_url":"https://api.github.com/users/itchyny/received_events","type":"User","site_admin":false},"repo":{"id":12274152,"name":"lightline.vim","full_name":"itchyny/lightline.vim","owner":{"login":"itchyny","id":375258,"avatar_url":"https://avatars.githubusercontent.com/u/375258?v=3","gravatar_id":"","url":"https://api.github.com/users/itchyny","html_url":"https://github.com/itchyny","followers_url":"https://api.github.com/users/itchyny/followers","following_url":"https://api.github.com/users/itchyny/following{/other_user}","gists_url":"https://api.github.com/users/itchyny/gists{/gist_id}","starred_url":"https://api.github.com/users/itchyny/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/itchyny/subscriptions","organizations_url":"https://api.github.com/users/itchyny/orgs","repos_url":"https://api.github.com/users/itchyny/repos","events_url":"https://api.github.com/users/itchyny/events{/privacy}","received_events_url":"https://api.github.com/users/itchyny/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/itchyny/lightline.vim","description":"A light and configurable statusline/tabline for Vim","fork":false,"url":"https://api.github.com/repos/itchyny/lightline.vim","forks_url":"https://api.github.com/repos/itchyny/lightline.vim/forks","keys_url":"https://api.github.com/repos/itchyny/lightline.vim/keys{/key_id}","collaborators_url":"https://api.github.com/repos/itchyny/lightline.vim/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/itchyny/lightline.vim/teams","hooks_url":"https://api.github.com/repos/itchyny/lightline.vim/hooks","issue_events_url":"https://api.github.com/repos/itchyny/lightline.vim/issues/events{/number}","events_url":"https://api.github.com/repos/itchyny/lightline.vim/events","assignees_url":"https://api.github.com/repos/itchyny/lightline.vim/assignees{/user}","branches_url":"https://api.github.com/repos/itchyny/lightline.vim/branches{/branch}","tags_url":"https://api.github.com/repos/itchyny/lightline.vim/tags","blobs_url":"https://api.github.com/repos/itchyny/lightline.vim/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/itchyny/lightline.vim/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/itchyny/lightline.vim/git/refs{/sha}","trees_url":"https://api.github.com/repos/itchyny/lightline.vim/git/trees{/sha}","statuses_url":"https://api.github.com/repos/itchyny/lightline.vim/statuses/{sha}","languages_url":"https://api.github.com/repos/itchyny/lightline.vim/languages","stargazers_url":"https://api.github.com/repos/itchyny/lightline.vim/stargazers","contributors_url":"https://api.github.com/repos/itchyny/lightline.vim/contributors","subscribers_url":"https://api.github.com/repos/itchyny/lightline.vim/subscribers","subscription_url":"https://api.github.com/repos/itchyny/lightline.vim/subscription","commits_url":"https://api.github.com/repos/itchyny/lightline.vim/commits{/sha}","git_commits_url":"https://api.github.com/repos/itchyny/lightline.vim/git/commits{/sha}","comments_url":"https://api.github.com/repos/itchyny/lightline.vim/comments{/number}","issue_comment_url":"https://api.github.com/repos/itchyny/lightline.vim/issues/comments{/number}","contents_url":"https://api.github.com/repos/itchyny/lightline.vim/contents/{+path}","compare_url":"https://api.github.com/repos/itchyny/lightline.vim/compare/{base}...{head}","merges_url":"https://api.github.com/repos/itchyny/lightline.vim/merges","archive_url":"https://api.github.com/repos/itchyny/lightline.vim/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/itchyny/lightline.vim/downloads","issues_url":"https://api.github.com/repos/itchyny/lightline.vim/issues{/number}","pulls_url":"https://api.github.com/repos/itchyny/lightline.vim/pulls{/number}","milestones_url":"https://api.github.com/repos/itchyny/lightline.vim/milestones{/number}","notifications_url":"https://api.github.com/repos/itchyny/lightline.vim/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/itchyny/lightline.vim/labels{/name}","releases_url":"https://api.github.com/repos/itchyny/lightline.vim/releases{/id}","deployments_url":"https://api.github.com/repos/itchyny/lightline.vim/deployments","created_at":"2013-08-21T15:45:53Z","updated_at":"2016-10-23T08:48:16Z","pushed_at":"2016-10-23T09:01:16Z","git_url":"git://github.com/itchyny/lightline.vim.git","ssh_url":"git@github.com:itchyny/lightline.vim.git","clone_url":"https://github.com/itchyny/lightline.vim.git","svn_url":"https://github.com/itchyny/lightline.vim","homepage":"http://www.vim.org/scripts/script.php?script_id=5294","size":824,"stargazers_count":1796,"watchers_count":1796,"language":"VimL","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":81,"mirror_url":null,"open_issues_count":0,"forks":81,"open_issues":0,"watchers":1796,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/itchyny/lightline.vim/pulls/196"},"html":{"href":"https://github.com/itchyny/lightline.vim/pull/196"},"issue":{"href":"https://api.github.com/repos/itchyny/lightline.vim/issues/196"},"comments":{"href":"https://api.github.com/repos/itchyny/lightline.vim/issues/196/comments"},"review_comments":{"href":"https://api.github.com/repos/itchyny/lightline.vim/pulls/196/comments"},"review_comment":{"href":"https://api.github.com/repos/itchyny/lightline.vim/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/itchyny/lightline.vim/pulls/196/commits"},"statuses":{"href":"https://api.github.com/repos/itchyny/lightline.vim/statuses/50691c8c20ca405f184b2c238b504f7486c86fc7"}},"merged":false,"mergeable":true,"mergeable_state":"clean","merged_by":null,"comments":2,"review_comments":0,"commits":1,"additions":8,"deletions":0,"changed_files":1}}
{"actor":{"display_login":"indiesquidge"}}