Visual D and code navigation improvements.

Random D user via Digitalmars-d-ide digitalmars-d-ide at puremagic.com
Sat Mar 18 15:13:56 PDT 2017


VisualD is working pretty good these days, but there's couple 
little things related the code navigation which would greatly 
improve the coding experience.

1. Jump to method list (current file)
Similar to VisualAssist's  List methods in file 
(http://www.wholetomato.com/features/feature-navigation.asp#methods), DPack all members (http://www.usysware.com/dpack/CodeBrowser.aspx) or Visual Studio Navigate To (ctrl + ,).

I use this all the time in my day job (VAssist), and I find it 
quite inconvenient that I can't do that in Visual D. The other 
feature I use all the time is "Jump to file list" (open file in 
solution), but that is kind of implemented, since 'Navigate To' 
only shows files in Visual D and works great for that purpose.

I tried using code outlining (folding), but even that doesn't 
work all that great for D.
Also finding/searching works, but if you have a lot of call sites 
then even that kind of fails and you have to rember the function 
names.

In general, navigating D code becomes a chore after few functions 
and 300 lines. C++, at least, has headers which are good for 
overview and navigating with go to definition (of course, 
excluding 'the overview', not having headers is a good thing).

What would it take and how hard would it be to implement this in 
Visual D?

Basically, a list of functions and methods in the current file 
(hit alt+m and focus on the dialog) that could be interactively 
filtered by typing the start of the symbol name (scope should be 
ignored for the filter, but shown in the list (who wants to 
fiddle with scope when you just want to jump to a symbol name 
(quickly) in that file)).

2. Ctrl+space latency.
Currently on my small to medium sized projects hitting ctrl+space 
usually works, but with a 0.5 - 1.0 second delay (with high end 
machine), so it's annoying enough that I don't use it all that 
much.

I hope this could be optimized to be faster, but if there isn't 
any low hanging fruit left, maybe it could be temporally spread 
over longer period of time in order to get the latency low. For 
example, maybe ctrl+space could list symbols from current file 
immediately and then progressively expand the list as more 
symbols are found through searching imports.

3. Bonus question about debug symbols.
Sometimes debugging D is broken, the debugger either shows 
garbage values for the symbols (usually fixed in the next 
function if they're passed) or doesn't show them at all. Are 
there still missing or invalid debug symbols emitted by DMD? Or 
is there some limitations in mago?

Lastly, I want to say thanks (Rainer S.) for creating and 
supporting Visual D.


More information about the Digitalmars-d-ide mailing list