[svlug] I asked about emacs tab magic

Larry Colen lrc at red4est.com
Thu May 31 12:14:54 PDT 2007


I was pointed to this very handy page:
http://www.student.northpark.edu/pemente/emacs_tabs.htm#FileVars

And my solution was to change the first line of the file from:

/* vi: set ts=4 sw=4 : */

to

/* vi: set ts=4 sw=4 :  -*-  tab-width:4  c-basic-offset:4   -*-  */

Now it seems to work the same in both vi and emacs, and matches the
company doctrine of indenting by four columns.

One of these days, I'll write a tokenized version of C that will let
you tell the editor how you want the source formatted and it will
automagically just work right.

-- 
Spinoff tech is all well and good, but we still don't have 100 MPG passenger 
vehicles.  We have 5 MPG Hummer road hogs for guys who can't stay in their 
lanes on our Eisenhower administration sponsored(!) freeways.  -Pat Steppic

Larry Colen             lrc at red4est.com            http://www.red4est.com/lrc




More information about the svlug mailing list