Add 'tab size' option

Hi!

The best decompiler I've ever seen!

I would like to offer a suggestion to increase usability: add a ‘tab size’ option.

I use tab size equals to 2 and your product interprets it as being 4. This makes my code misalign.

Thanks for the superb product

Eduardo Quintana

6 comments
Comment actions Permalink

Hi Eduardo,

I have created a request for this feature, we'll consider it for future releases. Feel free to vote and/or track its progress.

0
Comment actions Permalink

I would like this too, since I always use 3.

0
Comment actions Permalink

Will vote for it until YT is available again:

YouTrack maintenance in progress.

We are currently updating the server.

Sorry for the inconvenience.


This page will be reloaded automatically as soon as YouTrack is ready.

0
Comment actions Permalink

Tab size 3 is a bit exotic but OK of course when using tabs for indention so that each developer/programmer can read the code which her/his prefered indention B-)
(always writing my code in a way so that it aligns well regardless which tab size is used)

Just vote at http://youtrack.jetbrains.net/issue/DOTP-997

Thanks!

0
Comment actions Permalink

I started using an indent of 3 in 1980 or so.  I was using PL/I and have stayed with the "Algol familly" of languages or derivatives like SAS.  In all of these languages the main blocking logic language element is the IF statement.  The block that belongs to the IF follows it.  Since most blocking is on IF, most blocks start with "if ".  Note that space after the IF.  If the subsequent block is indented by 3, then the first non-blank character of each of the lines in the block line up with the first non-blank character after the if word.  Consequently you end up with vertical alignment of all statements with only the IF word protruding.  This lets your eye easily spot the if words which stand out from the rest.  So your eye can easily move down the code and spot the blocks without having to parse through "ragged edged" code (which indent of 2 or 4 creates).

So my code looks like this:



if something then do begin
   more
   and more
   and more
   end;
if somethingelse then do begin
   more and
   more
   and more
   end;
if somethingelse then do begin
   more and
   more
   and more
   end;



(not sure if this indent will stay when this is posted)

If you hold up a piece of paper against the screen you can align the left edge of the paper with the first word after the IF such that ONLY the IF words stand out.  Then you can see the blocks better.  So I find it MUCH easier to spot the various blocks of code without really having to read any words or do any mental parsing of lines.

I think this is even easier to read if vertical white space is used.  Like this:

if something then do begin
   more
   and more
   and more
   end;

if somethingelse then do begin
   more and
   more
   and more
   end;

if somethingelse then do begin
   more and
   more
   and more
   end;

Another common blocking word is DO and the same thing applies since it is 2 characters also.

Even when the first word is NOT an IF, it still stands out more because it "stands out" by breaking that vertical alignment of words.

In other words, I like indent of 3 and it is very important to aid readability, imho.

Thanks for considering the option.

0
Comment actions Permalink

OK, that explains why you're prefering tabsize 3 :). Also started in the late 80's programmign in Pascal, followed by C and C++ ... ;) but starting using tabsize 2

I assume that that language does not have keyworkds like REPEAT, WHILE, etc.?

But I am not sure if tabsize 3 has lot of advantages in the C# world:

// C#
if (condition) {
   SomeMethod();
}

// C#
if (condition)
{
   SomeMethod();
}

(* Pascal *)
if (condition) then
begin
   SomeMethod();
end;

# "your" language sample
if condition then
begin
   SomeThing;
end;


Never mind. It is OK of course using your prefered tab-size even in C# ;-) As long you're using tabs for indention each other developer can view/read your code in his prefered indention size.

Thanks again to the JetBrains people provide dotPeek for FREE and considering implementing suggestions from us.

0

Please sign in to leave a comment.