Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: daniloz on December 12, 2012, 01:47:16 pm

Title: Tab size setting per project
Post by: daniloz 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
Title: Re: Tab size setting per project
Post by: Jenna on December 12, 2012, 02:02:56 pm
Sorry I do not understand.
What exactly do you mean with tab-size ?
Title: Re: Tab size setting per project
Post by: daniloz 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?
Title: Re: Tab size setting per project
Post by: Jenna 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  ::) .
Title: Re: Tab size setting per project
Post by: oBFusCATed 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.
Title: Re: Tab size setting per project
Post by: dmoore 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).
Title: Re: Tab size setting per project
Post by: MortenMacFly 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.
Title: Re: Tab size setting per project
Post by: p2rkw 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.
Title: Re: Tab size setting per project
Post by: daniloz 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... ;)
Title: Re: Tab size setting per project
Post by: MortenMacFly on December 13, 2012, 11:17:52 am
Just asking... ;)
Not possible today, but it could be done by enhancing the editor config plugin.