{"action":"created","issue":{"url":"https://api.github.com/repos/ctrlpvim/ctrlp.vim/issues/104","labels_url":"https://api.github.com/repos/ctrlpvim/ctrlp.vim/issues/104/labels{/name}","comments_url":"https://api.github.com/repos/ctrlpvim/ctrlp.vim/issues/104/comments","events_url":"https://api.github.com/repos/ctrlpvim/ctrlp.vim/issues/104/events","html_url":"https://github.com/ctrlpvim/ctrlp.vim/pull/104","id":94587338,"number":104,"title":"Allow easier customizing of list format","user":{"login":"ryanoasis","id":8083459,"avatar_url":"https://avatars.githubusercontent.com/u/8083459?v=3","gravatar_id":"","url":"https://api.github.com/users/ryanoasis","html_url":"https://github.com/ryanoasis","followers_url":"https://api.github.com/users/ryanoasis/followers","following_url":"https://api.github.com/users/ryanoasis/following{/other_user}","gists_url":"https://api.github.com/users/ryanoasis/gists{/gist_id}","starred_url":"https://api.github.com/users/ryanoasis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryanoasis/subscriptions","organizations_url":"https://api.github.com/users/ryanoasis/orgs","repos_url":"https://api.github.com/users/ryanoasis/repos","events_url":"https://api.github.com/users/ryanoasis/events{/privacy}","received_events_url":"https://api.github.com/users/ryanoasis/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-07-12T18:00:29Z","updated_at":"2015-07-13T01:20:06Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/ctrlpvim/ctrlp.vim/pulls/104","html_url":"https://github.com/ctrlpvim/ctrlp.vim/pull/104","diff_url":"https://github.com/ctrlpvim/ctrlp.vim/pull/104.diff","patch_url":"https://github.com/ctrlpvim/ctrlp.vim/pull/104.patch"},"body":"I have already completely this in a somewhat hacky way, but this would allow for a cleaner way to customize the list items format.\r\n\r\nReference to my use case: ryanoasis/vim-devicons/issues/56\r\n\r\n```vim\r\n\" scope: local\r\n\" Either initialize for: kien/ctrlp.vim OR up to date fork: ctrlpvim/ctrlp.vim\r\n\" mostly a hack/overwrite to add icons to the official inactive ctrlP repo\r\n\" only overwriting the necessary functions to make it work\r\n\" unless we detect the newer active ctrlp fork\r\nfunction! s:initializeCtrlP()\r\n  if exists(\"g:loaded_ctrlp\") && g:webdevicons_enable_ctrlp\r\n    let g:ctrlp_open_func = {\r\n      \\ 'files': 'webdevicons#ctrlPOpenFunc',\r\n      \\ 'buffers': 'webdevicons#ctrlPOpenFunc',\r\n      \\ 'mru files': 'webdevicons#ctrlPOpenFunc'\r\n      \\ }\r\n\r\n    if exists(\"g:ctrlp_mruf_map_string\")\r\n      \" logic for ctrlpvim/ctrlp.vim:\r\n      let g:ctrlp_mruf_map_string = '!stridx(v:val, cwd) ? WebDevIconsGetFileTypeSymbol(strpart(v:val, strridx(v:val, \"/\"))) . \" \" . strpart(v:val, idx) : g:WebDevIconsUnicodeDecorateFileNodesDefaultSymbol . \" \" . v:val'\r\n    else\r\n      \" logic for kien/ctrlp.vim (somewhat ugly hack that overwrites functions to accomplish customization):\r\n      call s:initializeCtrlPOverwrite()\r\n    endif\r\n  endif\r\nendfunction\r\n\r\n\" scope: public\r\nfunction! webdevicons#ctrlPOpenFunc(action, line)\r\n  \" Use CtrlP's default file opening function\r\n  let devIconPrefixLength = 6\r\n  let line = strpart(a:line, devIconPrefixLength)\r\n  call call('ctrlp#acceptfile', [a:action, line])\r\nendfunction\r\n```"},"comment":{"url":"https://api.github.com/repos/ctrlpvim/ctrlp.vim/issues/comments/120779474","html_url":"https://github.com/ctrlpvim/ctrlp.vim/pull/104#issuecomment-120779474","issue_url":"https://api.github.com/repos/ctrlpvim/ctrlp.vim/issues/104","id":120779474,"user":{"login":"mattn","id":10111,"avatar_url":"https://avatars.githubusercontent.com/u/10111?v=3","gravatar_id":"","url":"https://api.github.com/users/mattn","html_url":"https://github.com/mattn","followers_url":"https://api.github.com/users/mattn/followers","following_url":"https://api.github.com/users/mattn/following{/other_user}","gists_url":"https://api.github.com/users/mattn/gists{/gist_id}","starred_url":"https://api.github.com/users/mattn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattn/subscriptions","organizations_url":"https://api.github.com/users/mattn/orgs","repos_url":"https://api.github.com/users/mattn/repos","events_url":"https://api.github.com/users/mattn/events{/privacy}","received_events_url":"https://api.github.com/users/mattn/received_events","type":"User","site_admin":false},"created_at":"2015-07-13T01:20:06Z","updated_at":"2015-07-13T01:20:06Z","body":"LGTM"}}