All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] bitbake.vim: detect *.bbappend files in ftdetect automatically
@ 2012-12-12 18:42 Eren Türkay
  2012-12-12 18:57 ` Robert P. J. Day
  2012-12-13 19:57 ` Trevor Woerner
  0 siblings, 2 replies; 7+ messages in thread
From: Eren Türkay @ 2012-12-12 18:42 UTC (permalink / raw)
  To: bitbake-devel

[-- Attachment #1: Type: text/plain, Size: 797 bytes --]

Currently, *.bb and *.bbclass files are automatically highlighted and
detected as a bitbake file. Since *.bbappend files are also bitbake
files, vim plugin should automatically detect and highlight it as well.
---
 contrib/vim/ftdetect/bitbake.vim |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/contrib/vim/ftdetect/bitbake.vim b/contrib/vim/ftdetect/bitbake.vim
index 179e4d9..6822e24 100644
--- a/contrib/vim/ftdetect/bitbake.vim
+++ b/contrib/vim/ftdetect/bitbake.vim
@@ -11,7 +11,7 @@ if &compatible || version < 600
 endif
 
 " .bb and .bbclass
-au BufNewFile,BufRead *.b{b,bclass}	set filetype=bitbake
+au BufNewFile,BufRead *.b{b,bappend,bclass}	set filetype=bitbake
 
 " .inc
 au BufNewFile,BufRead *.inc 		set filetype=bitbake
-- 
1.7.7.5

[-- Attachment #2: Type: application/pgp-signature, Size: 850 bytes --]

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

* Re: [PATCH] bitbake.vim: detect *.bbappend files in ftdetect automatically
  2012-12-12 18:42 [PATCH] bitbake.vim: detect *.bbappend files in ftdetect automatically Eren Türkay
@ 2012-12-12 18:57 ` Robert P. J. Day
  2012-12-12 19:53   ` Eren Türkay
  2012-12-13 19:57 ` Trevor Woerner
  1 sibling, 1 reply; 7+ messages in thread
From: Robert P. J. Day @ 2012-12-12 18:57 UTC (permalink / raw)
  To: Eren Türkay; +Cc: bitbake-devel

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1470 bytes --]

On Wed, 12 Dec 2012, Eren Türkay wrote:

> Currently, *.bb and *.bbclass files are automatically highlighted and
> detected as a bitbake file. Since *.bbappend files are also bitbake
> files, vim plugin should automatically detect and highlight it as well.
> ---
>  contrib/vim/ftdetect/bitbake.vim |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/contrib/vim/ftdetect/bitbake.vim b/contrib/vim/ftdetect/bitbake.vim
> index 179e4d9..6822e24 100644
> --- a/contrib/vim/ftdetect/bitbake.vim
> +++ b/contrib/vim/ftdetect/bitbake.vim
> @@ -11,7 +11,7 @@ if &compatible || version < 600
>  endif
>
>  " .bb and .bbclass
> -au BufNewFile,BufRead *.b{b,bclass}	set filetype=bitbake
> +au BufNewFile,BufRead *.b{b,bappend,bclass}	set filetype=bitbake

  gack.  there's no compelling reason to be that, um, pedantic with
the wildcard pattern.  just use

  *.{bb,bbappend,bbclass}

trying to save a couple characters while introducing that kind of
visual ugliness just isn't worth it.


rday

-- 

========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================

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

* Re: [PATCH] bitbake.vim: detect *.bbappend files in ftdetect automatically
  2012-12-12 18:57 ` Robert P. J. Day
@ 2012-12-12 19:53   ` Eren Türkay
  2012-12-12 20:02     ` Robert P. J. Day
  0 siblings, 1 reply; 7+ messages in thread
From: Eren Türkay @ 2012-12-12 19:53 UTC (permalink / raw)
  To: Robert P. J. Day; +Cc: bitbake-devel

[-- Attachment #1: Type: text/plain, Size: 705 bytes --]

On Wed, Dec 12, 2012 at 01:57:53PM -0500, Robert P. J. Day wrote:
>   gack.  there's no compelling reason to be that, um, pedantic with
> the wildcard pattern.  just use
> 
>   *.{bb,bbappend,bbclass}
> 
> trying to save a couple characters while introducing that kind of
> visual ugliness just isn't worth it.

It can be used but I was not the one who introduced "that kind of visual
ugliness" :) I just sticked with the old one, adding bbappend.

Visual ugliness/goodness depends on person to person. To me, it doesn't
look ugly at all. I've seen things uglier than just an innocent
wildcard pattern.

Regards,
Eren

-- 
    . 73! DE TA1AET
      http://linkedin.com/in/erenturkay

[-- Attachment #2: Type: application/pgp-signature, Size: 850 bytes --]

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

* Re: [PATCH] bitbake.vim: detect *.bbappend files in ftdetect automatically
  2012-12-12 19:53   ` Eren Türkay
@ 2012-12-12 20:02     ` Robert P. J. Day
  2012-12-12 20:31       ` Eren Türkay
  0 siblings, 1 reply; 7+ messages in thread
From: Robert P. J. Day @ 2012-12-12 20:02 UTC (permalink / raw)
  To: Eren Türkay; +Cc: bitbake-devel

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1703 bytes --]

On Wed, 12 Dec 2012, Eren Türkay wrote:

> On Wed, Dec 12, 2012 at 01:57:53PM -0500, Robert P. J. Day wrote:
> >   gack.  there's no compelling reason to be that, um, pedantic with
> > the wildcard pattern.  just use
> >
> >   *.{bb,bbappend,bbclass}
> >
> > trying to save a couple characters while introducing that kind of
> > visual ugliness just isn't worth it.
>
> It can be used but I was not the one who introduced "that kind of
> visual ugliness" :) I just sticked with the old one, adding
> bbappend.
>
> Visual ugliness/goodness depends on person to person. To me, it
> doesn't look ugly at all. I've seen things uglier than just an
> innocent wildcard pattern.

  sorry, i didn't mean to pick on you. :-)  i would avoid that kind of
extreme optimization for a couple reasons.

  first, it just *looks* like a typo at first glance.  when i saw it,
my immediate reaction was, oops, spelling mistake and i had to look
again to see it wasn't.

  also, it's sort of just a fluke that you can do that kind of
optimization.  the instant you add another suffix that starts with
something other than a "b", it messes things up and you lose the
advantage.

  anyway, i will leave this in the hands of folks higher up the food
chain.

rday

-- 

========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================

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

* Re: [PATCH] bitbake.vim: detect *.bbappend files in ftdetect automatically
  2012-12-12 20:02     ` Robert P. J. Day
@ 2012-12-12 20:31       ` Eren Türkay
  0 siblings, 0 replies; 7+ messages in thread
From: Eren Türkay @ 2012-12-12 20:31 UTC (permalink / raw)
  To: Robert P. J. Day; +Cc: bitbake-devel

[-- Attachment #1: Type: text/plain, Size: 741 bytes --]

On Wed, Dec 12, 2012 at 03:02:31PM -0500, Robert P. J. Day wrote:
>   sorry, i didn't mean to pick on you. :-)  i would avoid that kind of
> extreme optimization for a couple reasons.

No problem :)

>   also, it's sort of just a fluke that you can do that kind of
> optimization.  the instant you add another suffix that starts with
> something other than a "b", it messes things up and you lose the
> advantage.

Right, at first glance such a little code is not understood instantly.
foo.{bbclass,bbappend,bb} is more natural for suffixes.

>   anyway, i will leave this in the hands of folks higher up the food
> chain.

I'm sending V2 of the patch. 

-- 
    . 73! DE TA1AET
      http://linkedin.com/in/erenturkay

[-- Attachment #2: Type: application/pgp-signature, Size: 850 bytes --]

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

* Re: [PATCH] bitbake.vim: detect *.bbappend files in ftdetect automatically
  2012-12-12 18:42 [PATCH] bitbake.vim: detect *.bbappend files in ftdetect automatically Eren Türkay
  2012-12-12 18:57 ` Robert P. J. Day
@ 2012-12-13 19:57 ` Trevor Woerner
  2012-12-13 20:39   ` Eren Türkay
  1 sibling, 1 reply; 7+ messages in thread
From: Trevor Woerner @ 2012-12-13 19:57 UTC (permalink / raw)
  To: Eren Türkay; +Cc: bitbake-devel

On Wed, Dec 12, 2012 at 1:42 PM, Eren Türkay <eren@hambedded.org> wrote:
>  " .bb and .bbclass
> -au BufNewFile,BufRead *.b{b,bclass}    set filetype=bitbake
> +au BufNewFile,BufRead *.b{b,bappend,bclass}    set filetype=bitbake


Don't forget to update the comment too :-)



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

* Re: [PATCH] bitbake.vim: detect *.bbappend files in ftdetect automatically
  2012-12-13 19:57 ` Trevor Woerner
@ 2012-12-13 20:39   ` Eren Türkay
  0 siblings, 0 replies; 7+ messages in thread
From: Eren Türkay @ 2012-12-13 20:39 UTC (permalink / raw)
  To: Trevor Woerner; +Cc: bitbake-devel

[-- Attachment #1: Type: text/plain, Size: 558 bytes --]

On Thu, Dec 13, 2012 at 02:57:29PM -0500, Trevor Woerner wrote:
> On Wed, Dec 12, 2012 at 1:42 PM, Eren Türkay <eren@hambedded.org> wrote:
> >  " .bb and .bbclass
> > -au BufNewFile,BufRead *.b{b,bclass}    set filetype=bitbake
> > +au BufNewFile,BufRead *.b{b,bappend,bclass}    set filetype=bitbake
> 
> Don't forget to update the comment too :-)

Thanks you for your feedback. V2 of the patch includes updated comment
already. I fixed it while preparing v2.

Regards,
Eren

-- 
    . 73! DE TA1AET
      http://linkedin.com/in/erenturkay

[-- Attachment #2: Type: application/pgp-signature, Size: 850 bytes --]

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

end of thread, other threads:[~2012-12-13 20:54 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-12 18:42 [PATCH] bitbake.vim: detect *.bbappend files in ftdetect automatically Eren Türkay
2012-12-12 18:57 ` Robert P. J. Day
2012-12-12 19:53   ` Eren Türkay
2012-12-12 20:02     ` Robert P. J. Day
2012-12-12 20:31       ` Eren Türkay
2012-12-13 19:57 ` Trevor Woerner
2012-12-13 20:39   ` Eren Türkay

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.