Real Vim ninjas count every keystroke - do you?

Pick a challenge, fire up Vim, and show us what you got.

Changelog, Rules & FAQ, updates: @vimgolf, RSS.

Your VimGolf key: please sign in

$ gem install vimgolf
$ vimgolf setup
$ vimgolf put 598728b4d6a38f049d00000f

Flatten repo

For each git repository (<project> tag) translate name attribute to flatten directory structure. Add path attribute if missing (because checkout hierarchy must be kept). #xml

Start file
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
  <remote fetch="/home/matt/test-01" name="mirror" review="vimgolf.org"/>
  <default remote="mymirror" revision="myandroid-1.2.3"/>
  <project name="device/common"/>
  <project name="device/generic/common" revision="11c092a6cbfcf6207f07a9a8e3398e747e7f5461"/>
  <project groups="pdk" name="device/generic/arm64"/>
  <project groups="pdk" name="platform/abi/cpp" path="abi/cpp"/>
  <project name="platform/bootable/recovery" path="bootable/recovery"/>
  <project name="platform/build" path="build">
    <copyfile dest="Makefile" src="core/root.mk"/>
  </project>
  <project name="platform/external/bzip2" path="external/bzip2"/>
  <project name="kernel/matt-3.18" path="kernel" upstream="myandroid-1.2.4"/>
</manifest>
End file
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
  <remote fetch="/home/matt/test-01" name="mirror" review="vimgolf.org"/>
  <default remote="mymirror" revision="myandroid-1.2.3"/>
  <project path="device/common" name="device_common"/>
  <project path="device/generic/common" name="device_generic_common" revision="11c092a6cbfcf6207f07a9a8e3398e747e7f5461"/>
  <project groups="pdk" path="device/generic/arm64" name="device_generic_arm64"/>
  <project groups="pdk" name="platform_abi_cpp" path="abi/cpp"/>
  <project name="platform_bootable_recovery" path="bootable/recovery"/>
  <project name="platform_build" path="build">
    <copyfile dest="Makefile" src="core/root.mk"/>
  </project>
  <project name="platform_external_bzip2" path="external/bzip2"/>
  <project name="kernel_matt-3.18" path="kernel" upstream="myandroid-1.2.4"/>
</manifest>

View Diff

5,10c5,10
<   <project name="device/common"/>
<   <project name="device/generic/common" revision="11c092a6cbfcf6207f07a9a8e3398e747e7f5461"/>
<   <project groups="pdk" name="device/generic/arm64"/>
<   <project groups="pdk" name="platform/abi/cpp" path="abi/cpp"/>
<   <project name="platform/bootable/recovery" path="bootable/recovery"/>
<   <project name="platform/build" path="build">
---
>   <project path="device/common" name="device_common"/>
>   <project path="device/generic/common" name="device_generic_common" revision="11c092a6cbfcf6207f07a9a8e3398e747e7f5461"/>
>   <project groups="pdk" path="device/generic/arm64" name="device_generic_arm64"/>
>   <project groups="pdk" name="platform_abi_cpp" path="abi/cpp"/>
>   <project name="platform_bootable_recovery" path="bootable/recovery"/>
>   <project name="platform_build" path="build">
13,14c13,14
<   <project name="platform/external/bzip2" path="external/bzip2"/>
<   <project name="kernel/matt-3.18" path="kernel" upstream="myandroid-1.2.4"/>
---
>   <project name="platform_external_bzip2" path="external/bzip2"/>
>   <project name="kernel_matt-3.18" path="kernel" upstream="myandroid-1.2.4"/>

Solutions by @huho_xu:

Unlock 1 remaining solutions by signing in and submitting your own entry
Created by: @mcr05

11 active golfers, 29 entries

Solutions by @huho_xu:
56
#10 - huho / @huho_xu

08/09/2017 at 07:25PM