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 @grant_7788:

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

163 active golfers, 690 entries

Solutions by @grant_7788:
30
#18 - Grant / @grant_7788

05/17/2019 at 06:24AM

32
#>47 - Grant / @grant_7788

05/17/2019 at 06:22AM

33
#>56 - Grant / @grant_7788

05/17/2019 at 06:21AM

35
#>58 - Grant / @grant_7788

05/17/2019 at 06:20AM

38
#>60 - Grant / @grant_7788

05/17/2019 at 06:18AM

39
#>61 - Grant / @grant_7788

05/17/2019 at 06:18AM

40
#>62 - Grant / @grant_7788

05/17/2019 at 06:09AM

41
#>67 - Grant / @grant_7788

05/17/2019 at 06:06AM

42
#>67 - Grant / @grant_7788

05/17/2019 at 06:05AM

43
#>70 - Grant / @grant_7788

05/17/2019 at 05:48AM

44
#>75 - Grant / @grant_7788

05/17/2019 at 05:47AM

46
#>78 - Grant / @grant_7788

05/17/2019 at 05:33AM

47
#>80 - Grant / @grant_7788

05/17/2019 at 05:31AM

49
#>84 - Grant / @grant_7788

05/17/2019 at 03:17AM

49
#>84 - Grant / @grant_7788

05/17/2019 at 05:30AM

50
#>86 - Grant / @grant_7788

05/17/2019 at 03:03AM

50
#>86 - Grant / @grant_7788

05/17/2019 at 03:13AM

51
#>94 - Grant / @grant_7788

05/17/2019 at 03:00AM

52
#>95 - Grant / @grant_7788

05/17/2019 at 02:59AM

56
#>109 - Grant / @grant_7788

05/17/2019 at 02:56AM