This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 269425 - Add "Indent to Cursor" Option for Template Expansion
Summary: Add "Indent to Cursor" Option for Template Expansion
Status: NEW
Alias: None
Product: editor
Classification: Unclassified
Component: Completion & Templates (show other bugs)
Version: Dev
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-12-25 01:12 UTC by Inara
Modified: 2016-12-25 01:12 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Inara 2016-12-25 01:12:37 UTC
After testing each of the three current expansion options with a variety of templates, I've found that an option I commonly want is actually something in between "Do Nothing" and "Reindent Text": Specifically, it would be nice to have the option for the formatting of the template to be left exactly as it was created, but for the entire template to be indented to the level of the cursor.

The current "Reindent Text" option works perfectly for simple templates, but produces awkward results if multiple code types (e.g., PHP + HTML + JS) are included in a single template over several lines.

I don't believe this feature is possible with any combination of the current methods, so it would seem to be best handled by a fourth "Indent to Cursor" (or similar) Template Expansion option, but please let me know if I'm mistaken.