Auto indent in vi | Unix Linux Forums | UNIX for Dummies Questions & Answers

  Go Back    

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 !!

Auto indent in vi

UNIX for Dummies Questions & Answers

Closed Thread    
Thread Tools Search this Thread Display Modes
Old 06-19-2002
sierra_aar sierra_aar is offline
Registered User
Join Date: Feb 2002
Last Activity: 17 March 2003, 4:12 AM EST
Location: Small country named: Israel
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
Question Auto indent in vi


I use vi for my text editing. Is there a way to use smart indentation?
that is when adding a '{' or '}' that the editor will jump and advance, or any other thing like that?

Sponsored Links
Old 06-19-2002
Kelam_Magnus's Avatar
Kelam_Magnus Kelam_Magnus is offline Forum Advisor  
Registered User
Join Date: Aug 2001
Last Activity: 18 April 2013, 3:03 PM EDT
Location: San Antonio, TX,
Posts: 1,070
Thanks: 0
Thanked 5 Times in 5 Posts
use :set tabstop=N

I know that you can use a setting called tabstop.

First, do a " :set all" to see the settings. Then do a " :set tabstop=N" where N is some number.

This will allow you to use the tab in edit mode to advance N spaces.

I know there is a way to set hot keys for certain actions or words but can't remember right now. I know it has been addressed before on this site.

There is a pamphlet and a book as well about VI from O'Reilly which are both very good.

Here is one link that may help as well.

Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How to indent the file lines using vi? paragkalra Shell Programming and Scripting 2 10-03-2010 11:34 PM
Insert Tabs / Indent text Tonda Shell Programming and Scripting 8 03-03-2009 03:08 AM
vi auto indent whole file at once SaTYR UNIX for Dummies Questions & Answers 2 11-01-2008 03:58 AM
[non-important] Indent here-docs? yongho UNIX for Dummies Questions & Answers 4 06-21-2005 11:51 AM
vim indent Virtuosso UNIX for Dummies Questions & Answers 4 02-06-2003 05:15 PM

All times are GMT -4. The time now is 05:12 AM.