Bug 102705

Summary: Automatic reformat-source when opening file
Product: [Applications] kdevelop Reporter: Christian Sp. <hkubus>
Component: AstyleAssignee: kdevelop-bugs-null
Status: REPORTED ---    
Severity: wishlist    
Priority: VLO    
Version: 3.1.2   
Target Milestone: ---   
Platform: Debian testing   
OS: Linux   
Latest Commit: Version Fixed In:

Description Christian Sp. 2005-03-29 01:39:32 UTC
Version:           3.1.2 (using KDE KDE 3.3.2)
Installed from:    Debian testing/unstable Packages

Hi there,

it would be great if there would be an option to let KDevelop automatically reformat source files when opening them. This would really help if you have to deal with a lot of unformatted/badly formatted sourcefiles (so far, you have to do Edit->ReformatSource everytime you open a new file). This feature would also be great if you work together with people who prefer different styles of source formatting.

I think this option would fit somewhere in:
Settings->Configure KDevelop->Source Formatter


PS: keep up the good work ;-) kdev is getting better and better ...
Comment 1 Megan Webb 2006-12-09 03:13:41 UTC
Kdevelop 3.4 branc revision 611652.

There is a button in Project/Project Options/Formatting/General/"select and format". Allows to select a large number of files and format them all with the current project settings. So can format a large number of files at once..

Comment 2 Milian Wolff 2010-06-15 23:37:32 UTC
tempted to close as invalid, noone should blindly run astyle on any project... decreasing prio for now.
Comment 3 Andreas Pakulat 2010-06-16 00:10:45 UTC
Certainly not astyle, but if you'd have a formatter that really knows about the source code (instead of trying to apply some regex-parsing) then this could be useful. In fact with Eclipse I've used their auto-reformat-on-save until I've discovered that their alignment rules for arguments are pretty broken (and not configurable). This made sure that whatever I type, it always ended up with the right formatting and I don't have to care about the layout of the code.