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 4f081a4ef037090001000074

constructor

coding a constructor for a simple class

Start file
class SongEntry
{
public:
    SongEntry
        (
        QString mSinger = QString(),
        QString mSongName = QString(),
        QString mGender = QString(),
        QString mSongLang = QString(),
        int mSongLength = 0,
        QString mSongPath = QString(),
        QString mNotes = QString()
        );

private:
    int mId;
    QString mSinger;
    QString mSongName;
    QString mGender;
    QString mSongLang;
    int mSongLength; // in seconds
    QString mSongPath;
    QString mNotes;
};

===========================================================
End file
class SongEntry
{
public:
    SongEntry
        (
        QString mSinger = QString(),
        QString mSongName = QString(),
        QString mGender = QString(),
        QString mSongLang = QString(),
        int mSongLength = 0,
        QString mSongPath = QString(),
        QString mNotes = QString()
        );

private:
    int mId;
    QString mSinger;
    QString mSongName;
    QString mGender;
    QString mSongLang;
    int mSongLength; // in seconds
    QString mSongPath;
    QString mNotes;
};

===========================================================

SongEntry::SongEntry
    (
    QString aSinger,
    QString aSongName,
    QString aGender,
    QString aSongLang,
    int aSongLength,
    QString aSongPath,
    QString aNotes
    )
    : mSinger( aSinger )
    , mSongName( aSongName )
    , mGender( aGender )
    , mSongLang( aSongLang )
    , mSongLength( aSongLength )
    , mSongPath( aSongPath )
    , mNotes( aNotes )
{
}

View Diff

26a27,46
> 
> SongEntry::SongEntry
>     (
>     QString aSinger,
>     QString aSongName,
>     QString aGender,
>     QString aSongLang,
>     int aSongLength,
>     QString aSongPath,
>     QString aNotes
>     )
>     : mSinger( aSinger )
>     , mSongName( aSongName )
>     , mGender( aGender )
>     , mSongLang( aSongLang )
>     , mSongLength( aSongLength )
>     , mSongPath( aSongPath )
>     , mNotes( aNotes )
> {
> }

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 53 remaining solutions by signing in and submitting your own entry
#54 無ん垢の叫び / @john_ababa - Score: 392 - 02/29/12 @ 08:21
Go<Esc>:a!<CR>SongEntry::SongEntry<CR>    (<CR>    QString aSinger,<CR>    QString aSongName,<CR>    QString aGender,<CR>    QString aSongLang,<CR>    int aSongLength,<CR>    QString aSongPath,<CR>    QString aNotes<CR>    )<CR>    : mSinger( aSinger )<CR>    , mSongName( aSongName )<CR>    , mGender( aGender )<CR>    , mSongLang( aSongLang )<CR>    , mSongLength( aSongLength )<CR>    , mSongPath( aSongPath )<CR>    , mNotes( aNotes )<CR>{<CR>}<CR><Esc><Esc>ZZ

0 comments


Created by: @Arton0306

54 active golfers, 161 entries

Leaderboard (lowest score wins):
59
#1 - Urtica dioica / @udioica

07/01/2012 at 11:24PM

59
#2 - Conner McDaniel / @connermcd

09/18/2012 at 05:25AM

59
#3 - John Braxler / @braxler

07/01/2014 at 06:27PM

61
#4 - John Anderson / @opejn

03/18/2012 at 07:51AM

61
#5 - Tim Chase / @gumnos

05/04/2012 at 06:24PM

62
#6 - Renat Aksitov / @Korvin79

02/29/2012 at 10:19AM

64
#7 - veki / @vx_ras

02/02/2012 at 11:22PM

67
#8 - Henri Wiechers / @hwiechers

02/03/2012 at 05:00AM

67
#9 - Tesnorth / @Tesnorth

02/05/2012 at 01:18PM

67
#10 - Abdel Said / @abdelsaid

02/10/2012 at 11:27PM

69
#11 - Trevor Powell / @DoomedBunnies

01/27/2012 at 04:42AM

70
#12 - Justin Love / @wondible

01/11/2012 at 05:20PM

70
#13 - oliver mueller / @marcontwit

01/25/2012 at 08:15PM

71
#14 - Sam Riesland / @str4mula

02/27/2012 at 08:12AM

82
#15 - deris / @deris0126

04/05/2012 at 03:16PM

82
#16 - Rod Knowlton / @codelahoma

05/06/2012 at 08:47PM

82
#17 - Kerson Hsiao / @KersonHsiao

07/04/2012 at 03:24PM

85
#18 - cj / @cj01101

02/05/2014 at 10:51PM

87
#19 - William Dunand / @wdunand

01/13/2012 at 02:10AM

88
#20 - maxthoursie / @maxthoursie

01/30/2012 at 05:13PM

88
#21 - Javier Blanco / @jbgutierrez

02/12/2012 at 02:26PM

88
#22 - Mauro Persano / @fzort

05/24/2015 at 03:23PM

90
#23 - Pepe / @GomTvIneluki

04/16/2012 at 06:51PM

92
#24 - h_east (トロッコ6個) / @h_east

01/07/2012 at 11:25AM

92
#25 - Grigoriy Glushko / @grinderrz

02/17/2012 at 06:30PM

93
#26 - Tom Fetherston / @TomFetherston

01/23/2012 at 05:01AM

95
#27 - Víctor Pimentel / @VictorPimentel

02/05/2012 at 03:31AM

97
#28 - Lin Yangyang / @canoelyy

01/31/2012 at 03:48PM

98
#29 - Benoit Mortgat / @Benoit_Mortgat

06/06/2012 at 04:32PM

99
#30 - Jomo / @yoyoyojomo

03/14/2012 at 07:50AM