On Fri, 4 Oct 2013 15:09:42 +0200 Martin Vidner <[email protected]> wrote:
> This howto should help you follow the [style guide][1]. > ruby-mode for Emacs has the defaults right. > Plain vim defaults to Tab characters so it needs adjustments in > ~/.vimrc . > > [1]: https://github.com/SUSE/style-guides/blob/master/Ruby.md > > Rules > ----- > > 1. No Tab Characters > > emacs: (setq-default indent-tabs-mode nil) > vim: set expandtab > > 2. Existing Tab Characters are 8 Columns Wide > > emacs: (setq-default tab-width 8) > vim: set tabstop=8 > > A notable offender is GitHub which uses 4. See point 1. > The tab *key* is a different matter, see point 3. > > 3. Ruby Indentation Level is 2 > > emacs: (setq-default ruby-indent-level 2) > vim: set softtabstop=2 > set shiftwidth=2 > > If you disagree with this, please read > JWZ's explanation of the concepts first: > > http://www.jwz.org/doc/tabs-vs-spaces.html > > Future > ------ > > I have also looked into these things but don't have a recommendation. > If you want me to continue, speak up. > > - trailing whitespace: > lesser impact, > I haven't nailed down the right config yet > - local configuration: > file-specific is easy but clutters files > directory-specific needs a vim plugin; Emacs just works, as > usual ;-) Well, you can have local configuration depending on file type for vim, see http://stackoverflow.com/questions/1562633/setting-vim-whitespace-preferences-by-filetype I found it quite useful to have vim working with makefiles. http://vim.wikia.com/wiki/Converting_tabs_to_spaces (comment 1) Josef PS. Can you move it somewhere to developer documentation? I think it is quite useful for new developer to have persistent place.
signature.asc
Description: PGP signature
