Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 96659 - app-vim/gentoo-syntax : vimdiff should not create a new ebuild
Summary: app-vim/gentoo-syntax : vimdiff should not create a new ebuild
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Vim Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-06-20 21:09 UTC by Kalin KOZHUHAROV
Modified: 2005-06-22 10:03 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kalin KOZHUHAROV 2005-06-20 21:09:01 UTC
I might have been drinking too much coffee lately, but I had hard time to
understand what the .... have these guys done in their overlay with a certain
ebuild version.

The problem was that every time I did:
vimdiff
/usr/{local/overlays/_the_guys,portage}/net-dns/djbdns/djbdns-1.05-r15.ebuild
vim was creating a new djbdns-1.05-r15.ebuild in /usr/portage/... because I was
using gentoo-syntax.

So is there any way to NOT create an example ebuild when called from
{g,}vimdiff, but an empty file insted?


Reproducible: Always
Steps to Reproduce:
1. /usr/{local/overlays/_the_guys,portage}/net-dns/djbdns/djbdns-1.05-r15.ebuild

Actual Results:  
A new ebuild is created (because at this time -r15 is not available in
/usr/portage). This makes it useless to try to understand diffs between an
existing file and just created-on-the-fly ebuild.

Expected Results:  
Instead, create a new file (when called from {g,}vimdiff at least).

It would be better if the diff mode in vim is used (so that it will work with
vim -d ebuild1 ebuild2), but might be more difficult?
Comment 1 Ryan Phillips (RETIRED) gentoo-dev 2005-06-22 10:03:29 UTC
added g:ebuild_create_on_empty option to toggle new ebuild
creation on/off on a new ebuild.

This will make the next release and is in subversion.

plugin/newebuild.vim:
if !exists("g:ebuild_create_on_empty")
    " Enable autogeneration of ebuilds by default
    let g:ebuild_create_on_empty = 1
endif

augroup NewEbuild
    au!
    autocmd BufNewFile *.e{build,class}
                \ if g:ebuild_create_on_empty |
                \    call <SID>MakeNewEbuild() |
                \ endif
augroup END