Recent

Author Topic: Real Tabs in IDE (Where did it go in the settings?)  (Read 2072 times)

PryDev

  • Newbie
  • Posts: 3
Real Tabs in IDE (Where did it go in the settings?)
« on: April 21, 2019, 10:04:08 pm »
Since the update in February, which deleted all my settings... thanks... :( ... I have been trying to get settings back to normal. The one that I have been having trouble with for a while is getting real tabs. The IDE is converting all code into space characters instead of the tabs spaces which must be there. There use to be a setting in the settings page to use real tabs, but I can't find it anymore. How do I set it to use real tab characters instead in the new version?

Handoko

  • Hero Member
  • *****
  • Posts: 5129
  • My goal: build my own game engine using Lazarus
Re: Real Tabs in IDE (Where did it go in the settings?)
« Reply #1 on: April 21, 2019, 10:19:07 pm »
Hello PryDev,
Welcome to the forum.

Have you tried:
Lazarus main menu > Tools > Options > Editor > General > Tabs and Indents

PryDev

  • Newbie
  • Posts: 3
Re: Real Tabs in IDE (Where did it go in the settings?)
« Reply #2 on: April 22, 2019, 10:52:57 am »
I have "Smart tabs" and "Tabs to spaces" unchecked and tab width set to 2, but when I then press tab a couple times in the editor, and then hit the back arrow, it moves back a single space with each back arrow instead of going back a tab. I feel so confused.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9791
  • Debugger - SynEdit - and more
    • wiki
Re: Real Tabs in IDE (Where did it go in the settings?)
« Reply #3 on: April 22, 2019, 11:03:31 am »
First off all enable Editor > General > Miscellaneous: "Show special chars"
So you can see what is inserted.

Then check your setting for trim trailing spaces (Miscellaneous). If enabled, then its "style" should be "Leave line".
http://wiki.lazarus.freepascal.org/IDE_Window:_Editor_Options_General_Misc#Trim_spaces_style

When NOT using the tab key directly:
- For when you press return, you need to set "auto indent" to use tabs, or copy from line above.
- Block/Selected-lines indent: also has its own setting
Both on the tabs and spaces page.

Handoko

  • Hero Member
  • *****
  • Posts: 5129
  • My goal: build my own game engine using Lazarus
Re: Real Tabs in IDE (Where did it go in the settings?)
« Reply #4 on: April 22, 2019, 11:06:20 am »
I have "Smart tabs" and "Tabs to spaces" unchecked and tab width set to 2, but when I then press tab a couple times in the editor, and then hit the back arrow, it moves back a single space with each back arrow instead of going back a tab. I feel so confused.

Not very sure, but I think you also need to disable Auto Indent.

PryDev

  • Newbie
  • Posts: 3
Re: Real Tabs in IDE (Where did it go in the settings?)
« Reply #5 on: April 24, 2019, 03:34:54 pm »
Finally figured out the issue. In Editor›General, I have to select "Caret skips tabs" or else one can step through a tab as if it were spaces. So, I had tabs all along, but it just looked like it were spaces because I could key through them as if they were spaces. (The suggestion of Martin about showing special chars hinted that i should have had tabs all along, so something further with how it was treating the tabs was off kilter.)
Many thanks for helping me out, this was really baffling me for a while, and I'm happy things behaving the way it was before. :)

 

TinyPortal © 2005-2018