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

Summary: Add "Indent to Cursor" Option for Template Expansion
Product: editor Reporter: Inara
Component: Completion & TemplatesAssignee: Dusan Balek <dbalek>
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: Dev   
Hardware: PC   
OS: Windows 7   
Issue Type: ENHANCEMENT Exception Reporter:

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.