From: Mike D. <md...@je...> - 2005-10-29 16:22:31
|
begin Thomas Hygum quotation: > Now I have done 3 things, and it keeps indenting: > > 1) Set indent to 0 in global options/editing > 2) Set tab to 0 in global options/editing Zero is not an accepted value for these fields. If you look at the code in JEditBuffer.java, you'll see that setting these values to 0 makes them both default to 8 (see the getTabSize() and getIndentSize() methods). Honestly, setting these to zero doesn't make much sense anyways, since they don't control whether or not jEdit auto-indents. Unfortunately, I'm not familiar enough with the current indent system to tell you what to change to get the behavior you want. I'm pretty sure the behavior you're describing is controlled by the "indentOpenBrackets" property for the mode, but I don't know if there is a simple way to stop jEdit from looking at that property. Looking at the initIndentRules() method in JEditBuffer and how it is called from Buffer, I'm not sure this can easily be toggled on and off since jEdit seems to unconditionally check about 10 properties that can be defined at the global, mode, or buffer levels. I don't think overriding all those properties is a great idea and I doubt it will affect files with buffer-local properties, since those will override any global or mode properties you've set locally. -md |