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

The best way to learn is to practice. Below, you will find some of the solutions other golfers have entered. To unlock higher ranked solutions, submit your own entry which does as well or better than the solutions you can currently see - climb the ladder!

Check out these helpful resources to improve your Vim skills... Game on.

Unlock 4 remaining solutions by signing in and submitting your own entry
#5 Saki Gw / Sakigw - Score: 56 - 08/07/17 @ 12:46
/na<CR>qqny2f"Pa <Esc>Ncepath<Esc>nf/r_;.qu2@qqqn;.;q.@q.@q@q.n@qZZ

0 comments

#6 huho / huho_xu - Score: 56 - 08/09/17 @ 19:25
/na<CR>qqny2f"Pa <Esc>Ncwpath<Esc>nf/r_;.qu2@qqqn;.;q.@q.@q@q.n@qZZ

0 comments

Created by: mcr05

6 active golfers, 19 entries

Leaderboard (lowest score wins):
43
#1 - John Braxler / braxler

08/14/2017 at 01:36PM

50
#2 - Matthieu Crapet / mcr05

08/12/2017 at 10:02PM

50
#3 - Baine Wedlock / BaineWedlock

08/13/2017 at 07:47PM

55
#4 - Gurukandhamoorthi / Gurukandhamoor1

08/07/2017 at 04:51PM

56
#5 - Saki Gw / Sakigw

08/07/2017 at 12:46PM

56
#6 - huho / huho_xu

08/09/2017 at 07:25PM