LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-11-2005, 11:24 PM   #1
Chaitanyayardi
LQ Newbie
 
Registered: Jul 2004
Posts: 15

Rep: Reputation: 0
Vi Columns


How can I set no of columns in vi editor? So that it will show only those characters in one line
 
Old 05-11-2005, 11:43 PM   #2
ashamril
Member
 
Registered: Jan 2003
Location: cyberjaya
Distribution: rh mdk deb fed suse
Posts: 99

Rep: Reputation: 15
i'm not sure whether this is u looking for,

in vi:

:set number
 
Old 05-11-2005, 11:58 PM   #3
Chaitanyayardi
LQ Newbie
 
Registered: Jul 2004
Posts: 15

Original Poster
Rep: Reputation: 0
Vi Coulumn

Sorry but that doesnt fulfill my req. Actually i have 480 char long text having 48 chars logical line there is no end line char at 49th. But i would like to see that string in 10 lines having 48 chars each in Vi.
 
Old 05-12-2005, 02:08 AM   #4
ashamril
Member
 
Registered: Jan 2003
Location: cyberjaya
Distribution: rh mdk deb fed suse
Posts: 99

Rep: Reputation: 15
i'm not sure whether vi can do such thing, but u might try fmt - simple optimal text formatter

$ fmt -w 48 filename
 
Old 05-12-2005, 02:31 AM   #5
kencaz
Senior Member
 
Registered: Mar 2005
Location: Las Vegas, NV
Distribution: Mandriva Slackware FreeBSD
Posts: 1,468

Rep: Reputation: 48
You might try:
:set wrapmargin=32
:set wrap
This should set the wrap margin at 48. (80 - 48)

KC
 
Old 05-12-2005, 07:27 AM   #6
Chaitanyayardi
LQ Newbie
 
Registered: Jul 2004
Posts: 15

Original Poster
Rep: Reputation: 0
Vi Coulumn

Sorry Both things are not working. One more thing is that 480 char string may have spaces.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
columns & rows Ammad Linux - General 1 08-08-2005 04:02 AM
Count of two columns vimal480 Programming 1 04-16-2005 02:25 AM
columns to lines Luskacik Linux - General 2 08-31-2004 11:38 AM
rows and columns digitalgravy Linux - General 2 03-16-2004 06:47 PM
How can I see the other 10 columns sakulagi Linux - Software 1 06-16-2003 09:45 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:30 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration