logo
IRC Archive / Freenode / #vim / 2009 / December / 20 / 4
Accolade
ok, it doesn't have a possessive quantifier, but vim regex DOES have non-capturing groups, right? RIGHT??
godlygeek
yep.
Accolade
phew :)
godlygeek
not sure what "possessive quantifier" refers to?
Accolade
godlygeek, that's greedy and not backtracking, normally written *+, can be implemented with atomic groups
godlygeek, so what does vim call non-capturing groups or what's the syntax
elik
aren't they atoms?
Accolade
ah, got it
\%\(
elik
Accolade, at any rate, it will be around that
godlygeek
:help /\%(
Accolade
it was shortly after \(, should've thought of that
I just searched :h pattern for /captur
derrida
what would be a good reference to use to help memorize the substitution regex syntax? i think i need something i can print out and be able to glace at
godlygeek
Accolade: if i understand what possessive quantifers do, :help /\@>
Accolade
right, \%(, not \%\(
derrida
i know them well enough that i hesitate to look things up and i think that it's not a good way hehe
Accolade
godlygeek, right, that's as close as it gets - that's atomic groups
godlygeek
well, then - vim can do it and the syntax just isn't as nice, right?
Accolade
kind of, yes. Like most things in regex, *+ is just syntactic sugar
in this case it doesn't save a whole lot, so yeah
derrida
godlygeek: colorchart.vim is really cool :)
and ... it shows how unbelievably fu*ked up my color cubes are .... o o
godlygeek: color6/color14 - cyan/brightcyan?
godlygeek
yep
derrida
i love the controls, very cool
where did these color charts come from?
(whales,clouds,cows,slices,ribbon)
derrida
hehe
do you use urxvt?
godlygeek
nope, i use xterm-256color
derrida
i might install that just to see how different things look
sometimes it's best to not mess with what's working though :)
godlygeek
quite, considering that the terminal supports 3 times as many colors. ;-)
Ken69267
my urxvt has 256 colors :>
derrida
hehe. sort of.
godlygeek
Ken69267: urxvt supports 256 colors only when compiled with a particular patch, and even then i know of no terminfo file that properly describes the resulting terminal that any distribution would know about.
derrida
godlygeek: how much effort do you think it would take for me to write a proper 256 color terminfo?
i guess i should start by studying the normal one
godlygeek
next to none. the issue isn't creating the trminfo, it's distributing it around so that the other machines you might connect to will know about it.
derrida
i'm root on the machines i connect to
but i still have never seen a proper terminfo. the xterm-256color terminfo running with urxvt cause loads of issues for me.
those xterm-256color profiles do not support unicode afaik anyway
godlygeek
well, for creating the terminfo, it's probably enough to just infocmp rxvt-unicode | sed -e 's/colors#88/colors#256/' -e 's/rxvt-unicode/rxvt-unicode-256color/g' >rxvt-unicode-256color.tic; tic rxvt-unicode-256color.tic
maybe sudo tic depending on the OS/distro
tic as a regular user works on every linux distro i've ever used, every other OS would require sudo tic.
derrida
godlygeek: do i need to export this TERM manually?
it still thinks it's rxvt-unicode
i do see the 6 color cubes though
omg. vim colors unbearable.
background is bright red
hehe
set term? > term=rxvt-unicode
hm
maybe i did need sudo
godlygeek
no, sorry
you'd still need to tell urxvt to set $TERM to rxvt-unicode-256color
derrida
do i need to somehow compile it show it will show up in /usr/share/terminfo/r/
godlygeek
urxvt -tn rxvt-unicode-256color
nope, on linux it's enough for it to show up in $HOME/.terminfo/r
derrida
ah
i was just in $HOME :)
does it remain with the .tic extension?
the others are +x and no extensions
godlygeek
uh, no - it shouldn't have a .tic extension...
derrida
i think something didn't work right
hehe
(Action) checks his work
godlygeek
does infocmp rxvt-unicode-256color show a terminfo file with colors#256 in it?
derrida
no
infocmp: couldn't open terminfo file /usr/share/terminfo/r/rxvt-unicode-256color.
thats why i was hunting around there
hehe
godlygeek
nah, don't worry about the error...
but... that does still mean it can't find the file in $HOME/.terminfo ... so... something went wrong.
derrida
infocmp rxvt-unicode | sed -e 's/colors#88/colors#256/' -e 's/rxt-unicode/rxvt-unicode-256color/g' > rxvt-unicode-256color.tic
thats the line i did
oh
.tic ...
or is that correct?
godlygeek
that creates a file that contains the input tic needs.
now, you need to run tic rxvt-unicode-256color.tic
derrida
yeah, doesn't seem to be working :\
godlygeek
does the file look... right?
derrida
it does actually hehe
i'm turning up tic verbosity
godlygeek
well, you can always try sudo tic rxvt-unicode-256color.tic and then see if infocmp rxvt-unicode-256color.tic works...
derrida
there we go
hehe
http://dpaste.com/135680/
hm, strange line breaks maybe
http://dpaste.com/135681/
godlygeek
ah
derrida
i'm very curious about line 6
godlygeek
i found the problem...
you copied and pasted wrong. ;-)
derrida
ofc
godlygeek
did you ever run it with sudo?
derrida
yeah
godlygeek
ok. well, then you broke your 88-color rxvt-unicode terminfo file... heh
derrida
<3
haha
no big deal
the problem was not copying and pasting
godlygeek
see the typo: -e 's/rxt-unicode/
derrida
as in, i typed it by hand
haha
omg
so, i should probably remove rxvt and reinstall before proceeding?
since that profile got clobbered hehe
godlygeek
no, don't do that
derrida
ah this is why we didnt mess with /usr/share?
godlygeek
we can still fix it; the only thing that got clobbered was colors#88 got changed to colors#256
derrida
oh ok
godlygeek
well, it's certainly one of the reasons, heh
derrida
nice that worked
godlygeek: are the cubes unfolded?
:)
in colorchart.vim
godlygeek
yeah - hard to display something 3 dimensional otherwise. ;-)
derrida
i'm on fire tonight
well, i guess i mean, they are not in a row
godlygeek
not sure what you mean by "in a row" ...
derrida
i'm gonna send you a screenshot, my terminal might still be misbehaving
http://omploader.org/vMzFmZw
godlygeek
no, that's perfect... except that you seen to have cursorcolumn set, which doesn't play too nicely with colorcube.vim... haha
derrida
i need to figure out which setting is setting things to underline instead of background hilight hehe, excuse that :)
hehe
that's a very useful plugin for creating themes
godlygeek
nope, it points out that i should probably unset cursorline and cursorcolumn in the plugin, heh
the idea was stolen from a Dr. Chip plugin, which is actually able to create colorschemes...
derrida
Dr. Chip?
godlygeek
vimgor: dr chip
vimgor
Wish I knew.
godlygeek
vimgor: dr. chip
vimgor
No idea.
godlygeek
vimgor: drchip
vimgor
Dr Charles E Campbell is a pretty nice guy who gives a lot to the vim community, but who's prolific scripts are a 50-50 split between good idea horribly implemented and bad idea even more horribly implemented
derrida
lmao
i had tried another color plugin sort of sounds like that description :)
godlygeek: would it be possible to press enter on a color to write the hex into the X selection buffer?
godlygeek
yeah, that would be possible. :)
derrida
this interaction must have been .... mindbending
getting it to work so well
godlygeek: maybe i'll hack around and send you a patch if i get that working. makes a pretty badass color picker :)
godlygeek: i would use it with gimp for sure :)
che_
hi
derrida
hi che_
woops! :)
Guest85006
hi derrida
godlygeek
should be simple to do. just a :map on <CR> that copies one of the colors.. but, which one? xterm? konsole? term?
derrida
i *think* xterm clone
oh yeah super easy
godlygeek: could i use visual mode to select the word after clones: using a word boundary?
i'm not sure how to code the copying part
godlygeek
give me one sec.
derrida
take your time, i'm doin other stuff here too no worries
godlygeek
derrida: :nnoremap <CR> :let @* = substitute(filter(getline(1,'$'), 'v:val =~ "^Color"')[0], '.*\(#\x\{6}\).*', '\1', '')<CR>
derrida
the let statements are ... awesome
they're nearly stereograms
godlygeek
haha, that should do the trick, though i'm sure there are better ways to do it.
derrida
i see two distinct animals in one as well ;) lmao
works great
i added it into colorchart.vim
omfg, on the 88 color term these weren't like this at all
rofl
i think it's time for bed
(Action) makes the connection that cows are animals
godlygeek
heh, indeed they are.
derrida
godlygeek: i'm going to make a new color chart and then go to bed :)
godlygeek: thanks for the help again. i'll use this daily.
godlygeek
hehe, if you say so. i'm glad someone will have a use for it, haha
derrida
btw, it might be an interesting visual effect to set all the color blocks to _ like the way the cursorcolumn line became
hehe
well, for people who like to work in a terminal mostly, picking colors is a pita
i have a little paperback i end up using which isn't very fun either
godlygeek
derrida: try searching for /_/
assuming that you have hlsearch set
derrida
it turns them on in the cursorcolumn .. bold i think
probably my theme
godlygeek
right, but - if you have hlsearch set, you can search for /_/ and see that every colored block is just an _
derrida
hm
onlh wow
it was the the theme
because the _ is the same color so it blends the easiest?
godlygeek
derrida: because it's the smallest, so it makes it least obvious that there need to be some character in that square for the magic to work.
derrida
godlygeek: are the color charts just different representations of the cube?
(Action) makes the connection that the "whales" chart are supposed to be whales and not a paper cube unfolded
lmao
thats what i was asking about before, i didn't realize those were supposed to be whales and was thinking .. ehmm i didn't know cubes unfold that way?? hah
i assumed these charts were named after various color theorist with animlistic names!
godlygeek
heh, i would never known what you meant if it weren't for the screenshot
derrida
so funny
who came up with these?
i mean, are they historical or drchip hehe
godlygeek
the cube shapes? arbitrary.
just different shapes to arrange 216 colors into.
derrida
those shapers are arbitrary?!
shapes