News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Tab size setting per project

Started by daniloz, December 12, 2012, 01:47:16 PM

Previous topic - Next topic

daniloz

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

Jenna

Sorry I do not understand.
What exactly do you mean with tab-size ?

daniloz

Quote from: jens on December 12, 2012, 02:02:56 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?

Jenna

Quote from: daniloz on December 12, 2012, 02:15:40 PM
Quote from: jens on December 12, 2012, 02:02:56 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  ::) .

oBFusCATed

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!]

dmoore

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).
Python plugins: [url="https://github.com/spillz/codeblocks-python"]https://github.com/spillz/codeblocks-python[/url]
Code::Blocks Daily Builds -- Ubuntu PPA: [url="https://launchpad.net/~damien-moore/+archive/codeblocks"]https://launchpad.net/~damien-moore/+archive/codeblocks[/url]

MortenMacFly

Quote from: oBFusCATed on December 12, 2012, 02:30:42 PM
Not possible unfortunately.
Wrong. It is possible.

Quote from: oBFusCATed on December 12, 2012, 02:30:42 PM
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: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

p2rkw

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.

daniloz

Quote from: MortenMacFly on December 12, 2012, 07:50:25 PM
Quote from: oBFusCATed on December 12, 2012, 02:30:42 PM
Not possible unfortunately.
Wrong. It is possible.

Quote from: oBFusCATed on December 12, 2012, 02:30:42 PM
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... ;)

MortenMacFly

Quote from: daniloz on December 13, 2012, 10:08:53 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: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]