ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Vim module - different settings for inline and block code
@ 2013-01-16 14:51 Marco Patzer
  2013-01-16 15:02 ` Wolfgang Schuster
  0 siblings, 1 reply; 5+ messages in thread
From: Marco Patzer @ 2013-01-16 14:51 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 714 bytes --]

Hi,

I need different settings for code in inline and block mode. See the
following example:

\usemodule [vim]
\definetextbackground [C] [location=text]
\definevimtyping [C]
  [syntax=c,
   before={\starttextbackground[C]},
   after=\stoptextbackground,
   margin=2em]

\starttext

This is C: \inlineC{int foo();}. \blank
\startC
int foo(){
  return 0;
}
\stopC

\stoptext

Inline code needs “location=text”, block code on the other hand
needs “location=paragraph” as text background setting. Sure, I can
create two environments “Cinline” and “Cblock”, but that feels
clumsy.

What's the proper way to set up different backgrounds for inline
and block code?

Marco

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 490 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-01-16 15:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-16 14:51 Vim module - different settings for inline and block code Marco Patzer
2013-01-16 15:02 ` Wolfgang Schuster
2013-01-16 15:39   ` Marco Patzer
2013-01-16 15:58     ` Wolfgang Schuster
2013-01-16 15:51   ` Aditya Mahajan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).