May 21, 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). I used it for GLSL and it turned out nicely: https://github.com/someboddy/Dandy/blob/initial-development/dandy/common/shaders.d#L8L31 Many acceptable languages for token strings are c-like anyways, so they look good with the D syntax highlighting - even if it doesn't highlight all the keywords, or highlight stuff that are not keywords, or highlight in wrong color. |
May 21, 2013 Re: Request d.vim testing | ||||
---|---|---|---|---|
| ||||
Posted in reply to Idan Arye | On Tuesday, May 21, 2013 00:51:51 Idan Arye wrote:
> Anyways, do you happen to know where we can get a proper indentation for D under Vim?
What do you mean by proper indentantion? I just set tabstop and shiftwidth to 4 and then turn on cindent. Is there something that that doesn't cover? I'm probably just so used to how that works that I have no clue what you're missing.
- Jonathan M Davis
|
May 21, 2013 Re: Request d.vim testing | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jonathan M Davis | On Tuesday, 21 May 2013 at 00:17:56 UTC, Jonathan M Davis wrote:
> On Tuesday, May 21, 2013 00:51:51 Idan Arye wrote:
>> Anyways, do you happen to know where we can get a proper
>> indentation for D under Vim?
>
> What do you mean by proper indentantion? I just set tabstop and shiftwidth to
> 4 and then turn on cindent. Is there something that that doesn't cover? I'm
> probably just so used to how that works that I have no clue what you're
> missing.
>
> - Jonathan M Davis
Not sure exactly what he has in mind.
I know 'gd' and 'gD' fail most often (goto definition)
Ctags probably could get a patch pushed upstream, but since I'm not using it I don't know if there is still something wrong.
Other than that, I don't know what would be missing.
|
May 21, 2013 Re: Request d.vim testing | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jesse Phillips | On Tuesday, 21 May 2013 at 00:39:48 UTC, Jesse Phillips wrote:
> On Tuesday, 21 May 2013 at 00:17:56 UTC, Jonathan M Davis wrote:
>> On Tuesday, May 21, 2013 00:51:51 Idan Arye wrote:
>>> Anyways, do you happen to know where we can get a proper
>>> indentation for D under Vim?
>>
>> What do you mean by proper indentantion? I just set tabstop and shiftwidth to
>> 4 and then turn on cindent. Is there something that that doesn't cover? I'm
>> probably just so used to how that works that I have no clue what you're
>> missing.
>>
>> - Jonathan M Davis
>
> Not sure exactly what he has in mind.
>
> I know 'gd' and 'gD' fail most often (goto definition)
> Ctags probably could get a patch pushed upstream, but since I'm not using it I don't know if there is still something wrong.
>
>
> Other than that, I don't know what would be missing.
Some examples:
void main(){
/+
Comment
+/
}
When applying indentation, turns to
void main(){
/+
Comment
+/
}
Also:
void main(){
foo([
1,
2,
3,
],
[
4,
5,
6,
]);
}
turns to:
void main(){
foo([
1,
2,
3,
],
[
4,
5,
6,
]);
}
|
May 21, 2013 Re: Request d.vim testing | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jesse Phillips | On Tuesday, May 21, 2013 02:39:48 Jesse Phillips wrote:
> I know 'gd' and 'gD' fail most often (goto definition)
> Ctags probably could get a patch pushed upstream, but since I'm
> not using it I don't know if there is still something wrong.
I gave up on ctags ages ago with just C++. I wouldn't even attempt to use it with D. It's way too primitive to be worth anything IMHO. Among othe things, it would have to actual understand namespaces (or modules or whatever) and overloads, and it doesn't. You need something that actually understands the language.
- Jonathan M Davis
|
May 21, 2013 Re: Request d.vim testing | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jonathan M Davis | On Tuesday, 21 May 2013 at 01:08:08 UTC, Jonathan M Davis wrote: > On Tuesday, May 21, 2013 02:39:48 Jesse Phillips wrote: >> I know 'gd' and 'gD' fail most often (goto definition) >> Ctags probably could get a patch pushed upstream, but since I'm >> not using it I don't know if there is still something wrong. > > I gave up on ctags ages ago with just C++. I wouldn't even attempt to use it > with D. It's way too primitive to be worth anything IMHO. Among othe things, > it would have to actual understand namespaces (or modules or whatever) and > overloads, and it doesn't. You need something that actually understands the > language. > > - Jonathan M Davis Take a look at DScanner - https://github.com/Hackerpilot/Dscanner It can produce ctags files. |
May 21, 2013 Re: Request d.vim testing | ||||
---|---|---|---|---|
| ||||
Posted in reply to Idan Arye | On Tuesday, 21 May 2013 at 01:13:13 UTC, Idan Arye wrote:
> Take a look at DScanner - https://github.com/Hackerpilot/Dscanner
>
> It can produce ctags files.
It also attempts to provide some level of autocomplete for Vim and Textadept. It doesn't work very reliably, so consider it a prototype. I have plans for a replacement soon(tm).
On the topic of ctags, I think that what he's referring to is that the ctags format, not the tool, is not sufficient for D.
|
May 21, 2013 Re: Request d.vim testing | ||||
---|---|---|---|---|
| ||||
Posted in reply to Idan Arye | On Tuesday, 21 May 2013 at 00:54:58 UTC, Idan Arye wrote:
>>> On Tuesday, May 21, 2013 00:51:51 Idan Arye wrote:
>>>> Anyways, do you happen to know where we can get a proper
>>>> indentation for D under Vim?
> Some examples:
Ah yes, formatter. This is handled by their internal c-indenting function. These may be acceptable corrections to include there, but nothing D specific is likely to make it in. (:help =)
You can set 'equalprg' to any external program you wish...
|
Copyright © 1999-2021 by the D Language Foundation