I have started using Textmate for editing c source but seem to be unable to customize the indentation rules to match our code convention
Here is an example of I need indentation to work
void example_function() { short i, n = 10; for (i = 0; i < 10; i++) { do_something(i); }
do_completion(); }
I would even be happy to do without the regular c indentation rules, and have tried overriding them with empty patterns, but I still have a problem when I type the semi-colon to complete the do_completion() line as this line will get auto-indented to match the indent level of the loop block.
Thanks in advance for any help with this.
Simon
On 16. Mar 2007, at 17:01, Simon Olsberg wrote:
[...] Here is an example of I need indentation to work
void example_function() { short i, n = 10; for (i = 0; i < 10; i++) { do_something(i); }
do_completion(); }
I am afraid that indent style cannot be done with the current indent pattern possibilities.
I would even be happy to do without the regular c indentation rules, and have tried overriding them with empty patterns, but I still have a problem when I type the semi-colon to complete the do_completion() line as this line will get auto-indented to match the indent level of the loop block.
For that, remove the macro named “Insert ; and Indent Line” in the C bundle. This is what causes ; to trigger the indent.