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 257257

Summary: Replacement of single single (or single double) quotes by double (or single) quotes
Product: javascript Reporter: xracoonx
Component: EditorAssignee: Petr Pisl <ppisl>
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: 8.1   
Hardware: PC   
OS: Windows 7   
Issue Type: ENHANCEMENT Exception Reporter:

Description xracoonx 2015-12-22 09:55:25 UTC
Whenever I want to replace a single occurrence of single quotes with double quotes the editor wraps the single quotes in double quotes instead of replacing them.

Example:

string = 'Text';

Now I want to replace the first single quote by double quotes. So I select the first single quote and press double quotes. The result is

string = "'"Text';

I see that this wrapping into quotes makes sense in most cases. However, how often is there a case where one wants to wrap a single quote in double quotes? So I suggest that *if* the selected text is only a single quote that it is just replaced by a single double quote. Or, at least there should be an option for this in the editor settings or so.

I know that there is a feature in NetBeans to replace *both* single quotes at once by double quotes by selecting the whole text including the single quotes and press double quotes. But sometimes it is just hard to select the whole text or I just forget about it.