vim-devicons icon indicating copy to clipboard operation
vim-devicons copied to clipboard

colorize ctrlP icons

Open divramod opened this issue 7 years ago • 8 comments

hey, thx for the great work!

i want to ask if it is possible to color the icons shown in ctrlp?

divramod avatar Apr 20 '17 14:04 divramod

@divramod Thanks I really appreciate that! :smile:

It is possible but I think this suggested change would make it a lot easier: https://github.com/ctrlpvim/ctrlp.vim/pull/316

I know you are asking specifically about ctrlp but if you use NERDTree you'd like this: https://github.com/tiagofumo/vim-nerdtree-syntax-highlight


@HerringtonDarkholme any thoughts?

cc @tiagofumo (just in case you had some thoughts :smile:)

ryanoasis avatar Apr 21 '17 01:04 ryanoasis

I didn't even know that icons show up in ctrlp, because mine don't. I tried configuring it just now, to see if I could make it to work, but I couldn't. My guess is that doing something similar to what I did for NERDTree is going to cause a lot of lag, given that I already have some complaints about lag on my plugin.

PS: I love you @ryanoasis, lol. Sometimes I get worried about "sounding" rude to people that are cool to me, so I just want to point that out hahaha. #jokes

tiagofumo avatar Apr 21 '17 02:04 tiagofumo

@tiagofumo Oh you can't see the icons in ctrlp? Can I ask what mode you are in? They should show up in mru or file mode (not buffer currently -- that was breaking ctrlp integration).


:laughing: Love right back to ya! :smile: No worries here from my side, I am pretty chill and but I have learned that a lot of people on GitHub (or online in general) are... how you say very direct.

ryanoasis avatar Apr 21 '17 02:04 ryanoasis

thx for the feedback guys. i have the colouring already running for nerdtree and it looks awesome. so as it looks like we have to wait for the landing of https://github.com/ctrlpvim/ctrlp.vim/pull/316 But the pull request is already 6 month old ;-/

divramod avatar Apr 21 '17 05:04 divramod

@divramod since this https://github.com/ctrlpvim/ctrlp.vim/pull/316 has been merged, is it working for you now?

her avatar Feb 22 '19 01:02 her

This can be done by adding syntax/ctrlp.vim to runtime path. I don't have time for OSS for a while so I hope I can find syntax file I created years ago...

HerringtonDarkholme avatar Feb 22 '19 02:02 HerringtonDarkholme

@her Yes it works, I confirm! @HerringtonDarkholme @ryanoasis This ticket should be closed. For those looking for how to use coloring, please add filetype "ctrlp" in the auto command filetype list for answers on this thread: https://github.com/ryanoasis/vim-devicons/issues/158. I am using the solution posted by user "zeorin" on that thread, and no it does not cause any performance issues. @tiagofumo And for why it causes performance issues for NERDtree: it does only if I scroll in a file while NERDtree window is open. I tested this with (CPU performance/temperature monitor) If I toggle the NERDtree window and scroll a file, it doesn't have any effect. IMHO, it could be a bug in the implementation of NERDtree that refreshes the NERDtree buffer when other files are being scrolled, causing it to redo pattern matches for coloring, etc. Otherwise, given its contents or their position is not changing, NERDtree shouldn't cause slowdown in scrolling of other files. I have implemented GUIs in past, though am new to Vimscript, so can't really help in its debug.

poetaman avatar Feb 05 '21 07:02 poetaman

I didn't even know that icons show up in ctrlp, because mine don't. I tried configuring it just now, to see if I could make it to work, but I couldn't. My guess is that doing something similar to what I did for NERDTree is going to cause a lot of lag, given that I already have some complaints about lag on my plugin.

PS: I love you @ryanoasis, lol. Sometimes I get worried about "sounding" rude to people that are cool to me, so I just want to point that out hahaha. #jokes

Laod the CtrlP plugin before vim-devicons.

kalindu1 avatar Dec 26 '21 09:12 kalindu1

thx!

divramod avatar Oct 30 '23 02:10 divramod