Author Topic: Auto Indent?  (Read 8165 times)

qkr

  • Guest
Auto Indent?
« on: October 21, 2005, 12:17:35 pm »
When using auto indent, why does the program sometimes indent with tabs
and sometimes with spaces?? I would like to be able to select like "indent with tabs"
or "indent with spaces" and also select how many space characters I would like to
indent (and still have the option to manually define tab length).

So for example I could set "indent with spaces, 2 characters" and "tab length = 4 characters".
Or I could set "indent with tabs, tab length = 3 characters". This way I could choose if I want
to use spaces or tabs with auto indent, and if I wanted to use spaces for indent I could still have
the option to define tab length and use that for other purposes (comments etc).

-qkr

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4291
    • Code::Blocks IDE
Re: Auto Indent?
« Reply #1 on: October 21, 2005, 01:09:01 pm »
When using auto indent, why does the program sometimes indent with tabs
and sometimes with spaces??

It uses the exact same indentation used for the line above it.
As for the tab-size, set it in editor options...
Be patient!
This bug will be fixed soon...

qkr

  • Guest
Re: Auto Indent?
« Reply #2 on: October 22, 2005, 10:39:45 am »
You obviously didn't understand my post... I want to be able to choose whether auto indent uses
spaces or tabs. Currently it uses tabs when starting a new function but then again sometimes it uses
spaces when the line above it uses spaces. This results in a mixture of both which is not good.

-qkr

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9594
Re: Auto Indent?
« Reply #3 on: October 24, 2005, 12:00:20 pm »
I want to be able to choose whether auto indent uses spaces or tabs.
You can do this in the settings for the editor.

Hence what you are describing here has already been reported as bug in another thread. This phenomenon appears only on certain circumstances - e.g. {} consructs. Search the forum the reason.

mandrav is right as well, ones a tab has been inserted as tab the next line will behave the same.

Morten.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline takeshi miya

  • Lives here!
  • ****
  • Posts: 1487
Re: Auto Indent?
« Reply #4 on: October 24, 2005, 04:30:38 pm »
Yes, I fixed that bug long ago. Wait for RC2 :P