Vim-devicons: CtrlPBuffer shows [No Name] instead of buffer file name

Created on 27 Oct 2016  Â·  8Comments  Â·  Source: ryanoasis/vim-devicons

Required Info

  • [x] I have searched the issues for my issue and found nothing related and/or helpful
  • [x] I have read or at least glanced at the FAQ
  • [x] I have read or at least glanced at the Wiki
  • [x] What version of vim are you using?

VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Oct 24 2016 17:33:26)
Parches incluidos: 1-46
Compilado por Arch Linux

  • [x] What version of vim-devicons are you using?

0.8.5

  • [x] Are you using vim from the terminal or a GUI vim?

gvim

  • [x] Are you using Mac, Linux or Windows?

Linux

Screenshot:

ctrlp

With let g:webdevicons_enable_ctrlp = 0 filenames are shown correctly.

I noticed this happens from ctrlpvim/ctrlp.vim@28612d023ccf889c10155cf9d17e44b3a2e7c060 Previous commit seems to be working ok with let g:webdevicons_enable_ctrlp = 1

Current version ctrlpvim/ctrlp.vim@c6d1fc5e58d689bfb104ff336aeb89d9ef1b48e2 is also affected, of course.

âš  confirmed bug

All 8 comments

@extrante I just had same issue. I fixed it by loading vim-devicons before ctrlp plugin.
Hope this works for you too.

@smesko85 your solution works fine for me.

It works for me too, but https://github.com/ryanoasis/vim-devicons#usage says you have to load CtrlP before vim-devicons loads. Docs should be updated if there's no proper fix to this problem.

For me loading devicons before ctrlp has the same effect as configuring ctrlp support off. You get buffer names back, but you don't get any of the icons.

The easiest fix is change the line g:ctrlp_formatline_func to

let g:ctrlp_formatline_func = 's:formatline(s:curtype() == "buf" ? v:val : WebDevIconsGetFileTypeSymbol(v:val) . " " . v:val) '

@HerringtonDarkholme The mentioned line fixed the issue but the icons devicons icons are not coming in buffer search. Can I get it somehow ?

@PezCoder I think this would require a PR, see: https://github.com/ryanoasis/vim-devicons/pull/185#issuecomment-261690023

Closing this as the root cause is now fixed. As @PezCoder mentioned the icons will no longer show up but that will require another PR to CtrlP :blush:

Was this page helpful?
0 / 5 - 0 ratings

Related issues

divramod picture divramod  Â·  7Comments

ntropia2 picture ntropia2  Â·  4Comments

x3rxe5 picture x3rxe5  Â·  8Comments

marioortizmanero picture marioortizmanero  Â·  3Comments

PetarMetodiev picture PetarMetodiev  Â·  10Comments