Jun's Blog

Output, activities, memo and etc.

Read Ruby source - 5. vim settings

Referring the C coding style of Ruby project,

https://bugs.ruby-lang.org/projects/ruby/wiki/DeveloperHowto

Use TAB instead of 8 SPs in C
...
au FileType c setl ts=8 sw=4 noexpandtab
au FileType ruby setl nowrap tabstop=8 tw=0 sw=2 expandtab

Right now set C settings to read the C code in Ruby source to .vimrc.
yacc setting is to read ./parse.y .

$ vi ~/.vimrc
...
" C
" https://bugs.ruby-lang.org/projects/ruby/wiki/DeveloperHowto
autocmd FileType c set tabstop=8|set shiftwidth=4|set noexpandtab
autocmd FileType yacc set tabstop=8|set shiftwidth=4|set noexpandtab

But I could see many 4 space indents in the source code.
It is more than tab indent.
I wonder that.