Hello everyone,

I don’t know whether this is a common kind of need that has already been met a 
thousand times, so please enlighten me either way.

Instead of typing certain repetitive (and dynamic) content into a file, I would 
like to use some kind of a “super include” (for BBEdit, of course) that would 
integrate the actual contents of a custom header file as a “normal” part of the 
file.


Sure, in C-like languages, I can use #include to tell the preprocessor to 
include the contents of another file for the preprocessor’s own uses, BUT the 
challenge is that the reader has to go to the referenced file to see what the 
contents are.

I would like to make it as easy as possible for the readers of ANY file that 
they open, so they can see, immediately, the contents of the “custom” header 
file. Please keep in mind that the custom header file’s contents are dynamic 
and I would rather change the contents ONCE rather than make the changes myriad 
times on specific files, if I have “hardwired” such content into each file.

Here is an example.


Suppose I have a “custom header” file foo.h like this:

/// @file foo.h

// Hi:
//
// These are the contents of
// interest, which I keep in some external file.


and a “regular” file such as whatever.c (which contains a presumptive 
//xyzBBEdit “foo.h” to ask that the contents of foo.h be explicitly included) 
like this:

/// @file whatever.c

#include “whatever.h”     // This is the standard C preprocessor #include

//xyzBBEdit “foo.h”       // Something like this is what I would like to be 
able to use

void whatever (void);


Ideally, after having saved file whatever.c, opening it in the future should 
magically render like this:   

/// @file whatever.c

#include "whatever.h"

//xyzBBEdit "foo.h"
/// @file foo.h

// Hi:
//
// These are the contents of
// interest, which I keep in some external file.

void whatever (void);


Any ideas?

Thanks.

Alfredo










-- 
This is the BBEdit Talk public discussion group. If you have a 
feature request or need technical support, please email
"supp...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: <https://www.twitter.com/bbedit>
--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to bbedit+unsubscr...@googlegroups.com.
To post to this group, send email to bbedit@googlegroups.com.
Visit this group at https://groups.google.com/group/bbedit.

Reply via email to