Coder Social home page Coder Social logo

Comments (8)

lifepillar avatar lifepillar commented on May 21, 2024 1

Ok, so a draft of this feature has landed in master! The current iteration looks like this:

Screenshot 2020-09-02 at 23 43 37

Many things have to be implemented yet (some are visible in the picture, others include adding counts to some mappings, additional panes, additional information about the current color, etc.), but the popup is working and usable. Edit: performance is acceptable, but can (and will) be improved with time.

Use :ColortemplateStyle or :ColortemplateStyle <higlight group> to invoke it, tweak your colors, yank them if you want (y), and close the popup (use X to revert your changes, x to close with the current colors). The details should be pretty intuitive, and a help pane can be opened with ?.

Ah, the screenshot above is taken from a 256-color terminal (you can tell that because the GUI color is not shown), but of course one should ideally work in an environment supporting millions of colors. Note that, in the current master, opening the popup in such environments raises some (harmless) errors, which I am going to fix soon.

from vim-colortemplate.

lifepillar avatar lifepillar commented on May 21, 2024 1

New iteration:

Screenshot 2020-09-04 at 10 25 27

What's new:

  • you can now increase/decrease the RGB bars at steps between 1 and 99 (just type the new step and press the arrow keys—the current step is displayed below the bars: it's 10 in the screenshot);
  • the type of color (foreground/background/special) is now shown in the title, next to the name of the highlight group;
  • the pane provides richer information: in particular, it shows the difference (Δ) between the GUI color and its best terminal approximation, and an evaluation of the quality of the GUI and terminal colors against the background of the highlight group. The latter is displayed using up to five stars;
  • the popup now keeps track of the position where it was last open.

See :help :ColortemplateStyle for the details!

from vim-colortemplate.

habamax avatar habamax commented on May 21, 2024 1

Helped me a lot, thx for the Picker!

from vim-colortemplate.

habamax avatar habamax commented on May 21, 2024

Looks awesome!

In Gvim I get minor "rendering" issue, probably due to font:

image

PS, command is not available till you open colortemplate file, I guess this is intentional :)

PPS,

it was linespace:

set linespace=-1
set guifont=JetBrains\ Mono\ NL:h14

making it either default or =0 fixes it.

from vim-colortemplate.

lifepillar avatar lifepillar commented on May 21, 2024

In Gvim I get minor "rendering" issue

Yes, and there are some others (like when ambiwidth is double). Your issue with linespace seems specific to Gvim, though; I cannot reproduce it in MacVim, for example.

I plan to make the bars customizable, eventually. It is probably sensible to provide at least an ASCII-only version. Suggestions for symbols to use are welcome.

command is not available till you open colortemplate file,

That's on purpose and documented. (:help colortemplate-commands). I want to keep this a pure filetype plugin. I do not want to pay anything, such as loading files from a plugin folder, when I am not using Colortemplate.

You can easily define a global mapping, e.g.:

nmap gc :<c-u>call colortemplate#style#open()<cr>

I should probably document this as well.

from vim-colortemplate.

lifepillar avatar lifepillar commented on May 21, 2024

In Gvim I get minor "rendering" issue, probably due to font

With the current master, you may use ASCII-only bars by setting g:colortemplate_slider_ascii = 1. Or define your own symbols with g:colortemplate_slider_symbols. See the help file.

from vim-colortemplate.

lifepillar avatar lifepillar commented on May 21, 2024

The style picker now remembers the 10 most recent colors (in the current session) and an arbitrary number of favorite colors (persistent across sessions):

Screenshot 2020-09-11 at 23 49 27

from vim-colortemplate.

lifepillar avatar lifepillar commented on May 21, 2024

With the added grayscale and HSB panes, plus lots and lots of refinements, the style picker is finally complete. A release will follow soon.

Screenshot 2020-09-19 at 21 51 58

from vim-colortemplate.

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.