I am trying to insert code in a ConTeXt document, so I tryed to use the vimtyping module. It works well for text blocks, but not for inline text, since it makes a new line. Here is my MWE:


The block works
  def function(foo):  # test
      a = foo
But the inline writing of \inlinepython{def function} makes new lines.

Is there an option I need to activate to use this module inline macro ?

  • Leave out the before and after options. – Henri Menke Jul 16 '16 at 10:50
  • Can you make a detailed answer so I can validate it as ok ? It would be better than if it is I who answers... – A. Licari Jul 16 '16 at 18:57

There are spacebefore and spaceafter keys that you should use to set up spaces.

This is not a bug, but is due to misconfigured defaults. The before and after values are used only when you use \start<vim-typing> ... \stop<vim-typing>; when you use \inline<vim-typing>, left and right keys get used.

But, in t-filter, I had defined:


So, the default values of left and right were same as that of before and after. So, to avoid the wrong behaviour, add:


so that left and right keys are set to be empty.

NOTE: Actually, I had fixed this bug a while back, but modules.contextgarden.net is down; so I haven't been able to update the module in the distribution.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.