Thread: Tabs or Spaces?
View Single Post
Old 18th June 2008
TerryP's Avatar
TerryP TerryP is offline
Arp Constable
 
Join Date: May 2008
Location: USofA
Posts: 1,547
Default

Code:
:set shiftwidth=4

And indent lines with ^T or >> instead of 'tab' -- autoindent will respect this in OpenBSDs nvi *if* the indent is equal to sw but not ts, it will however use tabs to fill it up (e.g. two 'shiftwidths' gets a tab).


I don't think nvi will let you remap the tab key but one could always modify their terminal/console so pressing tab sends the same thing as control+t I guess.


PS

if you leave tabstop set to default 8 while using shiftwidth spaces to indent, you will be able to tell when unwanted tabs creep into your file.
__________________
My Journal

Thou shalt check the array bounds of all strings (indeed, all arrays), for surely where thou typest ``foo'' someone someday shall type ``supercalifragilisticexpialidocious''.

Last edited by TerryP; 18th June 2008 at 09:51 PM.
Reply With Quote