* [PATCH] use spaces instead of tabs in vim
@ 2012-09-05 16:36 Thanos Makatos
2012-09-13 17:31 ` Ian Jackson
0 siblings, 1 reply; 6+ messages in thread
From: Thanos Makatos @ 2012-09-05 16:36 UTC (permalink / raw)
To: xen-devel; +Cc: thanos.makatos
Tell vim to use spaces instead of tabs for all files residing under
xen-unstable.hg. Must open files from the top-level directory, otherwise it
doesn't work.
Signed-off-by: Thanos Makatos <thanos.makatos@citrix.com>
diff -r 9dc729b75595 -r f32959a0c147 .vimrc
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/.vimrc Wed Sep 05 17:29:54 2012 +0100
@@ -0,0 +1,8 @@
+" Makes vim use spaces instead of tabs for all files under xen-unstable.hg.
+" Caveat: files must be opened from the top-level directory for it to work.
+" Must set the following in your ~/.vimrc:
+" set exrc
+" set secure
+set tabstop=4
+set shiftwidth=4
+set expandtab
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] use spaces instead of tabs in vim
2012-09-05 16:36 [PATCH] use spaces instead of tabs in vim Thanos Makatos
@ 2012-09-13 17:31 ` Ian Jackson
2012-09-13 17:58 ` Stefano Stabellini
0 siblings, 1 reply; 6+ messages in thread
From: Ian Jackson @ 2012-09-13 17:31 UTC (permalink / raw)
To: Thanos Makatos; +Cc: xen-devel
Thanos Makatos writes ("[Xen-devel] [PATCH] use spaces instead of tabs in vim"):
> Tell vim to use spaces instead of tabs for all files residing under
> xen-unstable.hg. Must open files from the top-level directory, otherwise it
> doesn't work.
This is fine by me and looks plausible but I'd like to see a second
opinion from someone who uses vim.
Ian.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] use spaces instead of tabs in vim
2012-09-13 17:31 ` Ian Jackson
@ 2012-09-13 17:58 ` Stefano Stabellini
2012-09-14 8:05 ` Ian Campbell
0 siblings, 1 reply; 6+ messages in thread
From: Stefano Stabellini @ 2012-09-13 17:58 UTC (permalink / raw)
To: Ian Jackson; +Cc: Thanos Makatos, xen-devel@lists.xensource.com
On Thu, 13 Sep 2012, Ian Jackson wrote:
> Thanos Makatos writes ("[Xen-devel] [PATCH] use spaces instead of tabs in vim"):
> > Tell vim to use spaces instead of tabs for all files residing under
> > xen-unstable.hg. Must open files from the top-level directory, otherwise it
> > doesn't work.
>
> This is fine by me and looks plausible but I'd like to see a second
> opinion from someone who uses vim.
>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] use spaces instead of tabs in vim
2012-09-13 17:58 ` Stefano Stabellini
@ 2012-09-14 8:05 ` Ian Campbell
2012-09-14 10:07 ` Stefano Stabellini
0 siblings, 1 reply; 6+ messages in thread
From: Ian Campbell @ 2012-09-14 8:05 UTC (permalink / raw)
To: Stefano Stabellini
Cc: Thanos Makatos, xen-devel@lists.xensource.com, Ian Jackson
On Thu, 2012-09-13 at 18:58 +0100, Stefano Stabellini wrote:
> On Thu, 13 Sep 2012, Ian Jackson wrote:
> > Thanos Makatos writes ("[Xen-devel] [PATCH] use spaces instead of tabs in vim"):
> > > Tell vim to use spaces instead of tabs for all files residing under
> > > xen-unstable.hg. Must open files from the top-level directory, otherwise it
> > > doesn't work.
> >
> > This is fine by me and looks plausible but I'd like to see a second
> > opinion from someone who uses vim.
> >
>
> Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
http://vim.wikia.com/wiki/Modeline_magic suggests you can do it on a
per-file basis. Given the number of different coding styles throughout
the tree wouldn't that be a better option? This set of options is wrong
e.g. for tools/libxl and anything imported from Linux.
It's be a bigger initial patch but once it is done it's done.
People typically copy the magic block from an existing file so as long
as you put the vim one next to the emacs one it should get propagated as
necessary to new files.
Ian.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] use spaces instead of tabs in vim
2012-09-14 8:05 ` Ian Campbell
@ 2012-09-14 10:07 ` Stefano Stabellini
2012-09-14 14:35 ` Ian Jackson
0 siblings, 1 reply; 6+ messages in thread
From: Stefano Stabellini @ 2012-09-14 10:07 UTC (permalink / raw)
To: Ian Campbell
Cc: Thanos Makatos, xen-devel@lists.xensource.com, Ian Jackson,
Stefano Stabellini
On Fri, 14 Sep 2012, Ian Campbell wrote:
> On Thu, 2012-09-13 at 18:58 +0100, Stefano Stabellini wrote:
> > On Thu, 13 Sep 2012, Ian Jackson wrote:
> > > Thanos Makatos writes ("[Xen-devel] [PATCH] use spaces instead of tabs in vim"):
> > > > Tell vim to use spaces instead of tabs for all files residing under
> > > > xen-unstable.hg. Must open files from the top-level directory, otherwise it
> > > > doesn't work.
> > >
> > > This is fine by me and looks plausible but I'd like to see a second
> > > opinion from someone who uses vim.
> > >
> >
> > Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
>
> http://vim.wikia.com/wiki/Modeline_magic suggests you can do it on a
> per-file basis. Given the number of different coding styles throughout
> the tree wouldn't that be a better option?
I agree that would be a better option.
> This set of options is wrong
> e.g. for tools/libxl and anything imported from Linux.
That's right, it would be wrong for Linux, but I think it is correct for
libxl and QEMU (both use 4 whitespaces for indentation), so in practice it
should be correct for anything under xen-unstable except Makefiles and
stuff imported as-is from Linux (xen/arch/arm/lib/* for example). Better
than nothing :)
> It's be a bigger initial patch but once it is done it's done.
>
> People typically copy the magic block from an existing file so as long
> as you put the vim one next to the emacs one it should get propagated as
> necessary to new files.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] use spaces instead of tabs in vim
2012-09-14 10:07 ` Stefano Stabellini
@ 2012-09-14 14:35 ` Ian Jackson
0 siblings, 0 replies; 6+ messages in thread
From: Ian Jackson @ 2012-09-14 14:35 UTC (permalink / raw)
To: Stefano Stabellini
Cc: Thanos Makatos, xen-devel@lists.xensource.com, Ian Campbell
Stefano Stabellini writes ("Re: [Xen-devel] [PATCH] use spaces instead of tabs in vim"):
> That's right, it would be wrong for Linux, but I think it is correct for
> libxl and QEMU (both use 4 whitespaces for indentation), so in practice it
> should be correct for anything under xen-unstable except Makefiles and
> stuff imported as-is from Linux (xen/arch/arm/lib/* for example). Better
> than nothing :)
On that basis, it should go in, I think.
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Ian.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-09-14 14:35 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-05 16:36 [PATCH] use spaces instead of tabs in vim Thanos Makatos
2012-09-13 17:31 ` Ian Jackson
2012-09-13 17:58 ` Stefano Stabellini
2012-09-14 8:05 ` Ian Campbell
2012-09-14 10:07 ` Stefano Stabellini
2012-09-14 14:35 ` Ian Jackson
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).