-
Notifications
You must be signed in to change notification settings - Fork 267
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
vim-devicons breaks vim-airlines ffenc#skip_expected_string
(hide file format/encoding)
#203
Comments
@x4121 Hey thanks for the report! 😄 Good catch. So right now this plugin tacks that part on (and it's not even configurable 😢): https://github.com/ryanoasis/vim-devicons/blob/master/autoload/airline/extensions/tabline/formatters/webdevicons.vim#L9 Should be an easy fix. In the meantime you can hack that line to remove it or disable VimDevIcons plugin altogether 😊 |
Why write it configurable if you don't know of the feature in the first place 🙂 Thanks for the plugin btw 👍 |
Thanks for the kind words.
Yeah that's a good point. I guess I feel like there should have been foresight but maybe that's wishful thinking 😆 |
Changing https://github.com/ryanoasis/vim-devicons/blob/master/plugin/webdevicons.vim#L685 from Don't use a tabline, maybe changes in the file you linked are necessary as well (also I never wrote vimscript, there are probably nicer ways to do this). |
@x4121 Thanks.. what timing.. I am actually working on this right now 😄 |
Haha.. sorry, didn't want to disturb/nag you there 😂 But nice to hear that 🙂 |
@x4121 Oh yeah no worries 😄 Honestly I completely forgot about the Does disabling it not do what you expect: let g:webdevicons_enable_airline_statusline_fileformat_symbols = 0 You are wanting to not show any encoding right? Doesn't setting this accomplish that: let g:airline#parts#ffenc#skip_expected_string='utf-8[unix]'
let g:webdevicons_enable_airline_statusline_fileformat_symbols = 0 Or am I missing something? 😊 |
Nevertheless your suggested change is a good defensive check and doesn't break anything. I will add it soon |
That would disable the replacement text to icon. I do really like the icons, but I only need the information for file format and encoding if it's not what I am expecting. To see "utf-8[unix]" (or "utf-8 ") for all my files is unnecessary information (like git status would show me all files that have not changed). But I wouldn't mind "utf-8 " or "latin-1 ", since that might indicate an error. |
@x4121 Ah okay I understand now. So with your suggested change and not disabling the glyphs for fileencoding it does seem to be working as expected. I have been testing with setting fileenconding via command mode and it does work but doesn't update until AirlineRefresh is called. This shouldn't be a big issue as most likely you aren't going to be switching back and forth filetypes? :set fileenconding=utf-8
:AirlineRefresh
:set fileencoding=latin-1
:AirlineRefresh vimrc settings: let g:airline#parts#ffenc#skip_expected_string='utf-8[unix]' |
I am going to release this in a few hours 📦 , if you would like to help test the |
Already checked, works like a charm 🙂 |
Great! Thanks for verifying. Also thanks for the report. ❤️ By the way, I usually ask if someone makes an unofficial code fix if they would like to submit a PR but I just assumed you didn't want/care to do that 😛 but let me know if otherwise 😊 |
Thanks for fixing it that fast 😃 After reporting I was thinking about writing one... but I can barely read vimscript and feared I couldn't comply with the boy scout rule 😉 |
@x4121 Sure no problem. I wish some of the other issues were as fast 😊 Interesting link I honestly haven't read that before, so thanks for that too. |
@ryanoasis yeah, I know the joy of stumbling upon an easy/fast to fix problem 😉 It's a nice book, being in small and easy to grok chunks makes it far more attractive to read than a lot of other tech literature (also you can sound a lot smarter by inserting those ideas now and then 😜) |
Required Info
I have searched the issues for my issue and found nothing related and/or helpful
I have read or at least glanced at the FAQ
I have read or at least glanced at the Wiki
What version of vim are you using?
Vi IMproved 8.0 (2016 Sep 12, compiled Mar 17 2017 12:13:35)
What version of vim-devicons are you using?
0.9.0
Are you using vim from the terminal or a GUI vim? Terminal
Are you using Mac, Linux or Windows? Linux
Bug
vim-airline has the feature to hide the expected file format and encoding (
g:airline#parts#ffenc#skip_expected_string
). This is very useful, since I'm only really interesting in the file format/encoding if it's NOTutf-8
+unix
. Using vim-devicons "breaks" this feature (the function checking the value is not called anymore or its return value is ignored?).Would be nice to a) check the value of
g:airline#parts#ffenc#skip_expected_string
or b) implement something equivalent in vim-devicons.The text was updated successfully, but these errors were encountered: