All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCHv2] qemu: add .exrc
@ 2012-07-19 14:48 Michael S. Tsirkin
  2012-07-29 14:08 ` Michael S. Tsirkin
  0 siblings, 1 reply; 4+ messages in thread
From: Michael S. Tsirkin @ 2012-07-19 14:48 UTC (permalink / raw)
  To: qemu-devel, Anthony Liguori; +Cc: Michael S. Tsirkin

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.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---

Changes from v1:
    added some comments explaining usage

 .exrc | 7 +++++++
 1 file changed, 7 insertions(+)
 create mode 100644 .exrc

diff --git a/.exrc b/.exrc
new file mode 100644
index 0000000..37755ed
--- /dev/null
+++ b/.exrc
@@ -0,0 +1,7 @@
+"VIM settings to match QEMU coding style.  They are activated by adding the
+"following settings (without the " symbol) as last two lines in $HOME/.vimrc:
+"set secure
+"set exrc
+set expandtab
+set shiftwidth=4
+set smarttab
-- 
MST

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCHv2] qemu: add .exrc
  2012-07-19 14:48 [Qemu-devel] [PATCHv2] qemu: add .exrc Michael S. Tsirkin
@ 2012-07-29 14:08 ` Michael S. Tsirkin
  2012-07-30 15:03   ` Blue Swirl
  0 siblings, 1 reply; 4+ messages in thread
From: Michael S. Tsirkin @ 2012-07-29 14:08 UTC (permalink / raw)
  To: qemu-devel, Anthony Liguori

On Thu, Jul 19, 2012 at 05:48:32PM +0300, Michael S. Tsirkin 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.
> 
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

So two -1 and one +1, given +1 seems to be the only one from a vim user
I'm inclined to go ahead with this one as others aren't likely to be
negatively affected...

> ---
> 
> Changes from v1:
>     added some comments explaining usage
> 
>  .exrc | 7 +++++++
>  1 file changed, 7 insertions(+)
>  create mode 100644 .exrc
> 
> diff --git a/.exrc b/.exrc
> new file mode 100644
> index 0000000..37755ed
> --- /dev/null
> +++ b/.exrc
> @@ -0,0 +1,7 @@
> +"VIM settings to match QEMU coding style.  They are activated by adding the
> +"following settings (without the " symbol) as last two lines in $HOME/.vimrc:
> +"set secure
> +"set exrc
> +set expandtab
> +set shiftwidth=4
> +set smarttab
> -- 
> MST

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCHv2] qemu: add .exrc
  2012-07-29 14:08 ` Michael S. Tsirkin
@ 2012-07-30 15:03   ` Blue Swirl
  2012-07-31  0:30     ` Michael S. Tsirkin
  0 siblings, 1 reply; 4+ messages in thread
From: Blue Swirl @ 2012-07-30 15:03 UTC (permalink / raw)
  To: Michael S. Tsirkin; +Cc: qemu-devel, Anthony Liguori

On Sun, Jul 29, 2012 at 2:08 PM, Michael S. Tsirkin <mst@redhat.com> wrote:
> On Thu, Jul 19, 2012 at 05:48:32PM +0300, Michael S. Tsirkin 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.
>>
>> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
>
> So two -1 and one +1, given +1 seems to be the only one from a vim user
> I'm inclined to go ahead with this one as others aren't likely to be
> negatively affected...
>
>> ---
>>
>> Changes from v1:
>>     added some comments explaining usage
>>
>>  .exrc | 7 +++++++
>>  1 file changed, 7 insertions(+)
>>  create mode 100644 .exrc
>>
>> diff --git a/.exrc b/.exrc
>> new file mode 100644
>> index 0000000..37755ed
>> --- /dev/null
>> +++ b/.exrc
>> @@ -0,0 +1,7 @@
>> +"VIM settings to match QEMU coding style.  They are activated by adding the
>> +"following settings (without the " symbol) as last two lines in $HOME/.vimrc:
>> +"set secure
>> +"set exrc

Doesn't this make VIM to read commands from all files edited, not just
files of QEMU? Aren't there security implications from this
recommendation?

>> +set expandtab
>> +set shiftwidth=4
>> +set smarttab
>> --
>> MST
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCHv2] qemu: add .exrc
  2012-07-30 15:03   ` Blue Swirl
@ 2012-07-31  0:30     ` Michael S. Tsirkin
  0 siblings, 0 replies; 4+ messages in thread
From: Michael S. Tsirkin @ 2012-07-31  0:30 UTC (permalink / raw)
  To: Blue Swirl; +Cc: qemu-devel, Anthony Liguori

On Mon, Jul 30, 2012 at 03:03:56PM +0000, Blue Swirl wrote:
> On Sun, Jul 29, 2012 at 2:08 PM, Michael S. Tsirkin <mst@redhat.com> wrote:
> > On Thu, Jul 19, 2012 at 05:48:32PM +0300, Michael S. Tsirkin 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.
> >>
> >> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> >
> > So two -1 and one +1, given +1 seems to be the only one from a vim user
> > I'm inclined to go ahead with this one as others aren't likely to be
> > negatively affected...
> >
> >> ---
> >>
> >> Changes from v1:
> >>     added some comments explaining usage
> >>
> >>  .exrc | 7 +++++++
> >>  1 file changed, 7 insertions(+)
> >>  create mode 100644 .exrc
> >>
> >> diff --git a/.exrc b/.exrc
> >> new file mode 100644
> >> index 0000000..37755ed
> >> --- /dev/null
> >> +++ b/.exrc
> >> @@ -0,0 +1,7 @@
> >> +"VIM settings to match QEMU coding style.  They are activated by adding the
> >> +"following settings (without the " symbol) as last two lines in $HOME/.vimrc:
> >> +"set secure
> >> +"set exrc
> 
> Doesn't this make VIM to read commands from all files edited, not just
> files of QEMU? Aren't there security implications from this
> recommendation?

That is why you need to set "secure" option.
Another way is to manually source this file,
I will add this explanation.

> >> +set expandtab
> >> +set shiftwidth=4
> >> +set smarttab
> >> --
> >> MST
> >

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-07-31  0:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-19 14:48 [Qemu-devel] [PATCHv2] qemu: add .exrc Michael S. Tsirkin
2012-07-29 14:08 ` Michael S. Tsirkin
2012-07-30 15:03   ` Blue Swirl
2012-07-31  0:30     ` Michael S. Tsirkin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.