gu-fan / colorv.vim

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

Function to insert a color? #14

Closed sashahart closed 11 years ago

sashahart commented 11 years ago

: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?

gu-fan commented 11 years ago

I'm using :ColorV(<leader>cv) then choose a color and copy by yy , then close it and paste to buffer with p

The inserting is not added because format is not clear. Maybe I will add a batch of commands like cir,cih,cii,cin to insert RGB, HLS,'FFFFFF',ColorName...

sashahart commented 11 years ago

Thanks for the information. You are right that I can do it manually with \cv <...moving..> yy Q ""p. So, I don't have to type it or cursor over. It would be fun not to have to yy Q ""p (in other words, some key pastes current selected and closes the window so I can continue typing).

If it's a problem to choose a format, I think the best thing would be a command like:ColorVEditTo {args}, (e.g. :ColorVInsert {args}) so I can very easily bind it myself with whatever parameter I want.

gu-fan commented 11 years ago

feature added. ColorVInsert and <leader>cii