Regexps in vim!
This took me like 10 minutes to get right. Just because of the slight differences between vim’s regexp and perl’s.
%s/context\["\([a-z]*\)"\]/context->\1/
However I need to this often when working with php, as more and more things seem to return stdClass objects (such as php5’s built-in json functions) and I always seem to write hundreds of lines of code assuming to use the formerly more common “smart arrays” of php. Syntactically though I must admit I much prefer the stdClass stuff.
