Sponsored Content
Full Discussion: How to wrap words in vi?
Top Forums UNIX for Dummies Questions & Answers How to wrap words in vi? Post 302478337 by radoulov on Tuesday 7th of December 2010 05:22:55 PM
Old 12-07-2010
For the new text:

Code:
:set tw=80

For the already inserted text:

Code:
:%!fold -w80

 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

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? (3 Replies)
Discussion started by: dangral
3 Replies

2. Shell Programming and Scripting

Wrap Interactive Script

Does anyone know of a program to wrap an interactive script into an application..I tried using platypus but i want a utility to allow interactive scripts to be run in a stand-alone window to avoid .profile settings on multiple computers...platypus provides the option of a text window output but... (0 Replies)
Discussion started by: meskue
0 Replies

3. AIX

Wrap Plug Test

Can someone show me on how to use DIAG command in doing a wrap plug test for fcs0 (FC Adapter)? (3 Replies)
Discussion started by: apra143
3 Replies

4. Shell Programming and Scripting

Word wrap with sed

Hi, I got some timetable in a file but it is all mixed up like this 01:00 hgrtwhrt #104:00 tyergethr05:00 tqqrthd qrth #107:00 qhtrhqerth10:00 qerthrthqr qtrqthr qthrrt11:00 thqrthqrthrr rthgreth #212:00 trhrthrth14:00 wrthwrtwrqrthwrthwr #2116:00 trqhthtr: rthrthr17:00 rtwhtrhwrth rthwrt... (6 Replies)
Discussion started by: stinkefisch
6 Replies

5. Shell Programming and Scripting

Shell script to find out words, replace them and count words

hello, i 'd like your help about a bash script which: 1. finds inside the html file (it is attached with my post) the code number of the Latest Stable Kernel, 2.finds the link which leads to the download location of the Latest Stable Kernel version, (the right link should lead to the file... (3 Replies)
Discussion started by: alex83
3 Replies

6. UNIX for Dummies Questions & Answers

line wrap in sed

I tried line wrap in sed by sed -l 20 ' n' and as far as i understand each long line would be split into lenght of 20 characters in each. but thats not happening.wats going wrong:confused: (5 Replies)
Discussion started by: mithun1!
5 Replies

7. UNIX for Dummies Questions & Answers

Word Wrap

When I cat a file that has several hundred characters in a line, the right hand side is truncated. How can I make everything displayed on my screen word wrap? (6 Replies)
Discussion started by: bsimon
6 Replies

8. Shell Programming and Scripting

Gawk gensub, match capital words and lowercase words

Hi I have strings like these : Vengeance mitt Men Vengeance gloves Women Quatro Windstopper Etip gloves Quatro Windstopper Etip gloves Girls Thermobite hooded jacket Thermobite Triclimate snow jacket Boys Thermobite Triclimate snow jacket and I would like to get the lower case words at... (2 Replies)
Discussion started by: louisJ
2 Replies

9. Shell Programming and Scripting

Replace particular words in file based on if finds another words in that line

Hi All, I need one help to replace particular words in file based on if finds another words in that file . i.e. my self is peter@king. i am staying at north sydney. we all are peter@king. How to replace peter to sham if it finds @king in any line of that file. Please help me... (8 Replies)
Discussion started by: Rajib Podder
8 Replies
Text::Wrapper(3pm)					User Contributed Perl Documentation					Text::Wrapper(3pm)

NAME
Text::Wrapper - Word wrap text by breaking long lines VERSION
This document describes version 1.04 of Text::Wrapper, released May 25, 2012. SYNOPSIS
require Text::Wrapper; $wrapper = Text::Wrapper->new(columns => 60, body_start => ' '); print $wrapper->wrap($text); $wrapper->columns(70); DESCRIPTION
Text::Wrapper provides simple word wrapping. It breaks long lines, but does not alter spacing or remove existing line breaks. If you're looking for more sophisticated text formatting, try the Text::Format module. Reasons to use Text::Wrapper instead of Text::Format: o Text::Wrapper is significantly smaller. o It does not alter existing whitespace or combine short lines. It only breaks long lines. Again, if Text::Wrapper doesn't meet your needs, try Text::Format. ATTRIBUTES
body_start The text that begins the second and following lines of a paragraph. (Default '') columns The number of columns to use. This includes any text in body_start or par_start. (Default 70) par_start The text that begins the first line of each paragraph. (Default '') wrap_after A line can wrap after any of the characters in this string. Setting this to the empty string means a line will wrap only at whitespace. (Default '-') METHODS
wrap $wrapper->wrap($text) Returns a word wrapped copy of $text. The original is not altered. CONFIGURATION AND ENVIRONMENT
Text::Wrapper requires no configuration files or environment variables. DEPENDENCIES
None. INCOMPATIBILITIES
None reported. BUGS AND LIMITATIONS
Does not handle tabs (they're treated just like spaces). All characters are treated as being the same width, including zero-width spaces and combining accents. Does not break words that can't fit on one line. AUTHOR
Christopher J. Madsen "<perl AT cjmweb.net>" Please report any bugs or feature requests to "<bug-Text-Wrapper AT rt.cpan.org>" or through the web interface at http://rt.cpan.org/Public/Bug/Report.html?Queue=Text-Wrapper <http://rt.cpan.org/Public/Bug/Report.html?Queue=Text-Wrapper>. You can follow or contribute to Text-Wrapper's development at http://github.com/madsen/text-wrapper <http://github.com/madsen/text- wrapper>. COPYRIGHT AND LICENSE
This software is copyright (c) 2012 by Christopher J. Madsen. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. DISCLAIMER OF WARRANTY
BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENSE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. perl v5.14.2 2012-05-25 Text::Wrapper(3pm)
All times are GMT -4. The time now is 10:51 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy