Author Topic: Getting rid of TAB and backspace  (Read 4294 times)

Offline Kayl

  • Single posting newcomer
  • *
  • Posts: 4
Getting rid of TAB and backspace
« on: December 08, 2005, 10:03:51 pm »
Hello everyone,

I hope this is the right place for that kind of question.

I would like to be forced to use one kind of indentation (like ANSI) and not be able to use my tab key.
The plugin AStyle is able to show me where I should ident but I don't want to have the choice.

I would like indentation to be automatic and transparent (I should not be able to change things) meaning the code I type is necessary, identation is just a for better reading and shouldn't use special characters for it.

So, is there any plugin or thing I can do in my code::blocks ? (I'm new in it).

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: Getting rid of TAB and backspace
« Reply #1 on: December 09, 2005, 11:07:21 am »
I would like to be forced to use one kind of indentation (like ANSI) and not be able to use my tab key.
The plugin AStyle is able to show me where I should ident but I don't want to have the choice.

I would like indentation to be automatic and transparent (I should not be able to change things) meaning the code I type is necessary, identation is just a for better reading and shouldn't use special characters for it.

I am not sure to understand. You would like the indentation to be fully automatic, so that when you type your code, this will be automatically formatted? And that you cannot modify this formatting later?

IMHO, I am not sure that it would be a good idea. Even if the AStyle plugin formats automatically my source code, I still prefer to have the possibility to modify the indentation (if I judge necessary).

May be you can add a new option to the AStyle plugin that disable the use of TAB.

Michael

Offline takeshi miya

  • Lives here!
  • ****
  • Posts: 1487
Re: Getting rid of TAB and backspace
« Reply #2 on: December 09, 2005, 11:12:33 am »
I think what Kayl wants is in Settings->Editor->General->TAB options.

Offline Kayl

  • Single posting newcomer
  • *
  • Posts: 4
Re: Getting rid of TAB and backspace
« Reply #3 on: December 09, 2005, 11:27:30 am »
>> I think what Kayl wants is in Settings->Editor->General->TAB options

I've been there already and that's not enough, I can still use my tab Key.

>> I am not sure to understand. You would like the indentation to be fully automatic, so that when you type your code, this will be automatically formatted? And that you cannot modify this formatting later?

Yes that's what I want. I type code exactly in the ANSI style so I know I won't need to change anything from time to time.

>> May be you can add a new option to the AStyle plugin that disable the use of TAB.
How ? (and backspace also because I don't want to be able to unident as well).

I know you can uncheck "backspace" unindents" but in this case it erases one space at a time. I just don't want to be able to erase anything when reaching the good ident level.
Space shouldn't be allowed if there is no character before.

For me identation is the same thing as design for web pages. The content is xhtml and the design is done by the css. Here I want my content to be usefull code, and indentation (as coloration) to be only customizable but have no link with typing the content.

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: Getting rid of TAB and backspace
« Reply #4 on: December 09, 2005, 11:37:07 am »
>> I think what Kayl wants is in Settings->Editor->General->TAB options

I've been there already and that's not enough, I can still use my tab Key.

Yes, I have tried too, but I still could use my TAB button :?. When de-selected, should not prevent the use of TAB?

>> May be you can add a new option to the AStyle plugin that disable the use of TAB.
How ? (and backspace also because I don't want to be able to unident as well).
May be, you can download the source code of the latest C::B SVN version along with the SDK and have a look at AStyle plugin source code. Or even add a new otpion in Settings->Editor->General->TAB options

Michael

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4291
    • Code::Blocks IDE
Re: Getting rid of TAB and backspace
« Reply #5 on: December 09, 2005, 01:14:43 pm »
>> I think what Kayl wants is in Settings->Editor->General->TAB options

I've been there already and that's not enough, I can still use my tab Key.

This option doesn't display the TAB key. It disables the use of the TAB character. If you uncheck "Use TAB character", when you press TAB then the configured number of spaces in inserted instead of one TAB (\t).
Be patient!
This bug will be fixed soon...