Home Download Buy Blog Forum Support

Whitesmiths Indentation Style?

Re: Whitesmiths Indentation Style?

Postby mwb1100 on Fri Mar 08, 2013 11:33 pm

This is probably not the place for yet another brace placement war.

The fact is that some people or code will use a brace style that you dislike for whatever reason (they might just like it, or they might hate it but are forced to use it because of some requirement). Some people might even dislike the brace style that you prefer, even if as far as you can tell there's absolutely no defect in it.

Whitesmiths is common enough that ST should support it.
Posts: 54
Joined: Mon Jun 25, 2012 5:40 pm

Re: Whitesmiths Indentation Style?

Postby vanRijn on Sat Mar 09, 2013 4:28 am

So, people have said that it is possible to do this with a plugin, but I haven't seen anyone point to how exactly to do it. Can someone please give some guidance on how one would go about writing a plugin that formats code this way?
Posts: 9
Joined: Tue Feb 05, 2013 6:55 pm

Re: Whitesmiths Indentation Style?

Postby handycam on Sun Mar 10, 2013 12:15 am

robertcollier4 wrote: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.

I'm with you!
Mac OS 10.11b1
ST 3 (3092)
Posts: 277
Joined: Tue Jan 03, 2012 2:42 pm

Re: Whitesmiths Indentation Style?

Postby chlab on Tue Jul 23, 2013 9:36 am

Still no news on this? Sadly, whitesmith is the coding style the company I work for uses and without support for it I can't really imagine using ST as my main editor at work.

Edit: I created a userecho feature request for this. Please add your support: http://sublimetext.userecho.com/topic/213818-/
Posts: 6
Joined: Wed Jul 17, 2013 8:19 am

Re: Whitesmiths Indentation Style?

Postby qgates on Tue Jul 23, 2013 3:33 pm

@chlab: you may want to post something up on the sublime github issue tracker as well, since it seems that userecho is falling on deaf ears these days :(

For anyone else interested in whitesmith indenting, it does look as though this could be done with a plugin. I found this plugin for customised lisp/clojure indent behaviour which should serve as a useful starting point for writing a custom autoindent, whitesmith style. I'm not interested in whitesmith myself so I'll bow out here - but I did take a look at the plugin code and upon cursory glance it seems to have all of the needed elements.

Posts: 277
Joined: Mon Nov 05, 2012 4:33 pm

Re: Whitesmiths Indentation Style?

Postby chlab on Thu Jul 25, 2013 7:34 am

Thanks for the heads up. Here's the feature request for those interested: https://github.com/SublimeText/Issues/issues/112
I'll have a look at that plugin, thanks.
Posts: 6
Joined: Wed Jul 17, 2013 8:19 am


Return to General Discussion

Who is online

Users browsing this forum: Google [Bot] and 30 guests