Bug #58867 Tab spacing not consistant
Submitted: 10 Dec 2010 14:38 Modified: 11 Nov 2011 2:24
Reporter: charl retief Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench: SQL Editor Severity:S3 (Non-critical)
Version:5.2.31 OS:Linux (Ubuntu 10.10 (64bit))
Assigned to: CPU Architecture:Any
Tags: \T, spacing, tab width

[10 Dec 2010 14:38] charl retief
Description:
Workbench running under MS Windows and Ubuntu Linux formats sql in the SQL Editor differently (this also applies to the routine editor window).

Workbench on MS Windows uses a tab size of 4 characters.
Workbench on Ubuntu uses a tab size of 6 characters.

Stored routines create under Windows versions later opened in Ubuntu has all its tab indentations converted to 4 x spaces.

PS: the syntax highlighting colours are also complete different :(

How to repeat:
1) Use Workbench under MS Windows
2) Create a stored routine
3) Make use of tab characters to indent your code
4) Note the # of spaces the tab equals under Windows:

/*
1234567890
	|<-- one tab ends here
*/

5) Save the routine

6) Now use Workbench under Ubuntu Linux
7) Open the same stored routine created in step 2-5
8) Now note the indentation of the tab characters created in step 3
9) Note the # of spaces the tab equals under Ubuntu:

/*
1234567890
	|<-- one tab ends here
*/

Suggested fix:
Make the tab size on all platforms consistent at 4 characters and/or create a setting in the "Edit" -> "Preferences" -> "Appearance" for "tab size" and "convert tabs to spaces".
[13 Dec 2010 8:34] Valeriy Kravchuk
Hm, in my case it is 3 positions on Ubuntu 10.04 and 4 positions on Windows XP. Anyway, it would be nice to be able to configure this.
[11 Nov 2011 2:24] Philip Olson
Fixed as of 5.2.36:

+        Tab spacing is now defined as <literal>4</literal> on the Linux
+        and Mac platforms, to be consistent with Windows.