# [NTG-context] t-vim module: math in "normal" code and background color

Hi,

I have two questions with the vim module.

1. I want to use the math mode inside the code. I've seen the escape option,
e.g. here [1], but this seems to work only with comments. Is there a
possibility to use it directly in the code, too?

Minimal example:

\usemodule[vim]
\definevimtyping[python][syntax=python, escape=on]

\starttext
\startpython
# Returns \m{\sum_{i=1}^{n}i}
def sum_upto(\m{n \in \mathbb{N}})
r = range(1, \m{n} + 1)
return sum(r)
\stoppython
\stoptext


2. It would be cool, if I can define some background color for the code.
Unfortunately I'm very new to context and haven't seen a direct option. I
assume this is possible with some kind of extra environment around the code?

(I've subscribed the list, so you don't have to CC me.)

Gerion

___________________________________________________________________________________
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________