- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: how to combine two lines into 1 long line in v...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2007 07:29 AM
03-22-2007 07:29 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2007 07:32 AM
03-22-2007 07:32 AM
Re: how to combine two lines into 1 long line in vi?
uppercase J (join) will join the line with the next one.
Chris
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2007 07:33 AM
03-22-2007 07:33 AM
Re: how to combine two lines into 1 long line in vi?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2007 07:33 AM
03-22-2007 07:33 AM
Re: how to combine two lines into 1 long line in vi?
Position the cursor on the line that you want to join the following line with, and type "J".
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2007 07:54 AM
03-22-2007 07:54 AM
Re: how to combine two lines into 1 long line in vi?
But, after I type "J", there is still a empty character between two lines. Are there any way to automatically combine these two lines without manually removing that empty character?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2007 07:54 AM
03-22-2007 07:54 AM
Re: how to combine two lines into 1 long line in vi?
Shift-J has always worked for me.
Hit escape key once to change modes if that fails to work.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2007 08:06 AM
03-22-2007 08:06 AM
SolutionJ Join the current line with the next one, supplying appropriate whitespace: one space between words, two spaces after a period, and no spaces at all if the first character of the next line is a closing parenthesis ()). A preceding count causes the specified number of lines to be joined, instead of just two.
I do not know of any other way to do what you are requesting. Hope this helps!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2007 03:43 PM
03-22-2007 03:43 PM
Re: how to combine two lines into 1 long line in vi?
I suppose you could use "map" to make it a keystroke?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-23-2007 01:22 AM
03-23-2007 01:22 AM
Re: how to combine two lines into 1 long line in vi?
Ctrl-J does not join lines.
Alfred
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-23-2007 02:33 AM
03-23-2007 02:33 AM
Re: how to combine two lines into 1 long line in vi?
Let me clarify. To prevent a whitespace from appearing when doing a Join, the following line must contain a ")". You are correct that the Shift-J may be used anywhere, but it will also put a whitespace between the two. Hanry is looking for a way to prevent the whitespace from appearing.