| Summary: | Allow more detailed control over caret positioning in identifiers (after Ctrl+Left / Ctrl+Right) | ||
|---|---|---|---|
| Product: | [Tools] CDT | Reporter: | Peter Remmers <premmers> |
| Component: | cdt-editor | Assignee: | Project Inbox <cdt-editor-inbox> |
| Status: | NEW --- | QA Contact: | Jonah Graham <jonah> |
| Severity: | normal | ||
| Priority: | P3 | CC: | cdtdoug, daniel_megert, gophercg, pahan, zeratul976 |
| Version: | Next | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Whiteboard: | |||
|
Description
Peter Remmers
I just noticed that the option does indeed change the behavior. Here's a table: identifier open_your_eyes apples2oranges CamelCaseIdent option enabled stops skips stops option disabled stops!! stops!! skips If the option is disabled the behavior falls back to the platform default, i.e. the Eclipse Text Editor will behave the same. On Windows the caret does not stop inside "apples2oranges" (with disabled option), but it does so on Linux/GTK. So, it seems the behavior is also window system dependent. I think the appropriate solution here is to allow controlling the caret positioning at the Platform level. The Platform does not have a concept of "identifier" and currently we do not have a "language" layer. Hence this remains with CDT, JDT,... (In reply to Dani Megert from comment #4) > The Platform does not have a concept of "identifier" and currently we do not > have a "language" layer. Hence this remains with CDT, JDT,... What about the concept of a "word"? I imagined that the behaviour configured at the Platform level would affect any text editor, regardless of language. (In reply to Nathan Ridge from comment #5) > (In reply to Dani Megert from comment #4) > > The Platform does not have a concept of "identifier" and currently we do not > > have a "language" layer. Hence this remains with CDT, JDT,... > > What about the concept of a "word"? I imagined that the behaviour configured > at the Platform level would affect any text editor, regardless of language. For word navigation we use the OS behavior to match other text editors. (In reply to Dani Megert from comment #6) > For word navigation we use the OS behavior to match other text editors. And there is no interest in allowing the user to customize / override the OS behaviour at the Platform level? (In reply to Nathan Ridge from comment #7) > (In reply to Dani Megert from comment #6) > > For word navigation we use the OS behavior to match other text editors. > > And there is no interest in allowing the user to customize / override the OS > behaviour at the Platform level? Once we have a language layer this might be an option. But usually the navigation still slightly differs depending on the used language. (In reply to Dani Megert from comment #8) > (In reply to Nathan Ridge from comment #7) > > (In reply to Dani Megert from comment #6) > > > For word navigation we use the OS behavior to match other text editors. > > > > And there is no interest in allowing the user to customize / override the OS > > behaviour at the Platform level? > > Once we have a language layer this might be an option. But usually the > navigation still slightly differs depending on the used language. What is a "language layer"? I'm talking about customizing the default word navigation behaviour that's used in all text editors unless a specific editor overrides it. Language editors (CDT, JDT) can then choose to override it to be appropriate for the language. (In reply to Nathan Ridge from comment #9) > (In reply to Dani Megert from comment #8) > > (In reply to Nathan Ridge from comment #7) > > > (In reply to Dani Megert from comment #6) > > > > For word navigation we use the OS behavior to match other text editors. > > > > > > And there is no interest in allowing the user to customize / override the OS > > > behaviour at the Platform level? > > > > Once we have a language layer this might be an option. But usually the > > navigation still slightly differs depending on the used language. > > What is a "language layer"? A layer that has the things that are common to programming languages. We have something for refactoring (*.ltk.*) but not for other parts. > I'm talking about customizing the default word navigation behaviour that's > used in all text editors unless a specific editor overrides it. > > Language editors (CDT, JDT) can then choose to override it to be appropriate > for the language. That was my point. Most of them will have to override it anyway if they want to provide perfect support. Ok, thanks for clarifying. To the bug reporter and anyone else interested in this: I think for now CDT would accept a patch that would allow customizing the behaviour along the lines of the table in comment 1. (I have no plans to work on such a patch myself.) If Platform later introduces a language layer, we could consider upstreaming the setting there. *** Bug 519677 has been marked as a duplicate of this bug. *** |