gu-fan / colorv.vim Goto Github PK
View Code? Open in Web Editor NEWedit color easy
Home Page: http://www.vim.org/scripts/script.php?script_id=3597
edit color easy
Home Page: http://www.vim.org/scripts/script.php?script_id=3597
Hi Rykka,
I found some problem when starting vim with the environment without python.
It blame that error throws when function colorv#init..47_py_core_load.
I found some clue in the script autload/colorv.vim
line3492
:
call s:py_core_load()
It runs whenever g:ColorV_has_python is set.
I guess there is something mistake here.
For example, I put cursor over #FF0000 (nicely highlighted red) and type \ce.
Now I select a blue color and \cq. ColorV window closes. Good so far.
But at this point, the text is not highlighted, there is no preview color on it.
To update, I have to do something like: save, or enter and exit insert mode, or type \cpp.
Only then, the text is highlighted with the preview color.
Also, I don't need the whole buffer to update, just the swatch which I edited.
Did I do something wrong or would this be a new feature?
Here is the error message:
Error detected while processing function colorv#preview..<SNR>83_echo..neocomplcache#get_context_filetype..<SNR>245_set_context_filetype..neocomplcache#available_ftplugins:
line 1:
E121: Undefined variable: s:ftplugin_sources
E15: Invalid expression: s:ftplugin_sources
Error detected while processing function colorv#preview:
line 45:
E171: Missing :endif
I have checked out colorv source code, seems endif is not missing.
Then I disable neocomplcache plugin to test whether the error is on colorv. The result is error still over there after disabling neocomplcache plugin.
"let g:colorv_uppercase = 0"
does not work for me.
I get this value "#FF0000"
when edit/insert color, instead "#ff0000"
.
Can you add "g:colorv_lowercase = 1"
option? Or some like this "let g:colorv_uppercase = 0"
or this "let g:colorv_case = 'upper|lower'"
.
Thank you!
NVIM v0.2.0-989-g6fbcbeba
OS: macOS 10.12.4
$ make
gcc -g -Wall -o colorpicker colorpicker.c -export-dynamic `pkg-config --cflags --libs gtk+-2.0`
Undefined symbols for architecture x86_64:
"xport-dynamic", referenced from:
implicit entry/start for main executable
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [main] Error 1
gtk2 is installed:
$ pkg-config --cflags --libs gtk+-2.0
-D_REENTRANT -I/opt/local/include/gtk-2.0 -I/opt/local/lib/gtk-2.0/include -I/opt/local/include/pango-1.0 -I/opt/local/include/gio-unix-2.0/ -I/opt/local/include -I/opt/local/include/cairo -I/opt/local/include/atk-1.0 -I/opt/local/include/cairo -I/opt/local/include/pixman-1 -I/opt/local/include/libpng16 -I/opt/local/include -I/opt/local/include/gdk-pixbuf-2.0 -I/opt/local/include/libpng16 -I/opt/local/include/pango-1.0 -I/opt/local/include/harfbuzz -I/opt/local/include -I/opt/local/include/pango-1.0 -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include -I/opt/local/include/freetype2 -I/opt/local/include -I/opt/local/include/freetype2 -L/opt/local/lib -lgtk-x11-2.0 -lgdk-x11-2.0 -lpangocairo-1.0 -lgio-2.0 -lXrender -lXinerama -lXi -lXrandr -lXcursor -lXcomposite -lXdamage -lXfixes -lX11 -lXext -latk-1.0 -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lpangoft2-1.0 -lpango-1.0 -lgobject-2.0 -lglib-2.0 -lintl -lfontconfig -lfreetype
Hi,
I am switching from chrisbra/color_highlight to ColorV, because ColorV has many more cool features. However, there is one minor annoyance: when displaying color names (e.g. with :ColorVPreview
), the contrast between the fg and the bg colors is not always very readable.
For example, compare the highlighting of #ff014b between ColorHighlight and ColorV. ColorHighlight uses a "pure" white, whereas ColorV has less contrast.
So what about providing (possibly as an option) a stronger contrast between the fg and bg colors?
Hi,
ColorV opens several "list windows", e.g. with the ColorVName
command or the ColorVTurn2
one.
It would be great to have an integration with Unite (see Shougo/unite.vim
) for them. It would benefit from all the Unite features (easy filtering, lots of configuration options, customized actions on each list item, etc.).
Note that the pasela/unite-webcolorname
plugin already provides a Unite integration for color names (the equivalent of ColorVName
), but it would be great to have it directly in ColorV itself (and of course, to have other ColorV lists integrated too).
Every time I open a file with auto preview of colors, I get this distracting message:
[ColorV] 200 lines previewed. Takes 0.093565 sec.
Is there a way to disable it?
I found a mistake at the newest source file, autoload/colorv.vim(line 3783). the variable "file" is checked before defined.
It always trigger error message.
ColorV is awesome but I like to set my own bindings, and only for a subset of the commands. A great addition, I think, is a way to disable the bindings ColorV makes. (Leaving the user to manually bind the keys.)
:ColorVEdit is nice but if I want to put in a new color, I have to type it myself and then cursor over it and :ColorVEdit manually. Could there be a command like :ColorVInsert?
:)
A new issue.
I found it doesn't create cache file automatically when cache file not exists. So if the cache file not exists, there will be
error msg shown when vim startup.
Hi Rykka,
your plugin is great and has same very handy features which I missed in vim. I'm using MacVim in the version 7.3 with +python support and when I fire up mvim in the terminal I'm getting the following error message
[Error] Could NOT read cache file. Stopped.
Only setting:
let g:ColorV_no_python=0
prevented me from getting this error. The defaulr value for this option is
let g:ColorV_no_python=1
which says, I have no python support enabled for my vim-installation. I guess the best is to updated the documentation and/or the naming of the variable to:
let g:ColorV_python=0
Thanks for your help.
Matthias
I have no idea why gvim could not launch. howevery, after I remove colorv, gvim run fine.
myVimLog.zip
Double clicking on swatches, yanking, nothing works... I can open the window, but I don't have the slightest idea of what to do afterwards.
More info: I'm on OS X MOUNTAIN Lion, using MacVim Snapshot 64
So me and some other vim users like to do this inside of our vimrc, which breaks selecting colors in colorv.vim:
Map colon to semicolon, map semicolon to colon
" nn ; :
" nn : ;
" vn ; :
" vn : ;
As I reported in coc-snippets:
neoclide/coc.nvim#1283
It seems to be that this plugin uses <tab>
which breaks coc-snippets. Is there a way to fix this? I love this plugin and I would like to keep using it. Thank you for the guidance and advice.
I use pathogen to manage my plugins.
After I installed ColorV, I cannot open it.
I can't find the :ColorV command.
Should I add anything in my .vimrc???
While editing a CSS file, I discovered that #888888 was showing up as the wrong color when I ran :ColorVPreview. Instead of gray, it's showing up as a yellowish-green. #878787 also shows up as the same shade (almost) of yellowish-green, but #777777 shows up as gray. #898989 also shows up properly as gray. Other combinations show odd behavior as well: #8a8787 is gray, but #878a8a is green. The only pattern I've found so far is that the buggy behavior seems to be limited to color codes starting with 8, but I'm not even sure about that since #8a8787 turned out gray (as it should have).
I can reproduce this behavior on two different computers, one running Vim 7.3.429 on Ubuntu Precise and one running Vim 7.3.762 on Ubuntu Raring.
Hi,
I experience this issue with current master 2.5.1 version and colorv#dropper (spawning ColorPicker):
line 27:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib/python2.7/site-packages/gtk-2.0/gtk/__init__.py", line 30, in <module>
import gobject as _gobject
File "/usr/lib/python2.7/site-packages/gobject/__init__.py", line 26, in <module>
from glib import spawn_async, idle_add, timeout_add, timeout_add_seconds, \
File "/usr/lib/python2.7/site-packages/glib/__init__.py",line 22, in <module>
from glib._glib import *
ImportError: /usr/lib/libpyglib-2.0-python2.so.0: undefined symbol: PyExc_ImportError
vim: 7.3 1-294 version compiled with +python/dyn and +python3/dyn
python: v 3.2.2
os: linux 3.0-Arch x86_64
And many thanks for your hard work!
:wq! ;)
Traceback (most recent call last): File "", line 1, in File "/Users/CC/.vim/bundle/colorv.vim/autoload/colorv/colorv.py", line 229, in txt2hex for fm,reg in fmt.iteritems(): AttributeError: 'dict' object has no attribute 'iteritems'
if let g:colorv_has_python=0
,there's no error reported.
PS: My vim's compiled with python3.
There might be some error in the new version of the colorv from github.
After I updated the plugin, when I open my vim, I will get error message *'Invalid arguments for function has(reltime)'
When move cursor over color, show color in statusline instead
After an initial install of your plugin: when loading colorv, I get the following error:
[ColorV] Could not read cache.^@ Vim(let):E484: Kann die Datei /home/tom/.vim_colorv_cache nicht öffnen
(i.e. cannot open file).
I put the plugin into the directory '~/.vim/_bundle' and loaded it by adding that directory to &rtp and then calling runtime! plugin/colorv.vim
.
Hello, here is the error I get each time I launch vim.
Error detected while processing function colorv#init[28]..<SNR>28_py_core_load:
line 5:
-c:135: DeprecationWarning: Flags not at the start of the expression '\n \\b rgb[ ]?[' (truncated)
-c:142: DeprecationWarning: Flags not at the start of the expression '\n \\b rgba[(]\n' (truncated)
-c:149: DeprecationWarning: Flags not at the start of the expression '\n \\b glColor\\' (truncated)
-c:155: DeprecationWarning: Flags not at the start of the expression '\n \\b rgb[(]\n ' (truncated)
-c:162: DeprecationWarning: Flags not at the start of the expression '\n \\b rgba[(]\n' (truncated)
-c:169: DeprecationWarning: Flags not at the start of the expression '\n \\b hsl[(]\n ' (truncated)
-c:176: DeprecationWarning: Flags not at the start of the expression '\n \\b hsla[(]\n' (truncated)
-c:183: DeprecationWarning: Flags not at the start of the expression '\n \\b cmyk[(]\n' (truncated)
-c:189: DeprecationWarning: Flags not at the start of the expression '\n \\b hsv[(]\n ' (truncated)
-c:196: DeprecationWarning: Flags not at the start of the expression '\n \\b hsva[(]\n' (truncated)
-c:206: DeprecationWarning: Flags not at the start of the expression '\n ([#]|\\b0x|\\' (truncated)
-c:208: DeprecationWarning: Flags not at the start of the expression '\n [#](?P<HEX3' (truncated)
Press ENTER or type command to continue
Anyone else get it ? Or is it something in my python configuration
The following code has the word "embedded" in it. The "bedded" part gets highlighted by ColorVview even though it's not a color.
@font-face {
font-family: 'BlockBertholdRegular';
src: url('../assets/blockbe-regular-webfont.eot?#iefix') format('embedded-opentype'),
url('../assets/blockbe-regular-webfont.svg#BlockBertholdRegular') format('svg');
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.