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
command to find out total size of a specific file size (spread over the server) abhinov SUN Solaris 3 08-08-2007 03:48 AM
How to change size of command line in unix krishna UNIX for Advanced & Expert Users 7 07-29-2007 06:03 PM
bash script working for small size files but not for big size files. davidpreml Shell Programming and Scripting 1 11-01-2006 07:06 AM
how to change \tmpdir directory or increase size? ray UNIX for Dummies Questions & Answers 13 06-07-2006 05:07 AM
File system size change jvinn UNIX for Advanced & Expert Users 9 05-11-2005 03:13 PM

Closed Thread
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-11-2002
Registered User
 

Join Date: Feb 2002
Posts: 31
Talking how to change the tab size in vi?

the default size is 8. i found it's too big.

how can i change the tab size in vi? is it a good idea to change it at all?

thks
Forum Sponsor
  #2 (permalink)  
Old 04-11-2002
Neo's Avatar
Neo Neo is offline
Administrator
 

Join Date: Sep 2000
Location: Asia Pacific
Posts: 4,191
In vi at the ":" prompt type:

Quote:
set ts=4
for a tab size of 4
  #3 (permalink)  
Old 04-11-2002
Registered User
 

Join Date: Feb 2002
Posts: 31
but,

Thxs Neo

how to setup for all vi. I mean every time i go into vi, the tab size is 4.
do i want too much?
  #4 (permalink)  
Old 04-11-2002
Neo's Avatar
Neo Neo is offline
Administrator
 

Join Date: Sep 2000
Location: Asia Pacific
Posts: 4,191
no problem, just use the your resource file...


Some useful set options for your ~/.exrc file:

:set all Display all Set options
:set autoindent Indent following lines to the indentation of previous line.
:set ts=4 set tab stop to 4 char
:set ignorecase Ignore case during pattern matching.
:set list Show special characters in the file.
:set number Display line numbers.
:set shiftwidth=n Width for shifting operators << and >>
:set showmode Display when in Insert, Append, or Replace mode.
:set wrapmargin=n Set right margin 80-n for autowrapping lines (inserting newlines). 0 turns it off.
  #5 (permalink)  
Old 04-11-2002
Registered User
 

Join Date: Sep 2001
Posts: 36
Neo,

Where can I find the .exrc file? It doesnt exist in the $HOME directory or the root (/)
  #6 (permalink)  
Old 04-11-2002
LivinFree's Avatar
Goober Extraordinaire
 

Join Date: Jul 2001
Location: Portland, OR, USA
Posts: 1,584
You should create it in your $HOME and vi should read it on startup...
  #7 (permalink)  
Old 04-15-2002
Registered User
 

Join Date: Apr 2002
Posts: 4
After creating the .exrc file in my $HOME dir...

I managed to get vi to read the .exrc file by using the :'source .exrc' command.

But is there a way you can get vi to read it automatically?
Google UNIX.COM
Closed Thread

Thread Tools
Display Modes




All times are GMT -7. The time now is 05:01 PM.


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

Content Relevant URLs by vBSEO 3.2.0