Comments (8)
Ok, so a draft of this feature has landed in master! The current iteration looks like this:
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.
New iteration:
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.
Helped me a lot, thx for the Picker!
from vim-colortemplate.
Looks awesome!
In Gvim I get minor "rendering" issue, probably due to font:
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.
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.
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.
The style picker now remembers the 10 most recent colors (in the current session) and an arbitrary number of favorite colors (persistent across sessions):
from vim-colortemplate.
With the added grayscale and HSB panes, plus lots and lots of refinements, the style picker is finally complete. A release will follow soon.
from vim-colortemplate.
Related Issues (20)
- Variant: 0 HOT 1
- cterm definitions for templates with dark and light backgrounds HOT 5
- Feature request: change meaning of term=/t= and add cterm=/c= HOT 2
- Commit `c7f0542` breaks compilation of vim-solarized8 HOT 3
- New highlight group added: CurSearch HOT 1
- alternative to changing saturation? HOT 3
- Invalid expression error when loading colorscheme HOT 3
- Neovim error for option balloonexpr HOT 3
- :h CTRL-L shadows built-in tag HOT 1
- Handling multiple palettes in a single template for a given background HOT 3
- gitignore tags file? HOT 5
- Verbatim is copied once for every variant HOT 3
- E518: Unknown option: <truncated file path> HOT 5
- Help moving Colortemplate v3 into production HOT 5
- Q: Can you elaborate on the Neovim compatibility directive? And why doesn't it exist in v3? HOT 5
- Not working in Neovim HOT 4
- "Unexpected token" from imported file HOT 1
- Allow color index to be in the range [0, 15] for the 256 variant? (v3) HOT 8
- The `Check` interface seems to disallow scrolling down (v3) HOT 2
- Higlight group definitions with discriminators and without variant restrictions check `has('gui_running')` (v3) HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vim-colortemplate.