The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
usage of module Text::Wrap; trek Shell Programming and Scripting 3 06-04-2008 11:08 PM
word wrap issue with grep bowtiextreme HP-UX 4 04-30-2008 04:39 PM
SCO acquisition wrap-up iBot UNIX and Linux RSS News 0 02-19-2008 02:30 PM
Wrap Interactive Script meskue Shell Programming and Scripting 0 06-23-2006 03:21 PM
Should I use sed/ grep/awk for wrap file? vanda_25 Shell Programming and Scripting 6 05-04-2006 09:59 AM

Closed Thread
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 10-30-2002
Registered User
 

Join Date: Oct 2002
Posts: 676
word wrap in vi

I am using vi to edit shell scripts, but whenever I get to the end of the line it goes to the next line, and when I run the script it considers whatever was placed onthe next line a new command...I guess this has to do with word wrap- how do I continue to write on one line?
Forum Sponsor
  #2  
Old 10-30-2002
Kelam_Magnus's Avatar
Registered User
 

Join Date: Aug 2001
Location: DFW McKinney, TX,
Posts: 1,069
First, don't hit the enter/return key when you go to the next line, JUST KEEP TYPING and you will be okay, at least you should be.

However, what you are looking for is wordwrap. While vi'ing a file. do ":set all " at the command line and change from 0 to some number.

Here is a great VI link.

http://www.thomer.com/vi/vi.html

__________________
My brain is your brain
  #3  
Old 10-30-2002
Registered User
 

Join Date: Oct 2002
Posts: 676
I checked the settings and there was no wordwrap setting only this:
wrapmargin=7

I have not been hitting enter when I reach the end. Does this setting mean that I can go 7 characters past the normal margin and then it goes to the next line?
  #4  
Old 10-30-2002
RTM's Avatar
RTM RTM is offline
Hog Hunter
 
Join Date: Apr 2002
Location: On my motorcycle
Posts: 3,039
Change wrapmargin to 0 - the setting of 7 is for 70 characters and it then inserts a new line (which doesn't seem to follow the info I found about it).

wrapmargin= (wm=) 0 Set the right margin. Greater than 0 will word wrap n spaces from the edge of the screen

(found at uch.gr vi faq - look for set options in the right frame)

Last edited by RTM; 10-30-2002 at 11:52 AM.
Google The UNIX and Linux Forums
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 12:56 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0