Home Download Buy Blog Forum Support

Whitesmiths Indentation Style?

Whitesmiths Indentation Style?

Postby martian on Thu Sep 29, 2011 4:07 pm

Is there a way to specify indentation rules regarding actual position of braces?

I know it's uncommon, but years ago I somehow picked up Whitesmiths style indentation and it would be nice if I was able to specify that braces are to be both indented.

Is there any way to do this through the application settings?

Whitesmiths Style:
Code: Select all
function zoink()
   {
   // yadda
   }
martian
 
Posts: 20
Joined: Thu Sep 29, 2011 4:03 pm

Re: Whitesmiths Indentation Style?

Postby jbrooksuk on Fri Sep 30, 2011 7:47 am

martian wrote:I know it's uncommon, but years ago I somehow picked up Whitesmiths style indentation and it would be nice if I was able to specify that braces are to be both indented.

WITCH! BURN HIM AT THE STAKE!!

But seriously, this isn't native to Sublime, however there are plugins which control indentation for variables etc, so I don't see why this wouldn't be impossible to implement as a plugin.
jbrooksuk
 
Posts: 688
Joined: Sun Apr 11, 2010 10:37 am
Location: England

Re: Whitesmiths Indentation Style?

Postby jbjornson on Fri Sep 30, 2011 7:49 am

jbrooksuk wrote:WITCH! BURN HIM AT THE STAKE!!


+1


:lol:
jbjornson
 
Posts: 335
Joined: Tue Oct 27, 2009 4:25 pm
Location: Zurich, Switzerland

Re: Whitesmiths Indentation Style?

Postby nathggns on Fri Sep 30, 2011 12:34 pm

jbrooksuk wrote:
martian wrote:I know it's uncommon, but years ago I somehow picked up Whitesmiths style indentation and it would be nice if I was able to specify that braces are to be both indented.

WITCH! BURN HIM AT THE STAKE!!

But seriously, this isn't native to Sublime, however there are plugins which control indentation for variables etc, so I don't see why this wouldn't be impossible to implement as a plugin.

+2
nathggns
 
Posts: 7
Joined: Fri Sep 30, 2011 12:15 pm

Re: Whitesmiths Indentation Style?

Postby martian on Fri Sep 30, 2011 4:09 pm

Believe me, it is my great shame. I even had someone refuse to work with me on a project unless I stopped.

I find it to be rather helpful. To me, the braces provide a clear representation of the current indentation level like saying >>here is the current scope<<

Anyway, thanks for the info that it's not a built-in feature, and I shall look into some of these plugins
martian
 
Posts: 20
Joined: Thu Sep 29, 2011 4:03 pm

Re: Whitesmiths Indentation Style?

Postby macjohnmcc on Thu Oct 04, 2012 6:05 pm

I'm late to the game but I share your shame and use that indentation style all the time on a large commercial product! (I started it).
I need a solution too as fixing the braces manually is annoying.
macjohnmcc
 
Posts: 4
Joined: Thu Oct 04, 2012 4:24 pm

Re: Whitesmiths Indentation Style?

Postby ctartamella on Tue Nov 06, 2012 5:18 pm

Anyone find a solution to this? Whitesmith is a standard where I work unfortunately.
ctartamella
 
Posts: 4
Joined: Fri Nov 02, 2012 7:55 pm

Re: Whitesmiths Indentation Style?

Postby O_W on Wed Feb 06, 2013 2:17 pm

I have been using the Whitesmith syntax without even knowing it for many years.

I started using it back in the days of Microsoft C for DOS and then nearly all coding examples I saw used this format.

I too find this notation easy on the eyes and easy to pick out the level of the code and blocks of similar code. The code is logically seperated and clean to read. My brain, limited as it is, does not have to think about matching braces or counting braces. Visually for me the code looks right and my brain can concentrate on the content.

I also would be very interested in Sublime supporting this syntax style.

Thanks
OW
O_W
 
Posts: 1
Joined: Wed Feb 06, 2013 2:10 pm

Re: Whitesmiths Indentation Style?

Postby larryblische on Thu Mar 07, 2013 10:32 pm

I vote for Whitesmiths indentation style too for the same reasons as those above. Used it since before MS-DOS days and for any C-braces style language such as PHP and Javascript too.

I am fairly new to sublime and might do a plugin. Is there any documentation on that or is it mostly learned by example?
larryblische
 
Posts: 1
Joined: Thu Mar 07, 2013 10:27 pm

Re: Whitesmiths Indentation Style?

Postby robertcollier4 on Fri Mar 08, 2013 6:35 am

Using a whole extra line for an opening brace? I have never been able to understand why anyone would waste the space and not use One True Brace Style. If there is a reason, please enlighten me. The beginning of a block can always be located because the "for" / "while" / "if" / "else" keyword should be highlighted - so then what is the reason.

More lines for the same code means more scrolling and less methods shown at screen at one time --> takes longer to navigate around in your code.
robertcollier4
 
Posts: 153
Joined: Sun Feb 24, 2013 5:37 pm

Next

Return to General Discussion

Who is online

Users browsing this forum: W3C [Validator] and 15 guests