Can Lazarus support Auto-closing quota or parentheses? lazarus / 9-Editor ---------------------------------------------------------------------- blackangel · 2025-06-26 01:55 I can not found where the place set auto-closing quota or parentheses, does is it support? if not ,I hope it will be implemented in the next version. ---------------------------------------------------------------------- Martin_fr · 2025-06-26 06:11 Unfortunately it can't. It is a todo, but not yet clear if it will be done in time for the next version. You can however continue 'quote' text on the next line => I.e. when pressing return inside a string, then closing and opening quote for the newline can be added. See Tools > Options > Editor > Tab and Indent. ---------------------------------------------------------------------- Martin_fr · 2025-06-26 06:15 Actually you can create an editor macro, and bind it to the "(" key. Simplest form is to record the  the "()" (and caret one back) sequence, and replay it. But you can use PascalScript to customize it. https://wiki.freepascal.org/IDE_Window:_Editor_Macros https://wiki.freepascal.org/Editor_Macros_PascalScript ---------------------------------------------------------------------- Aruna · 2025-06-26 10:36 Quote from: blackangel on June 26, 2025, 03:55:33 amI can not found where the place set auto-closing quota or parentheses, does is it support? if not ,I hope it will be implemented in the next version. Hello @blackangel I've attached a ZIP file that demonstrates the functionality you want, though it's not integrated directly into the Lazarus IDE source editor. If this approach works for you, you can simply copy or cut from the demo and paste it into the IDE editor as needed. @Martin_fr what if we hook into the ide source editor then create a package as design-time only? I tried this but it is telling me stuff I do not yet fully understand. Last two screenshots attached will show you what I am looking at and  how do I fix please? ---------------------------------------------------------------------- Martin_fr · 2025-06-26 11:01 Quote from: Aruna on June 26, 2025, 12:36:33 pm@Martin_fr what if we hook into the ide source editor then create a package as design-time only? Hooking it into the editor is a bit more work. 1) It needs config for the user  - properties in SynEdit for the form designer  - Options in the IDE 2) What is a bracket? Depends on the HL. E.g. XML has <> 3) Should have (some basic) detection if the closing element already exist? 4) Make sure its one undo? Or should it be a separate undo, so if you did a closing bracket that you did not want. (Some word processors do that, e.g if the format certain text automatically) 5) Given the amount of options, in needs to be some form of add- on/plugin. So there could be alternative handlers, if users want that for their own code. Some points could be deferred, added over time. (5) however must be part of the initial implementation. Still, its overall not too complicated. But its sums up to take some time... ---------------------------------------------------------------------- Aruna · 2025-06-26 12:10 Quote from: Martin_fr on June 26, 2025, 01:01:35 pmQuote from: Aruna on June 26, 2025, 12:36:33 pm@Martin_fr what if we hook into the ide source editor then create a package as design-time only? Hooking it into the editor is a bit more work. 1) It needs config for the user  - properties in SynEdit for the form designer  - Options in the IDE Hmm... Quote from: Martin_fr on June 26, 2025, 01:01:35 pm2) What is a bracket? Depends on the HL. E.g. XML has <> That is true I never thought about this. Quote from: Martin_fr on June 26, 2025, 01:01:35 pm3) Should have (some basic) detection if the closing element already exist? 4) Make sure its one undo? Or should it be a separate undo, so if you did a closing bracket that you did not want. (Some word processors do that, e.g if the format certain text automatically) 5) Given the amount of options, in needs to be some form of add- on/plugin. So there could be alternative handlers, if users want that for their own code. Some points could be deferred, added over time. (5) however must be part of the initial implementation. Still, its overall not too complicated. But its sums up to take some time... What is the worst thing that can happen if I proceed with my experimentation flying blind ? I really do not want the ide to choke on me . I am going to open a new thread on how to add a plug-in that can hook-into the ide source editor and allow one to add features. Thank you for pointing out what to you must be obvious but to newbies like myself we miss all this... ---------------------------------------------------------------------- Martin_fr · 2025-06-26 12:19 Quote from: Aruna on June 26, 2025, 02:10:35 pmQuote from: Martin_fr on June 26, 2025, 01:01:35 pm1) It needs config for the user  - properties in SynEdit for the form designer  - Options in the IDE Hmm... Well at least an Enable/Disable. That applies for both, the IDE, but also the standalone SynEdit (though in the standalone, this will be solved by it being a plugin. Don add it, and you don't need to switch it off. QuoteWhat is the worst thing that can happen if I proceed with my experimentation flying blind ? I really do not want the ide to choke on me . I am going to open a new thread on how to add a plug-in that can hook-into the ide source editor and allow one to add features. Thank you for pointing out what to you must be obvious but to newbies like myself we miss all this... Well that depends how we proceed. - If a plugin is added to SynEdit (in the SynEdit package) - The IDE creates the plugin - The IDE has a disable/enable option Then that should be fine. ---------------------------------------------------------------------- Martin_fr · 2026-05-21 10:33 There has been progress in the meantime (for Lazarus 5.0) https://gitlab.com/freepascal.org/lazarus/lazarus/-/work_items/23884 See comments in the notes at the end of the issue.