On Tue, 2010-04-27 at 22:23 -0400, David McGlone wrote: > On Tuesday 27 April 2010 16:55:45 Ashley Sheridan wrote: > > On Tue, 2010-04-27 at 16:33 -0400, David McGlone wrote: > > > Hi everyone. > > > > > > I got a quickie LOL > > > > > > is there a way to auto indent code. I'm using Kate and I have it set so > > > the tab is only 4 spaces, but I was wondering if there was an easier way > > > than to have to hit the tab key 1x then 2x then 3x then 2x then 1x to > > > create nice laid out code like this: > > > > > > ----- > > > ----- > > > ----- > > > ----- > > > ----- > > > ----- > > > ----- > > > ----- > > > ----- > > > > > > or: > > > > > > function() { > > > > > > function here > > > } > > > > I use Kate too, and the indentation changed slightly in KDE 4. In the > > configure dialogue window, go down to the Editing section in the left > > menu and set the number of spaces to use in both the General tab (under > > Tabulators) and the Indentation tab (under Indentation Properties. If > > they are both different then you have to hit the tab key 4 times in > > order for your spaces to be replaced by a tab character. > > Thanks Ash. What is your preferences for indenting code? Do you have it set > so you don't have to hit the tab key at all? I set my numbers in kate to 4 > what about you? > > -- > Blessings, > David M. > I set it to use tabs of 4 spaces wide and use c-style indenting. It doesn't automatically indent as I write, but I find it a good thing that an editor doesn't change anything I write, as that is where problems can occur! I'm quite a fan of the Allman style of indenting, and Kate is able to line up the closing brackets for functions, etc if I type them out of position. Thanks, Ash http://www.ashleysheridan.co.uk