* [Qemu-devel] [PATCH] gitignore: Ignore vim per-project config and clang complete @ 2017-06-02 4:08 Qu Wenruo 2017-06-02 14:57 ` Eric Blake 0 siblings, 1 reply; 3+ messages in thread From: Qu Wenruo @ 2017-06-02 4:08 UTC (permalink / raw) To: qemu-devel Since we have already ignored ctags, ignoring .clangcomplete for vim-clang_completion is quite reasonable for me. (Not to mention vim-clang_completion provides better and more accurate completion and definition search) Also, qemu coding style is using 4 space as indent other than 8-space tab, it also makes sense to ignore per-project vim config file. Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com> --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 55a001e3b8..c7c6eec0b6 100644 --- a/.gitignore +++ b/.gitignore @@ -113,6 +113,8 @@ cscope.* tags TAGS +.vim* +.clang_complete docker-src.* *~ trace.h -- 2.13.0 ^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] gitignore: Ignore vim per-project config and clang complete 2017-06-02 4:08 [Qemu-devel] [PATCH] gitignore: Ignore vim per-project config and clang complete Qu Wenruo @ 2017-06-02 14:57 ` Eric Blake 2017-06-05 0:45 ` Qu Wenruo 0 siblings, 1 reply; 3+ messages in thread From: Eric Blake @ 2017-06-02 14:57 UTC (permalink / raw) To: Qu Wenruo, qemu-devel [-- Attachment #1: Type: text/plain, Size: 1444 bytes --] On 06/01/2017 11:08 PM, Qu Wenruo wrote: > Since we have already ignored ctags, ignoring .clangcomplete for > vim-clang_completion is quite reasonable for me. > (Not to mention vim-clang_completion provides better and more accurate > completion and definition search) > > Also, qemu coding style is using 4 space as indent other than 8-space > tab, it also makes sense to ignore per-project vim config file. We already have a per-project emacs config file (.dir-locals.el); I think it would be a better idea if you were to propose adding an appropriate .vim* file for inclusion in the project that makes vim work out-of-the-box with correct settings, rather than masking the file as unaddable and requiring all vim-using contributors to recreate the same settings. (But as I am not personally a vim user, I can neither provide such a sample file myself, nor review one if you post it). > > Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com> > --- > .gitignore | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/.gitignore b/.gitignore > index 55a001e3b8..c7c6eec0b6 100644 > --- a/.gitignore > +++ b/.gitignore > @@ -113,6 +113,8 @@ > cscope.* > tags > TAGS > +.vim* > +.clang_complete The idea of adding .clang_complete to the exclusions makes sense to me. -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 604 bytes --] ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] gitignore: Ignore vim per-project config and clang complete 2017-06-02 14:57 ` Eric Blake @ 2017-06-05 0:45 ` Qu Wenruo 0 siblings, 0 replies; 3+ messages in thread From: Qu Wenruo @ 2017-06-05 0:45 UTC (permalink / raw) To: Eric Blake, qemu-devel At 06/02/2017 10:57 PM, Eric Blake wrote: > On 06/01/2017 11:08 PM, Qu Wenruo wrote: >> Since we have already ignored ctags, ignoring .clangcomplete for >> vim-clang_completion is quite reasonable for me. >> (Not to mention vim-clang_completion provides better and more accurate >> completion and definition search) >> >> Also, qemu coding style is using 4 space as indent other than 8-space >> tab, it also makes sense to ignore per-project vim config file. > > We already have a per-project emacs config file (.dir-locals.el); I > think it would be a better idea if you were to propose adding an > appropriate .vim* file for inclusion in the project that makes vim work > out-of-the-box with correct settings, rather than masking the file as > unaddable and requiring all vim-using contributors to recreate the same > settings. (But as I am not personally a vim user, I can neither provide > such a sample file myself, nor review one if you post it). The problem is there is no out-of-box per-project vimrc behavior for vanilla vim. There are several ways to do it, like using exrc, which will search for ".vimrc" or ".exrc" in current directory. Although this method will cause annoying prompt every time vim is started up. If this method is preferred, I can change it to .vimrc other than using .vim*. Or manually call "silent so .vimrc", which is also my preferred method. In case of using "so" method, users can specify the filename as they like. So I use ".vim*". Although, we have the 3rd method, to match current working path and then apply the per-project settings. This method don't need any modification to qemu, but if one is working on several projects, this could be quite messy. Thanks, Qu > >> >> Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com> >> --- >> .gitignore | 2 ++ >> 1 file changed, 2 insertions(+) >> >> diff --git a/.gitignore b/.gitignore >> index 55a001e3b8..c7c6eec0b6 100644 >> --- a/.gitignore >> +++ b/.gitignore >> @@ -113,6 +113,8 @@ >> cscope.* >> tags >> TAGS >> +.vim* >> +.clang_complete > > The idea of adding .clang_complete to the exclusions makes sense to me. > ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-06-05 0:45 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2017-06-02 4:08 [Qemu-devel] [PATCH] gitignore: Ignore vim per-project config and clang complete Qu Wenruo 2017-06-02 14:57 ` Eric Blake 2017-06-05 0:45 ` Qu Wenruo
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).