From: Brian Candler Date: 2012-04-29T18:48:14+09:00 Subject: Re: Global variable for spaces per tab? Thomas Sawyer wrote in post #1058752: > My use case is string unindention. Say I have a string with each line is > prefixed with two "\t" characters and I want to unindent it by upto 2 > spaces. Then I need to translate the tabs to spaces. The unindent method > can have an option for it, but I was wondering if there is some system > setting I can look at for deciding a default. I'm afraid not, it's entirely application-specific. For example, I believe vim and emacs let you embed a magic comment in the text file which says how many spaces to display a tab as. For the shell utility, look at the expand(1) manpage. On OSX this says: -t tab1,tab2,...,tabn Set tab stops at column positions tab1, tab2, ..., tabn. If only a single number is given, tab stops are set that number of column positions apart instead of the default number of 8. So in the absence of any better info, I'd go with 8. -- Posted via http://www.ruby-forum.com/.