Giter Club home page Giter Club logo

Comments (5)

ZyX-I avatar ZyX-I commented on July 22, 2024

Check (and set?) vim's laststatus option

Don’t do this. If I prefer statusline not to be shown sometimes it does mean I neither want to see this nor any notification. It does not mean though that I do not want powerline to be run at all.

Check $TERM to see if the terminal supports 256 colors and optionally display an error message or notice

Not $TERM (if we are talking about vim), but &t_Co. I think it is more common that 256-color terminal did not receive correct &t_Co (vim -u NONE, for example, has 8 colors for TERM=xterm which is default for konsole and xterm even though 256 colors work. They are properly detected only with TERM=xterm-256color.) then vim was launched in non-256-color terminal. Thus &t_Co is set to 256, but terminal does not claim to support this number of colors it may mean that terminal actually supports them. For me it is easier to set t_Co then to find out where default terminal name is configured in all the terminal emulators I may use. Don’t issue any warnings if used colorscheme utilizes only first 8/16/88 colors.

Since the new plugin is Python based, it could possibly check if the font that is configured is patched, and automatically select whether to use fancy symbols or fallback symbols

Wondering how you are going to get this information out of the terminal.

Only if the whole thing is disablable. I don’t want to increase startup time to do things that produce no outcome: I already have plugin startup time highly increased by the script that allows parallel populating of history (histadd() in a loop appears to be very slow in case called 20 thousand times: 0.7 seconds).

It would be better if all those checks are done only once in first session where new $TERM was used unless there were some issues that time.

from powerline.

Lokaltog avatar Lokaltog commented on July 22, 2024

Allright, scratch the laststatus point. I agree that we should be careful with that one. Also you're correct about &t_Co which we should check for vim. But what could we do with zsh/tmux themes to detect the terminal color capabilities?

Regarding the font stuff, it was just an idea I got while writing the issue, but yeah, it probably won't be possible. Would be cool if it was possible though. :)

I doubt that checking the contents of some env variables has a significant impact on startup time, but we could cache this info if it ends up delaying startup significantly.

from powerline.

ZyX-I avatar ZyX-I commented on July 22, 2024

But what could we do with zsh/tmux themes to detect the terminal color capabilities?

Don’t know anything about tmux, but in zsh colors work with incorrect $TERM just like they work in vim. Won’t be an issue if it is disablable.

from powerline.

Lokaltog avatar Lokaltog commented on July 22, 2024

We should definitely check for Python support in vim when the plugin is loaded, I've already received a couple of e-mails and an issue from people who don't bother to read the docs and then run into errors with the python command.

from powerline.

Lokaltog avatar Lokaltog commented on July 22, 2024

The structure of the project has changed significantly since this issue was opened and I don't think that it will be necessary to do a lot of checks during startup. It would probably be better to add this info to the installation part of the docs.

from powerline.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.