May 25, 2013
On Saturday, 25 May 2013 at 12:56:02 UTC, Andrei Alexandrescu wrote:
> OK, you convinced me to try. But my SublimeText OSX installation does not contain the D.tmPackage file described at https://github.com/alexrp/st2-d. Where do I put it?
>
> Thanks,
>
> Andrei

I found it through: Sublime Text 2 -> Preferences -> Browse Packages...

That opens finder at ~/Library/Application Support/Sublime Text 2/Packages/

There's a folder called D, which holds D.tmLanguage file among other things. I just replaced that and removed D.tmLanguage.cache file and restarted ST2 to force a refresh.
May 25, 2013
On 5/25/13 7:01 PM, TommiT wrote:
> On Saturday, 25 May 2013 at 12:56:02 UTC, Andrei Alexandrescu wrote:
>> OK, you convinced me to try. But my SublimeText OSX installation does
>> not contain the D.tmPackage file described at
>> https://github.com/alexrp/st2-d. Where do I put it?
>>
>> Thanks,
>>
>> Andrei
>
> I found it through: Sublime Text 2 -> Preferences -> Browse Packages...
>
> That opens finder at ~/Library/Application Support/Sublime Text 2/Packages/
>
> There's a folder called D, which holds D.tmLanguage file among other
> things. I just replaced that and removed D.tmLanguage.cache file and
> restarted ST2 to force a refresh.

Thanks! Did that. What can I do to make sure I have the right config?

Andrei
May 25, 2013
On Saturday, 25 May 2013 at 23:18:22 UTC, Andrei Alexandrescu wrote:
> On 5/25/13 7:01 PM, TommiT wrote:
>> On Saturday, 25 May 2013 at 12:56:02 UTC, Andrei Alexandrescu wrote:
>>> OK, you convinced me to try. But my SublimeText OSX installation does
>>> not contain the D.tmPackage file described at
>>> https://github.com/alexrp/st2-d. Where do I put it?
>>>
>>> Thanks,
>>>
>>> Andrei
>>
>> I found it through: Sublime Text 2 -> Preferences -> Browse Packages...
>>
>> That opens finder at ~/Library/Application Support/Sublime Text 2/Packages/
>>
>> There's a folder called D, which holds D.tmLanguage file among other
>> things. I just replaced that and removed D.tmLanguage.cache file and
>> restarted ST2 to force a refresh.
>
> Thanks! Did that. What can I do to make sure I have the right config?
>
> Andrei

I knew the config had updated due to the fact that keyword pure was colored like a keyword. In the default config file that was one of the keywords missing. Also you can check that ST -> View -> Syntax has 'D' checked when a d-file is open.

May 26, 2013
And, to make caseS and default of a switch indent to the same column as the switch, I made a small modification to the file "~/Library/Application Support/Sublime Text 2/Packages/D/Indentation Rules.tmPreferences" and, again deleted the "Indentation Rules.tmPreferences.cache" file and restarted ST2. This is what my "Indentation Rules.tmPreferences" file contains now and it seems to work, but take it with a grain of salt, since I don't really know what I'm doing:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>name</key>
	<string>Indentation Rules</string>
	<key>scope</key>
	<string>source.d</string>
	<key>settings</key>
	<dict>
		<key>decreaseIndentPattern</key>
		<string>^(.*\*/)?\s*\}([^}{"']*\{)?[;\s]*(//.*|/\*.*\*/\s*)?$|^\s*(public|private|protected):\s*$|^\s*(case\s+[^:]*|default\s*):.*$</string>
		<key>increaseIndentPattern</key>
		<string>^.*\{[^}"']*$|^\s*(public|private|protected):\s*$|^\s*(case\s+[^:]*|default\s*):.*$</string>

		<key>bracketIndentNextLinePattern</key>
		<string>(?x)
		^ \s* \b(if|while|else|foreach)\b [^;]* $
		| ^ \s* \b(for)\b .* $
		</string>

	</dict>
	<key>uuid</key>
	<string>7C8F9C84-7DCC-4DD7-B32E-A638F322199F</string>
</dict>
</plist>
May 26, 2013
On 5/25/13 7:31 PM, TommiT wrote:
> I knew the config had updated due to the fact that keyword pure was
> colored like a keyword. In the default config file that was one of the
> keywords missing. Also you can check that ST -> View -> Syntax has 'D'
> checked when a d-file is open.

Yay to that, looks like my install is in good shape. I guess I'll pester y'all with more question.

You know what would be awesome? If we had a DDoc (sic!) mode for Sublime Text whenever .dd documents are opened.

Also, is it possible to switch to an alternative syntax inside D comments?


Andrei


May 26, 2013
what about for ST3? there's no ~/Library/Application\ Support/Sublime\ Text\ 3/Packages/D

On Sat, May 25, 2013 at 4:01 PM, TommiT <tommitissari@hotmail.com> wrote:

> On Saturday, 25 May 2013 at 12:56:02 UTC, Andrei Alexandrescu wrote:
>
>> OK, you convinced me to try. But my SublimeText OSX installation does not contain the D.tmPackage file described at https://github.com/alexrp/st2-* *d <https://github.com/alexrp/st2-d>. Where do I put it?
>>
>> Thanks,
>>
>> Andrei
>>
>
> I found it through: Sublime Text 2 -> Preferences -> Browse Packages...
>
> That opens finder at ~/Library/Application Support/Sublime Text 2/Packages/
>
> There's a folder called D, which holds D.tmLanguage file among other things. I just replaced that and removed D.tmLanguage.cache file and restarted ST2 to force a refresh.
>


May 26, 2013
On Sunday, 26 May 2013 at 00:34:46 UTC, Timothee Cour wrote:
> what about for ST3? there's no ~/Library/Application\ Support/Sublime\
> Text\ 3/Packages/D

According to:

http://www.sublimetext.com/docs/3/packages.html

...you create a new folder called "D" under the:

"~/Library/Application Support/Sublime Text #/Packages/" folder and put the "D.tmLanguage" file to that "D" folder and it should override the default one.
May 27, 2013
On 2013-05-26 02:33, Andrei Alexandrescu wrote:

> Also, is it possible to switch to an alternative syntax inside D comments?

I would guess so. At least it's possible in TextMate. You would probably need a specific character to indicate that the text that would follow should be parsed as a different language.

-- 
/Jacob Carlborg
1 2
Next ›   Last »