Synchronous editing of declaration/implementation of function/method lazarus / 9-Editor ---------------------------------------------------------------------- hinst · 2012-07-13 15:34 I know there is a way to rename both variables and types in Lazarus. (It is F2) It a useful feature, but what I also often want to do is to change procedure header. And since its declaration must be the same both in interface and implementation sections of the unit I always have to edit it twice. And I still can not figure out the way to automate this process in Lazarus. If there actually is such way at all. Well, if there is no, I would be quite surprised because when I press Ctrl+Shift+Up and Ctrl+Shift+Down it always detects correctly corresponding procedure headers both for classes and separate procedures and even if there are overloaded procedures/methods with the same name. Ctrl+Shift+C sometimes correctly changes implementation procedure header with accordance to interface procedure header, but it is far from perfect and often creates duplicate implementations instead of correcting existing ones. If you know what I mean... So... How do I synchro-edit headers of my procedures in Lazarus? Thank you for paying attention. ---------------------------------------------------------------------- Leledumbo · 2012-07-13 17:42 QuoteCtrl+Shift+C sometimes correctly changes implementation procedure header with accordance to interface procedure header, but it is far from perfect and often creates duplicate implementations instead of correcting existing ones.Actually, this is the best it can do since the heuristic cannot be perfect (it can be better than the current implementation of course). It cannot know whether you accidentally write a wrong parameter type only or you create a whole new procedure. ---------------------------------------------------------------------- Martin_fr · 2012-07-13 19:08 As for codetools: The best results will be if you do one procedure at a time. Such a Syncro Edit is currently not available. Nor planned (at least not in near future). Also Syncro edit is limited to one file, but declaration and implementation can be in different files (include files). But even, in a single file, it is a very specific use case, and a lot of work to do...