From: "NARUSE, Yui" Date: 2011-05-17T15:54:42+09:00 Subject: [ruby-core:36258] Re: Whitespace conventions? 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 You can add another exmaple if you use another editor. if you are a vim user and want to specify it only to Ruby's source, you may use BufNewFile and BufRead. Following is an example when I contributed to openssl project. au BufNewFile,BufRead src/openssl/*/*.c setl ts=8 sw=8 scino=:0=8t0f8{8}0 -- NARUSE, Yui �