Unix/Linux Go Back    

UNIX for Dummies Questions & Answers This forum is closed for new posts. Please post beginner questions to learn unix and learn linux in this forum UNIX for Beginners Questions & Answers

Auto indent in vi

UNIX for Dummies Questions & Answers

Thread Tools Search this Thread Display Modes
Old Unix and Linux 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
Unix or Linux 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 Unix and Linux 06-19-2002
Kelam_Magnus's Unix or Linux Image
Kelam_Magnus Kelam_Magnus is offline Forum Advisor  
Registered User
Join Date: Aug 2001
Last Activity: 24 February 2017, 5:03 PM EST
Location: San Antonio, TX,
Posts: 1,071
Thanks: 0
Thanked 7 Times in 6 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

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux 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 10:34 PM
Insert Tabs / Indent text Tonda Shell Programming and Scripting 8 03-03-2009 02:08 AM
vi auto indent whole file at once SaTYR UNIX for Dummies Questions & Answers 2 11-01-2008 02:58 AM
[non-important] Indent here-docs? yongho UNIX for Dummies Questions & Answers 4 06-21-2005 10:51 AM
vim indent Virtuosso UNIX for Dummies Questions & Answers 4 02-06-2003 04:15 PM

All times are GMT -4. The time now is 04:20 AM.