{"action":"created","issue":{"url":"https://api.github.com/repos/itchyny/lightline.vim/issues/120","labels_url":"https://api.github.com/repos/itchyny/lightline.vim/issues/120/labels{/name}","comments_url":"https://api.github.com/repos/itchyny/lightline.vim/issues/120/comments","events_url":"https://api.github.com/repos/itchyny/lightline.vim/issues/120/events","html_url":"https://github.com/itchyny/lightline.vim/issues/120","id":95220029,"number":120,"title":"Accessing default component_function of lightline.vim","user":{"login":"yous","id":853977,"avatar_url":"https://avatars.githubusercontent.com/u/853977?v=3","gravatar_id":"","url":"https://api.github.com/users/yous","html_url":"https://github.com/yous","followers_url":"https://api.github.com/users/yous/followers","following_url":"https://api.github.com/users/yous/following{/other_user}","gists_url":"https://api.github.com/users/yous/gists{/gist_id}","starred_url":"https://api.github.com/users/yous/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yous/subscriptions","organizations_url":"https://api.github.com/users/yous/orgs","repos_url":"https://api.github.com/users/yous/repos","events_url":"https://api.github.com/users/yous/events{/privacy}","received_events_url":"https://api.github.com/users/yous/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-07-15T15:13:55Z","updated_at":"2015-07-15T19:37:39Z","closed_at":null,"body":"To implement `component_function`s which are named to `MyFileformat`, `MyFiletype`, `MyFileencoding` in order to hide `fileformat`, `filetype`, `fileencoding` on narrow window respectively, we have to do like:\r\n\r\n``` vimrc\r\nfunction! MyFileformat()\r\n  return winwidth(0) > 70 ? &fileformat : ''\r\nendfunction\r\n\r\nfunction! MyFiletype()\r\n  return winwidth(0) > 70 ? (strlen(&filetype) ? &filetype : 'no ft') : ''\r\nendfunction\r\n\r\nfunction! MyFileencoding()\r\n  return winwidth(0) > 70 ? (strlen(&fenc) ? &fenc : &enc) : ''\r\nendfunction\r\n```\r\n\r\nBut writing `&fileformat`, `(strlen(&filetype) ? &filetype : 'no ft')`, `(strlen(&fenc) ? &fenc : &enc)` things require finding the default implementations and are hard to be updated when the default implementations of lightline.vim have been changed. So I want to replace them with specific variables or functions from lightline.vim e.g. `lightline#default_component('filetype')`. Will this be possible?"},"comment":{"url":"https://api.github.com/repos/itchyny/lightline.vim/issues/comments/121722962","html_url":"https://github.com/itchyny/lightline.vim/issues/120#issuecomment-121722962","issue_url":"https://api.github.com/repos/itchyny/lightline.vim/issues/120","id":121722962,"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},"created_at":"2015-07-15T19:37:39Z","updated_at":"2015-07-15T19:37:39Z","body":"Possible but I'm not sure how to extend configuration from that. You'll parse the text of the components?"}}