May 20, 2013 Re: Request d.vim testing | ||||
---|---|---|---|---|
| ||||
Posted in reply to Idan Arye | On Monday, 20 May 2013 at 16:20:34 UTC, Idan Arye wrote:
> Here are the results on my Vim 7.3 on Linux:
> http://postimg.org/image/cgtkbhr0t/
Are you sure you didn't have merge errors, The only indicator that you have the latest file is the asm.d highlighting, and I can't reproduce this.
Anyone else seeing these?
|
May 20, 2013 Re: Request d.vim testing | ||||
---|---|---|---|---|
| ||||
Posted in reply to Iain Buclaw | On Monday, 20 May 2013 at 16:36:59 UTC, Iain Buclaw wrote:
> First question that I have:
>
> Does 'Object' *need* to be syntax highlighted?
>
>
> Regards
> --
> Iain Buclaw
>
> *(p < e ? p++ : p) = (c & 0x0f) + '0';
No, but nor does size_t... Object is always made available, so basically a keyword.
|
May 20, 2013 Re: Request d.vim testing | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jesse Phillips | On Monday, 20 May 2013 at 22:34:05 UTC, Jesse Phillips wrote:
> On Monday, 20 May 2013 at 16:20:34 UTC, Idan Arye wrote:
>> Here are the results on my Vim 7.3 on Linux:
>> http://postimg.org/image/cgtkbhr0t/
>
> Are you sure you didn't have merge errors, The only indicator that you have the latest file is the asm.d highlighting, and I can't reproduce this.
>
> Anyone else seeing these?
Oopsie... my fault...
I haven't really merged it or replaced the old file - I just `unlet`ted `b:current_syntax` and `source`d your syntax file, so I guess the two syntax files got mixed.
I removed the suffix from the example files and loaded just your syntax, and everything turned out OK!
Anyways, do you happen to know where we can get a proper indentation for D under Vim?
|
May 20, 2013 Re: Request d.vim testing | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jesse Phillips Attachments:
| Thanks. I've fixed cgdb syntax highlighting for various literals here. https://github.com/cgdb/cgdb/pull/22 Wonder if anyone has any ideas for q"( strings )" Regards -- Iain Buclaw *(p < e ? p++ : p) = (c & 0x0f) + '0'; On May 20, 2013 11:40 PM, "Jesse Phillips" <Jessekphillips+D@gmail.com> wrote: > On Monday, 20 May 2013 at 16:36:59 UTC, Iain Buclaw wrote: > >> First question that I have: >> >> Does 'Object' *need* to be syntax highlighted? >> >> >> Regards >> -- >> Iain Buclaw >> >> *(p < e ? p++ : p) = (c & 0x0f) + '0'; >> > > No, but nor does size_t... Object is always made available, so basically a keyword. > |
May 20, 2013 Re: Request d.vim testing | ||||
---|---|---|---|---|
| ||||
Posted in reply to Idan Arye | On Monday, 20 May 2013 at 22:51:52 UTC, Idan Arye wrote: > Anyways, do you happen to know where we can get a proper indentation for D under Vim? Nope, most recent information I know is found here: http://www.prowiki.org/wiki4d/wiki.cgi?EditorSupport/VimEditor |
May 20, 2013 Re: Request d.vim testing | ||||
---|---|---|---|---|
| ||||
Posted in reply to Iain Buclaw | On Monday, 20 May 2013 at 23:08:26 UTC, Iain Buclaw wrote:
> Thanks.
>
> I've fixed cgdb syntax highlighting for various literals here.
>
> https://github.com/cgdb/cgdb/pull/22
>
> Wonder if anyone has any ideas for q"( strings )"
>
> Regards
In case you don't know (guessing you might not based on the comment):
q{ Token string here }
q"( custom wysiwyg string delimiter )"
The first should probably highlight as normal code (Vim is doing that). The second is a normal string.
The token string is interesting since it can be used to house non-D language making D not necessarily the proper highlighting scheme.... hmm I wonder if I could make vim.d identify the language (probably needs specific indicator though).
|
May 20, 2013 Re: Request d.vim testing | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jesse Phillips | On Monday, 20 May 2013 at 23:20:08 UTC, Jesse Phillips wrote:
> The token string is interesting since it can be used to house non-D language making D not necessarily the proper highlighting scheme.... hmm I wonder if I could make vim.d identify the language (probably needs specific indicator though).
The standard says "In between must be valid D tokens", so I'm not sure that's actually the case.
|
May 20, 2013 Re: Request d.vim testing | ||||
---|---|---|---|---|
| ||||
Posted in reply to Brian Schott | On Monday, 20 May 2013 at 23:30:48 UTC, Brian Schott wrote:
> On Monday, 20 May 2013 at 23:20:08 UTC, Jesse Phillips wrote:
>> The token string is interesting since it can be used to house non-D language making D not necessarily the proper highlighting scheme.... hmm I wonder if I could make vim.d identify the language (probably needs specific indicator though).
>
> The standard says "In between must be valid D tokens", so I'm not sure that's actually the case.
That just means it can be tokenized; pretty much anything can be tokenized.
I was going to give an example of something that would fail... but I can't think of anything that should fail. My first thought was '45oau' since identifiers can't start with a number... but my testing shows this is accepted.
|
May 21, 2013 Re: Request d.vim testing | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jesse Phillips | On Monday, 20 May 2013 at 23:57:21 UTC, Jesse Phillips wrote:
> I was going to give an example of something that would fail... but I can't think of anything that should fail.
A string in single quotes doesn't pass. I use it for inline javascript sometimes and hits this:
a.onclick = q{
var a = 'something'; // this won't compile in D - it will have to use double quotes
return false;
};
test.d(5): Error: unterminated character constant
|
May 21, 2013 Re: Request d.vim testing | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jesse Phillips Attachments:
| On May 21, 2013 12:25 AM, "Jesse Phillips" <Jessekphillips+D@gmail.com> wrote: > > On Monday, 20 May 2013 at 23:08:26 UTC, Iain Buclaw wrote: >> >> Thanks. >> >> I've fixed cgdb syntax highlighting for various literals here. >> >> https://github.com/cgdb/cgdb/pull/22 >> >> Wonder if anyone has any ideas for q"( strings )" >> >> Regards > > > In case you don't know (guessing you might not based on the comment): > > q{ Token string here } > > q"( custom wysiwyg string delimiter )" > > The first should probably highlight as normal code (Vim is doing that). The second is a normal string. > > The token string is interesting since it can be used to house non-D language making D not necessarily the proper highlighting scheme.... hmm I wonder if I could make vim.d identify the language (probably needs specific indicator though). The bit causing trouble is knowing the token that shall end the string. Regards -- Iain Buclaw *(p < e ? p++ : p) = (c & 0x0f) + '0'; |
Copyright © 1999-2021 by the D Language Foundation