Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

colorize ctrlP icons #201

Closed
divramod opened this issue Apr 20, 2017 · 9 comments
Closed

colorize ctrlP icons #201

divramod opened this issue Apr 20, 2017 · 9 comments

Comments

@divramod
Copy link

hey, thx for the great work!

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

@ryanoasis
Copy link
Owner

@divramod Thanks I really appreciate that! 😄

It is possible but I think this suggested change would make it a lot easier: ctrlpvim/ctrlp.vim#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 😄)

@tiagofumo
Copy link
Contributor

tiagofumo commented Apr 21, 2017

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

@ryanoasis
Copy link
Owner

@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).


😆 Love right back to ya! 😄 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.

@divramod
Copy link
Author

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 ctrlpvim/ctrlp.vim#316
But the pull request is already 6 month old ;-/

@her
Copy link
Collaborator

her commented Feb 22, 2019

@divramod since this ctrlpvim/ctrlp.vim#316 has been merged, is it working for you now?

@HerringtonDarkholme
Copy link
Contributor

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...

@poetaman
Copy link

poetaman commented Feb 5, 2021

@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: #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.

@kalindu1
Copy link

kalindu1 commented Dec 26, 2021

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.

@divramod
Copy link
Author

thx!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants