Open chlab opened 11 years ago
It seems only contributors can add labels. This issue is a feature request and/or enhancement.
Is it ok to bump this? This would be a huge improvement for me and any other Whitesmiths coders. Thanks.
Bumping doesn't mean anything since the developer is probably not even looking at this. He did fix a few things reported here already but we do not know if he actually saw it here or it just happend to have been reported on the forum.
Maybe some day he will appreciate our efforts ...
Fair enough, thanks. I'll just suffer in silence from now on :):
+1
+1
Reference on how to do this in plugins (per own language or whatever):
https://github.com/makopo/sublime-text-lsl/blob/master/changestyle.py
Thanks for this. Would you mind adding some more information on how to achieve this standalone for some who has no idea how these plugins work? You would do me a huge favor!
The plugin copies the contents of style-settings.tmPreferences.stylea
(in plugin folder) or style-settings.tmPreferences.styleb
(in plugin folder) to style-settings.tmPreferences
(in user).
In style-settings.tmPreferences
then is defined the value for a variable used in the *.sublime-snippet
files of the plugin.
Checking against the value plugin knows whether the option to change the style has been toggled or not.
Thanks for your reply. As far as I can tell, the plugin only changes the newline/space style though, which isn't quite enough to get whitesmith's working. I don't know how to go about changing the indentation level of the closing brackets for example.
Oh wow, I didn't even know snippets could use the meta variables and expand them as defined by tmPreferences files. Sounds pretty useful.
+1
Well, I have a new job and thankfully, finally, no longer have to code in Whitesmiths. I am therefore abonding this thread. I wish the best of the luck to the rest of you.
Reopening since the feature/enhancement request is still a valid concern and has not been solved. It might probably never be implemented, but keeping track of all the things is still useful.
I have a script in my Bro (a domain specific programming language for network traffic monitoring) support bundle that kind of implements whitesmith style. We use something very similar to whitesmith in our core and in our Bro scripts. Perhaps this is something that could be made more generic?
https://github.com/sethhall/bro.tmbundle/blob/master/BroIndent.py
Leaving a reference note here for issues regarding the use of meta variables:
Makopo/sublime-text-lsl#33
This issue was moved to SublimeTextBugs/DefaultPackages#61
@jsiwek commented on 25 Oct 2015:
Here's a plugin I wrote that attempts to add support for Whitesmiths indent style: https://github.com/jsiwek/WhitesmithsIndentStyle
sublimehq/Packages#131 shows a possible fix
As discussed in this forum thread, it is the opinion of several users and myself that the whitesmiths coding style should be supported by default.
Whitesmiths style is still used commonly enough for it to be supported by any major editor. In my case, I have no say in this matter, it's the coding style my company has chosen. Day-to-day work with SublimeText is difficult in Whitesmiths when SublimeText enforces a different style.
Example:
I think an option along the lines of
tab_size_within_structures
would pretty much do the trick. The default would be 0, as it is now. Setting it to 2 in the example above would result in the expected behavior.References: