VisualD modding

Johnson via Digitalmars-d-ide digitalmars-d-ide at puremagic.com
Tue Aug 15 10:37:10 PDT 2017


On Tuesday, 15 August 2017 at 07:12:44 UTC, Rainer Schuetze wrote:
>
>
> On 14.08.2017 16:51, Johnson Jones wrote:
>> On Monday, 14 August 2017 at 06:50:21 UTC, Rainer Schuetze 
>> wrote:
>>>
>>> You can capture the state of the line before default 
>>> execution with
>>>
>>> mNextTarget.Exec()
>>>
>>> Maybe your code could just be moved up there to begin with.
>> 
>> Moved up where?
>> 
>> I see 'int rc = mNextTarget.Exec(pguidCmdGroup, nCmdID, 
>> nCmdexecopt, pvaIn, pvaOut);'
>> 
>> which is about all that is used with mNextTarget.Exec, but it 
>> is calling it rather than overriding it in some way.
>
> That's how the chaining works, this call executes the default 
> implementation of the command.
>

Ok, I'll play around with it and see if I can make more sense of 
it.

>
>> 
>> Once I get some progress I'll submit some patches, right now 
>> I'm just toying around with it trying to see how it's all set 
>> up. While I can do some things I feel like I'm gonna have to 
>> revamp some of the editing(all optional) because I get pretty 
>> frustrated in Visual D due to time consuming processes of 
>> wrangling with spaces.
>
> Apart from "smart indentation", there is little that Visual D 
> does to spacing, it's default VS behavior. Even the "elastic 
> tabs" plugin works (in VS2015), and I like its functionality of 
> keeping code vertically aligned automatically, but I don't 
> think it's a good idea to enhance tabs for this as the code 
> will look broken everywhere else. Instead, it should just fill 
> in tabs/spaces as usual.

Yeah, I'm not proposing any virtual tabs. But simply make the 
keys a bit a bit smarter. e.g., backspace will not blindly remove 
the last space but look back to the first non-space character and 
to the lines around it. If they has a certain format, it will 
backspace more than one character automatically. Same with del, 
enter, tab, etc.  They won't blindly insert/remove characters but 
be more intelligent about their surroundings.

The goal, ultimately, so so that one does not have to do any 
formatting. Probably at least 10% of my keystrokes are 
formatting... it should be nearly 0. E.g., suppose a coding style 
has been created that formats the code exactly the way one wants, 
every keystroke, in theory, could reformat the document and make 
it look correct. This way the document never gets out of sync 
with the correct format. While this isn't possible in practice 
for various reasons, one can get close with a little work.


>> 
>> e.g., when one hits return it always seems to take them to the 
>> start of the line, then tabs move one at a time instead of 
>> jumping to the previous tab indention. One one had many 
>> nesting and about 10+ tabs, this is time consuming, and must 
>> be done for each line. Similar issues occur with backspace, 
>> delete, etc.
>
> Do you have "smart indentation" enabled?
>

Probably not, as I remember turning it off a long time ago due to 
it not working well and causing various issues.




More information about the Digitalmars-d-ide mailing list