Page 1 of 1

CTRL-M for octothorps

Posted: Thu May 23, 2002 5:45 pm
by Peter Bradshaw
I occasionally need to find my way among lots of nested pre-processor conditionals (#if and kin ). It would be nice it there was a CTRL-M like function to work with octothorps (#). Then #if, #ifdef and #ifndef would be akin to an opening bracket and #endif akin to a closing bracket while #else and #elif would be ignored. Don't see an easy way to do it. Am I missing something obvious?

Re: CTRL-M for octothorps

Posted: Sun Jun 02, 2002 11:32 pm
by N. Demos
There is a control-M function in Textpad 4.5, but it doesn't work with #if etc.

If you want to be able to jump to a matching pre-processor delimiter, you might try using commented brackets (I'm assuming this is C/C++ code).

Example:
#if (Statement) // {
#if (Statement) // {
...
#else
...
#endif // }
#else
...
#endif // }

For existing code, this could be easily implemented with the Replace Tool

Regards,
N. Demos