DDT-IDE / DDT

DDT is an Eclipse-based IDE for the D programming language:
http://ddt-ide.github.io/
101 stars 16 forks source link

Please add sub-word navigation #146

Open grylliade opened 8 years ago

grylliade commented 8 years ago

Please add sub-word navigation, i.e. "Smart caret positioning in identifiers." Looking at CDT it may be as simple as enabling an already-present option in the text editor; I'll see about figuring out enough Java to do it myself.

klosworks commented 8 years ago

It you do this, please make it possible to switch it off and make sure navigation through the document is still pleasant with this switched off. I really hate when I have to press ctrl+right more than once in order to skip an identifier and go to the next token.

bruno-medeiros commented 8 years ago

@grylliade , if you look into CDT sources, you can see an example of how it's done in org.eclipse.cdt.internal.ui.editor.CEditor.NavigatePreviousSubWordAction and its super classes (although that code is badly organized, I wouldn't copy it verbatim to DDT) If you install the full CDT (or JDT) into the target platform, you can put a debug point there and see how it works in practice.

grylliade commented 7 years ago

Looking further into it, it seems that DLTK's ScriptEditor already has subword navigation implemented, including an option to disable it. Is there a specific reason you're using an internal version of DLTK rather than the “official¨ version? Because otherwise it seems that just inheriting from the latest ScriptEditor will do it.

Edit: I see now from the changelog that it was for performance reasons. But is there any reason not to update the internal branch?

bruno-medeiros commented 7 years ago

DDT is not using DLTK fore more than performance reasons - that's not even the main reason, but several API limitations. (You can read a bit more about here if you are interested: https://github.com/bruno-medeiros/MelnormeEclipse/blob/master/README-MelnormeEclipse.md )