Author Topic: Auto-Insert symbols, auto-indent issues  (Read 2754 times)


  • Newbie
  • Posts: 4
Auto-Insert symbols, auto-indent issues
« on: January 17, 2015, 07:03:22 pm »
I was using Notepad++ up until now with FPC rigged into the Run submenu.

It was decent but took a few extra seconds to run a program after I've made some changes, so I decided to switch to Lazarus.

However, I have difficulties restoring some features that were present in Notepad++ into Lazarus.

For example, in N++, if type in certain symbols just like these: ( { [ ' it would automatically insert the "ending" symbol for them right next to them, making {} () and all that using just the first character. I was looking for something like this in the settings, but couldn't find anything.

Also, where can I set the tab size for auto-indent? It defaults to 2 spaces, but when I set the tab width in the settings, it doesn't seem to be affecting it at all.


  • Administrator
  • Hero Member
  • *
  • Posts: 6821
  • Debugger - SynEdit - and more
    • wiki
Re: Auto-Insert symbols, auto-indent issues
« Reply #1 on: January 17, 2015, 09:20:08 pm »
The auto closing of brackets does not exist. You can record a macro

record {} and the cursor left key, so you are in the middle of the 2 brackets.

Move the macro to the IDE section (see wiki) and assign a key ("{")

As for indent, there are 2 ways of indent, one is in the codetool section, and it does some "smart/heuristic" stuff. So you need to deactivate it to have other settings take effect.

Then you can specify what tab should do (insert n spaces, or a tab, or a mix)

"smart tab" goes to below the next word in the line above

return copies the existing indent. If you want automatic extra indent after begin, then you need the codetool intend. (it uses a template file to figure out what to do)


  • Newbie
  • Posts: 4
Re: Auto-Insert symbols, auto-indent issues
« Reply #2 on: January 19, 2015, 11:12:48 am »
Thank you for your answer!

Well, I decided to go back to NP++ for the time being. Mainly because I haven't even learned vanilla Pascal yet, and I feel more comfortable in that editor (the auto-insert for Begin..End is really cool in Lazarus though, tried to implement it in NP++ as well).

When I feel like I've conquered vanilla command-line Pascal and want to get into ObjectPascal, Lazarus will be  the best choice.


TinyPortal © 2005-2018