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 130101 - erb auto formatting niggles
Summary: erb auto formatting niggles
Status: NEW
Alias: None
Product: ruby
Classification: Unclassified
Component: RHTML (show other bugs)
Version: 6.x
Hardware: All Windows XP
: P3 blocker (vote)
Assignee: issues@ruby
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-03-13 23:14 UTC by timhaines
Modified: 2011-01-28 20:11 UTC (History)
1 user (show)

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 timhaines 2008-03-13 23:14:52 UTC
I'm using Dev Build 6.1 200803091202 on xp and have it setup to replace tabs with 2 spaces.

Two niggles:

1)  Start with test.erb with content of:
<% if logged_in? %>  
<% end %>

go to the end of the logged in line, hit enter, then type r,e,{tab} and it nicely inserts two spaces before the <%= . 
This is excellent!

However, remove the new line you just added, and go to the end of the logged in line again.  Press enter, then tab to
manually insert the new indentation, and then type r,e,{tab}.  It still inserts the two spaces, resulting in 4 spaces. 
The problem is it's indented 2 spaces 2 far.  This gets irritating when doing a lot of work in erb files.

2) Start with test.erb with content of:
<% if logged_in? %>  
  <%= %>
<% end %>

Go to the end of the <%= %> line, and press enter.  First tiny issue is that it takes you back to the start of the line,
rather than directly below the  < in the <%=.  This is easily solved with one key press though - press tab.

Then type in <div></div>.  If your netbeans is like my netbeans, when you enter the last >, the line has whitespace
removed from the start (2 spaces?), and I need to go back to the start of the line and hit tab again.  This is a bit
frustrating to do over and over too...