gu-fan / colorv.vim

edit color easy
http://www.vim.org/scripts/script.php?script_id=3597
135 stars 12 forks source link

How do you actually pick colors? #12

Closed silouanwright closed 11 years ago

silouanwright commented 11 years ago

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

gu-fan commented 11 years ago

did the swatch change it's color when you click on palette? did yy in the colov window copy 'xxxxxx'?

gu-fan commented 11 years ago

and , do you have python support with vim

silouanwright commented 11 years ago

No I can't get anything to happen in that window... it shows up properly, everything looks fine but clicking / yanking does nothing. None of the keys listed do anything.

+python -python3

gu-fan commented 11 years ago

does :map yy show something like '@:call<SNR>_28_copy()<CR>'

silouanwright commented 11 years ago

@:call <SNR>32_copy()<CR>

gu-fan commented 11 years ago

well. then it should be working all right..

Does :function <SNR>32_copy show it's content.

Can commands like :ColorVName working?

I have no Mac currently and can not test through it.

silouanwright commented 11 years ago

The output of :function <SNR>32_copy:

function <SNR>32_copy(...)
    let fmt = a:0 ? a:1 : "HEX"
    let l:cliptext=s:hex2txt(g:colorv.HEX,fmt)

    if  a:0>1 && a:2=="\""
        call s:echo("Copied to Clipboard(reg\"):".l:cliptext)
        let @" = l:cliptext
    elseif a:0>1 && a:2=="+"
        call s:echo("Copied to Clipboard(reg+):".l:cliptext)
        let @+ = l:cliptext
    else
        call s:echo("Copied to Clipboard(reg\"):".l:cliptext)
        let @" = l:cliptext
    endif
endfunction   

Yes :ColorVName works fine... I get the list of colors along with hex values which have the background of the actual color.

So you haven't tested this on Mac at all..... but it "should be working all right"?

gu-fan commented 11 years ago

... I had tested it on a Mac OS with a virtual Machine and works fine. But that disk was formatted now.

Does the window show colored palette and swatches?

If does. put cursor on palette and use :call <SNR>32_set_in_pos() if does not put cursor in the window and use :call <SNR>32_draw_win('ff0000')

tell me if it works or not.

also set g:colorv_has_python to 0 to disable python to see if it works fine.

silouanwright commented 11 years ago

Doing :ColorVEdit on a color, going to a swatch in the pallete and doing :call <SNR>32_set_in_pos() actually switches the color in the palette it seems...as well as the other command... it however does not switch the color in my main window (the color I executed the original command on).

Doing let g:colorv_has_python = 0 in my vimrc causes colors to lose their highlighting, and executing :ColorVEdit on them renders

[ColorV] no color-text under cursor.
gu-fan commented 11 years ago

Well. :ColorVEdit will changes the color after you close the colorv window.

If it does. It's the mappings does not activated correctly in colorv window with some weird issues. And you can try remap them with :call <SNR>32_set_map() in colorv window to see if this works.

silouanwright commented 11 years ago

No it doesn't. Even though the color appears to be swapped, closing the window does nothing (even if I do :call <SNR>32_set_in_pos())

gu-fan commented 11 years ago

So the colors are showing in ColorV window, but nothing changed after you close it?

silouanwright commented 11 years ago

Yeah the palette and everything shows... nothing changes after I close it, and I need to do that command to get the little asterisk to go to another color.

gu-fan commented 11 years ago

well , I will try rewrite the call back function in next patch to see if it can be fixed.

sashahart commented 11 years ago

After some confusion about how to use ColorV, I found a workaround that works for me: I start with cursor over color, then I type :ColorVEdit or \ce. Now the window is up. I use space to select a new color. Then, I can hit Q or \cq to close the ColorV window, which updates the color in the document.

The color highlight doesn't update immediately for me (ref issue #13) but it's the right RGB code.

gu-fan commented 11 years ago

that's ok. #13 is fixed