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 57ab8b6f621d160fcd000001

C Reformatting

You may use Visual mode... or not. #uppercase

Start file
typedef enum {
   FORMAT_AUDIO_UNKNOWN = 0,
   FORMAT_AUDIO_VORBIS  = 1,
   FORMAT_AUDIO_PCM_U8  = 2,
   FORMAT_AUDIO_PCM_S16LE = 3,
   FORMAT_AUDIO_PCM_S24LE = 4,
   FORMAT_AUDIO_ADPCM_MS = 5, /*!< Microsoft ADPCM */
   FORMAT_AUDIO_AAC = 6,      /*!< Detected but not supported */
   FORMAT_AUDIO_OPUS = 7,     /*!< Xiph Opus */
   FORMAT_AUDIO_NONE = 0x10
} FMT_audio_type;
/* --- */
End file
FMT_AUDIO_TYPE(FORMAT_AUDIO_UNKNOWN, 0);
FMT_AUDIO_TYPE(FORMAT_AUDIO_VORBIS, 1);
FMT_AUDIO_TYPE(FORMAT_AUDIO_PCM_U8, 2);
FMT_AUDIO_TYPE(FORMAT_AUDIO_PCM_S16LE, 3);
FMT_AUDIO_TYPE(FORMAT_AUDIO_PCM_S24LE, 4);
FMT_AUDIO_TYPE(FORMAT_AUDIO_ADPCM_MS, 5);
FMT_AUDIO_TYPE(FORMAT_AUDIO_AAC, 6);
FMT_AUDIO_TYPE(FORMAT_AUDIO_OPUS, 7);
FMT_AUDIO_TYPE(FORMAT_AUDIO_NONE, 0x10);

View Diff

1,12c1,9
< typedef enum {
<    FORMAT_AUDIO_UNKNOWN = 0,
<    FORMAT_AUDIO_VORBIS  = 1,
<    FORMAT_AUDIO_PCM_U8  = 2,
<    FORMAT_AUDIO_PCM_S16LE = 3,
<    FORMAT_AUDIO_PCM_S24LE = 4,
<    FORMAT_AUDIO_ADPCM_MS = 5, /*!< Microsoft ADPCM */
<    FORMAT_AUDIO_AAC = 6,      /*!< Detected but not supported */
<    FORMAT_AUDIO_OPUS = 7,     /*!< Xiph Opus */
<    FORMAT_AUDIO_NONE = 0x10
< } FMT_audio_type;
< /* --- */
---
> FMT_AUDIO_TYPE(FORMAT_AUDIO_UNKNOWN, 0);
> FMT_AUDIO_TYPE(FORMAT_AUDIO_VORBIS, 1);
> FMT_AUDIO_TYPE(FORMAT_AUDIO_PCM_U8, 2);
> FMT_AUDIO_TYPE(FORMAT_AUDIO_PCM_S16LE, 3);
> FMT_AUDIO_TYPE(FORMAT_AUDIO_PCM_S24LE, 4);
> FMT_AUDIO_TYPE(FORMAT_AUDIO_ADPCM_MS, 5);
> FMT_AUDIO_TYPE(FORMAT_AUDIO_AAC, 6);
> FMT_AUDIO_TYPE(FORMAT_AUDIO_OPUS, 7);
> FMT_AUDIO_TYPE(FORMAT_AUDIO_NONE, 0x10);

Solutions by @ParasamGateZero:

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

163 active golfers, 690 entries

Solutions by @ParasamGateZero:
30
#13 - ParasamGateZero / @ParasamGateZero

02/07/2018 at 07:45AM

32
#>45 - ParasamGateZero / @ParasamGateZero

02/07/2018 at 07:41AM

33
#>55 - ParasamGateZero / @ParasamGateZero

02/07/2018 at 07:34AM

35
#>58 - ParasamGateZero / @ParasamGateZero

02/07/2018 at 07:27AM

37
#>58 - ParasamGateZero / @ParasamGateZero

02/07/2018 at 06:59AM

42
#>67 - ParasamGateZero / @ParasamGateZero

02/07/2018 at 06:17AM

43
#>70 - ParasamGateZero / @ParasamGateZero

02/07/2018 at 05:40AM

47
#>80 - ParasamGateZero / @ParasamGateZero

02/07/2018 at 05:24AM

48
#>81 - ParasamGateZero / @ParasamGateZero

02/07/2018 at 03:46AM

50
#>86 - ParasamGateZero / @ParasamGateZero

02/06/2018 at 10:31PM

52
#>95 - ParasamGateZero / @ParasamGateZero

02/06/2018 at 09:05PM

56
#>108 - ParasamGateZero / @ParasamGateZero

02/06/2018 at 05:40PM

59
#>117 - ParasamGateZero / @ParasamGateZero

02/06/2018 at 09:32AM

64
#>132 - ParasamGateZero / @ParasamGateZero

02/06/2018 at 08:49AM