Author Topic: Tab size setting per project  (Read 17191 times)

Offline daniloz

  • Regular
  • ***
  • Posts: 268
Tab size setting per project
« on: December 12, 2012, 01:47:16 pm »
Hi All,

IIRC, this has already been discussed here, but I couldn't find it....

Anyway, is it possible right now to set customized tab size's per project?

The use case that I have is that I use codeblocks for several different projects interacting with several different groups, including the codeblocks community and its source code ;-), so I'd like to be able to get the correct tab size for each project, without having to change it every time.

Thx,
daniloz

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Tab size setting per project
« Reply #1 on: December 12, 2012, 02:02:56 pm »
Sorry I do not understand.
What exactly do you mean with tab-size ?

Offline daniloz

  • Regular
  • ***
  • Posts: 268
Re: Tab size setting per project
« Reply #2 on: December 12, 2012, 02:15:40 pm »
What exactly do you mean with tab-size ?
Sorry if didn't express myself clearly enough... In my head it was bright clear. ;)

TAB size for me is the size of the TAB key, in characters. I could only find the settings in "Settings / Editor / General settings / Editor settings / TAB options / TAB size in spaces".

But that's a global setting for all projects. I'd like to be able to set the TAB size in a per project basis.

Make sense now?

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Tab size setting per project
« Reply #3 on: December 12, 2012, 02:18:16 pm »
What exactly do you mean with tab-size ?
Sorry if didn't express myself clearly enough... In my head it was bright clear. ;)

TAB size for me is the size of the TAB key, in characters. I could only find the settings in "Settings / Editor / General settings / Editor settings / TAB options / TAB size in spaces".

But that's a global setting for all projects. I'd like to be able to set the TAB size in a per project basis.

Make sense now?

Yes, of course.
Sorry I had the editor tabs in my mind, don't know why.
The  human brain sometimes does funny things  ::) .

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Tab size setting per project
« Reply #4 on: December 12, 2012, 02:30:42 pm »
Not possible unfortunately.
You can probably try the EditorConfig plugin, but I'm not sure if it will work OK.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: Tab size setting per project
« Reply #5 on: December 12, 2012, 04:19:20 pm »
The EditorTweaks plugin allows you to set tabs on a per editor basis, but you have to set it each time you open a new editor (Edit->Editor Tweaks->Tab Size). It would probably be straightforward enough to adapt that code to do a per project setting (storing some tab info in the project settings file and checking for that setting every time the user opens a new project file).

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Tab size setting per project
« Reply #6 on: December 12, 2012, 07:50:25 pm »
Not possible unfortunately.
Wrong. It is possible.

You can probably try the EditorConfig plugin, but I'm not sure if it will work OK.
Thats the solution: The one in SVN I mean.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline p2rkw

  • Almost regular
  • **
  • Posts: 142
Re: Tab size setting per project
« Reply #7 on: December 12, 2012, 08:10:43 pm »
And is it possible to set different source formatter for one project? Actually it seems that source formatter doesn't  respect values setted in editor tweaks.

Offline daniloz

  • Regular
  • ***
  • Posts: 268
Re: Tab size setting per project
« Reply #8 on: December 13, 2012, 10:08:53 am »
Not possible unfortunately.
Wrong. It is possible.

You can probably try the EditorConfig plugin, but I'm not sure if it will work OK.
Thats the solution: The one in SVN I mean.
Indeed, works like a charm. Thanks!  :D

...and next question: In Notepad++ it's possible to define (globally) the TAB size for each different language (c++, html, java etc.), which I personally find very useful. Is it possible to do the same in codeblocks?

I know that using the EditorConfig I can workaround that by just defining the TAB size for each project individually. However, if a project uses more than one language, it would profit from the per-language setting.

Just asking... ;)

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Tab size setting per project
« Reply #9 on: December 13, 2012, 11:17:52 am »
Just asking... ;)
Not possible today, but it could be done by enhancing the editor config plugin.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ