The Daily Static
  The Daily Static
UF Archives
Register
UF Membership
Ad Free Site
Postcards
Community

Geekfinder
UFie Gear
Advertise on UF

Forum Rules
& FAQ


Username

Password


Create a New Account

 
 

Back to UserFriendly Strip Comments Index

:g/\t/s//    /g by wheresthefish2005-05-03 03:29:39
  Ack! by LionsPhil2005-05-03 03:40:19
    Tab Wars! by Esteis2005-05-03 03:52:49
      tabs by uplatecoding2005-05-03 07:56:53
        As stated before, by wheresthefish2005-05-03 08:26:04
          You can "enforce" it: by bwkaz 2005-05-03 18:20:33
:set ts=2
:set sw=2

will set vim's indent level (shiftwidth) to 2 spaces. 2 spaces is also the tabstop, which means each indent level will be one tab character. Replace "2" with any number you feel comfortable with, indent anything past the "current indent level" with spaces, and everything will always work.

Unless someone uses a different editor, anyway. Of course, if anyone uses Notepad to write code, they need to be shot... but even emacs might act strangely. I would assume it has some way of setting the "shift width", but I don't know what it is.
[ Reply ]

 

[Todays Cartoon Discussion] [News Index]

Come get yer ARS (Account Registration System) Source Code here!
All images, characters, content and text are copyrighted and trademarks of J.D. Frazer except where other ownership applies. Don't do bad things, we have lawyers.
UserFriendly.Org and its operators are not liable for comments or content posted by its visitors, and will cheerfully assist the lawful authorities in hunting down script-kiddies, spammers and other net scum. And if you're really bad, we'll call your mom. (We're not kidding, we've done it before.)