![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| 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 !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| regarding vi editor | girish_shukla | SCO | 4 | 2 Weeks Ago 07:36 PM |
| set EDITOR=vi -> default editor not setting for cron tab | aarora_98 | Shell Programming and Scripting | 6 | 09-12-2008 11:01 PM |
| Which editor to use? | Nafanja | UNIX for Dummies Questions & Answers | 5 | 11-29-2007 09:58 AM |
| Vi editor | jazz | High Level Programming | 1 | 11-17-2005 05:37 AM |
| vi editor | eloquent99 | UNIX for Dummies Questions & Answers | 1 | 01-14-2003 02:49 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hello everbody...
I am a new unix user and I started working with the vi editor, i have a little question for you, so hope that you can help me here is the question: How I can to change the screen width from 80 to 132 columns ?? What´s the command for do that?? I very appreciate your help... Thanks to all |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
Hi pbsys,
vi uses the terminal settings to determine how many rows and columns to show you. You will have to set this prior to starting vi. There are more then 1 factor involved in this process. First you have to set the columns on Unix. You can do this by running: stty columns 132 from the command line. That will take care of the Unix side. The part I can't tell you specifics about is your telnet/xterm/other software. You will need to resize the display for this program so it can show you the 132 columns across. If it is not wide enough, it may word wrap or give you a scroll bar or something. Most modern telnet/xterm/other software will allow you to use the mouse to change the size of the screen. With most xterm software, you simply use the mouse to size the window before opening vi and it displays however many characters fit in that window on one line before wrapping. With the telnet that comes standard with NT, you can change the properities to display 132 columns. Hope this helps. TioTony |
|
#3
|
||||
|
||||
|
vi help
I know that you question was not about vi specifically, but here is some good info for VI related questions.
If when you vi a file, type this while in vi mode. ":set all" this will show you everything that is available to be set in vi mode. To add line numbers type ":set number". To unset this just type ":set nonumber". There are many settings that you can control in vi. Also, you can create an .exrc file that controls your vi parameters. You probably already have one in your home directory. Do a "man vi" scroll down to "Program Limits". This will show you the internal limits for vi. Here is an excerpt from there. Program Limits vi places the following limits on files being edited. Maximum Line Length LINE_MAX characters (defined in <limits.h>), including 2-3 bytes for overhead. Thus, if the value specified for LINE_MAX is 2048, a line length up to 2044 characters should cause no problem. If you load a file that contain lines longer than the specified limit, the lines are truncated to the stated maximum length. Saving the file will write the truncated version over the original file, thus overwriting the original lines completely. Attempting to create lines longer than the allowable maximum for the editor produces a line too long error message. Maximum File Size The maximum file length of 234,239 lines is silently enforced. O'Reilly has 2 very good books on vi. One is the full size book on VI, about $30. The other book is the condensed version of this book. Only about $10. Very good books!
__________________
My brain is your brain |
||||
| Google The UNIX and Linux Forums |