On Thu, Jul 19, 2012 at 4:24 PM, Michael S. Tsirkin <m...@redhat.com> wrote: > On Thu, Jul 19, 2012 at 04:11:21PM +0100, Peter Maydell wrote: >> On 19 July 2012 15:29, Michael S. Tsirkin <m...@redhat.com> wrote: >> > I've been using this to get correct indenting with vim >> > in qemu for a while, but it's a bit easier if we >> > put the settings in the central place. >> > Note that >> > 1. you still need to enable 'exrc' and 'secure' >> > options in your vimrc for these settings to take effect. >> > 2. you can create a .vimrc file if 'exrc' is on but there's >> > need to bypass this configuration. >> >> I think editor configs could reasonably go on the wiki somewhere >> but I'm not sure they belong in our git repo... >> >> -- PMM > > kvm people need to work on both qemu and kernel which > have different styles, so switching styles manually gets old quickly. > The benefit is more people will send patches in the correct style. > What's the harm?
>From my .vimrc: au BufNewFile,BufRead */qemu/*.c,*/qemu/*.h,*/qemu/*.hx,*/qemu/*tool setlocal ts=4 sw=4 et I agree that it's useful to have this, just like .gitignore or .gdbinit. It makes developer's lives easier and encourages consistent coding style. Stefan