From: Monty Williams Date: 2011-05-18T01:15:58+09:00 Subject: [ruby-core:36271] Re: Whitespace conventions? ----- Original Message ----- > From: "Ryan Davis" > To: ruby-core@ruby-lang.org > Sent: Tuesday, May 17, 2011 2:05:48 AM > Subject: [ruby-core:36262] Re: Whitespace conventions? > > > On May 16, 2011, at 23:54 , NARUSE, Yui wrote: > > > 2011/5/17 Steve Klabnik : > >> So, while working on some documentation, I've noticed that there's > >> a lot of > >> mismatched spaces and tabs in the standard library. Is there a > >> real > >> convention for this? Would a patch that converts everything to two > >> spaces > >> rather than tabs, and removes white spaces at the ends of lines be > >> accepted? > >> I'd imagine that being consistent is better than a patchwork of > >> indentation. > > > > If you use Emacs or Vim, I wrote a guide: > > http://redmine.ruby-lang.org/projects/ruby/wiki/DeveloperHowto#coding-style > > I am disappointed that we can't just switch entirely to spaces. It > seems so antiquated. > > That said, your URL suggests you wouldn't mind a sweeping commit for > all the ruby code with tabs left. Would that be OK for Steve or me > to do? > For anyone who keeps their code in a local git repo: I find it very useful to have a script in .git/hooks/pre-commit that won't let me do a commit if there are mixed spaces & tabs or trailing tabs. I'd assume the same is possible for SVN. -- Monty