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 129815 - Command to join/combine lines of text
Summary: Command to join/combine lines of text
Status: REOPENED
Alias: None
Product: editor
Classification: Unclassified
Component: Actions/Menu/Toolbar (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker with 2 votes (vote)
Assignee: Miloslav Metelka
URL:
Keywords:
: 180883 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-03-11 17:40 UTC by mbarnes
Modified: 2016-07-07 11:07 UTC (History)
2 users (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 mbarnes 2008-03-11 17:40:14 UTC
I'd would find it useful to have an editor command to join (combine) two (or more) lines into one line, like the 'j'
command in "vi".

Join the current line with the line below it, or join the selected lines if more than one line is selected.
Comment 1 Vitezslav Stejskal 2008-03-12 12:37:43 UTC
Could be useful. Maybe you could record a simple macro to do this.
Comment 2 markiewb 2012-11-18 15:05:46 UTC
It can be emulated by a macro. See http://forums.netbeans.org/topic4496.html

<code>
caret-end-line selection-down selection-first-non-white remove-selection 
</code?
Comment 3 markiewb 2012-12-17 18:52:49 UTC
Set target-milestone of open issue to TBD (was < 7.3, f.e. 6.8), so the issue doesn't get lost.
Comment 4 markiewb 2012-12-17 19:04:15 UTC
Set target-milestone of open issue to TBD (was < 7.3, f.e. 6.8), so the issue
doesn't get lost. This time the target milestone is really set.
Comment 5 Fleshgrinder 2013-05-24 21:52:01 UTC
The macro from the forum doesn't really do the same as Ctrl + J in nearly all other programs out there. By pressing Ctrl + J only newlines are removed and they are removed from every line that is currently selected / or between the current caret line and the next line.

Example (the pipe | represents the caret):

foo|
  bar
  foobar

-> becomes ->

foo|  bar
  foobar

Example (the brackets [] represent the selection):

[foo
  bar
  foobar]

-> becomes ->

[foo  bar  foobar]
Comment 6 markiewb 2013-06-12 22:38:08 UTC
*** Bug 180883 has been marked as a duplicate of this bug. ***
Comment 7 Martin Balin 2016-07-07 07:27:47 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss
Comment 8 janicki 2016-07-07 11:07:44 UTC
Tested with NetBeans IDE Dev Build 201607070002.  I don't think this enhancement suggestion has been addressed yet.