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 5cf62aa56c09760009d6b2f3

Add semicolons

Simply add a semicolon at the end of each line

Start file
 super.onCreate(savedInstanceState)
 setContentView(R.layout.activity_second)
 Intent intent = getIntent()
 String text = intent.getStringExtra("text")

 TextView view = findViewById(R.id.textView2)
 view.setText(text)
End file
 super.onCreate(savedInstanceState);
 setContentView(R.layout.activity_second);
 Intent intent = getIntent();
 String text = intent.getStringExtra("text");

 TextView view = findViewById(R.id.textView2);
 view.setText(text);

View Diff

1,4c1,4
<  super.onCreate(savedInstanceState)
<  setContentView(R.layout.activity_second)
<  Intent intent = getIntent()
<  String text = intent.getStringExtra("text")
---
>  super.onCreate(savedInstanceState);
>  setContentView(R.layout.activity_second);
>  Intent intent = getIntent();
>  String text = intent.getStringExtra("text");
6,7c6,7
<  TextView view = findViewById(R.id.textView2)
<  view.setText(text)
\ No newline at end of file
---
>  TextView view = findViewById(R.id.textView2);
>  view.setText(text);
\ No newline at end of file

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 345 remaining solutions by signing in and submitting your own entry
#346 Jessica Kraft / @JessicaKraft19 - Score: 66 - 06/26/19 @ 01:27
/1,4/$/:<BS>;<Left><Left><Left><Left>s<Right><Right><Right><Right><CR>:s/<BS><BS>1,4s/$/:<BS>;/<BS><BS>|<BS>\:<BS><BS>;/<CR>:1,<BS><BS>6,7s/$/;/<CR>:wq<CR>

0 comments


Created by: @koern82

346 active golfers, 1243 entries

Leaderboard (lowest score wins):
11
#211 - Lingyu Yi / @LgxLingyu

07/08/2019 at 03:08AM

11
#212 - Petru-Armand Bancila / @petruarmand

07/08/2019 at 03:33AM

11
#213 - alphamethyl / @alphamethyl1

07/08/2019 at 04:13AM

11
#214 - BaffaloP 🐃🎨 / @bbaffalopp

07/08/2019 at 07:32PM

11
#215 - c0llision / @sh3llcode

07/09/2019 at 02:55PM

11
#216 - Etai Nativ / @enativ72

07/10/2019 at 06:05AM

11
#217 - Peter Demin / @peterdemin

07/10/2019 at 05:46PM

11
#218 - aurelian ardeleanu / @inquarto

07/10/2019 at 07:44PM

11
#219 - mag1cal.unic0rn / @unic0rn_mag1cal

07/11/2019 at 05:45AM

11
#220 - Neil Struthers / @struthersneil

07/11/2019 at 05:03PM

11
#221 - Sean Sullivan / @_seanyneutron

07/11/2019 at 05:22PM

11
#222 - Restroom Sounds / @RestroomSounds

07/12/2019 at 03:18AM

11
#223 - Adam Pollack / @apollack11

07/12/2019 at 10:39PM

11
#224 - pf / @pedrofreirex

07/13/2019 at 08:52PM

11
#225 - icicle / @icicle_freeze

07/14/2019 at 01:50PM

11
#226 - Malcolm Sharpe / @blueblimpms

07/15/2019 at 07:22AM

11
#227 - Renato Müller Rosa / @ItsmeGordo

07/15/2019 at 03:57PM

11
#228 - Steven Wood / @StvnW

07/15/2019 at 05:55PM

11
#229 - Raghav Subramaniam / @raghavsub

07/15/2019 at 11:24PM

11
#230 - ^spew$ / @spew79241369

07/16/2019 at 11:29PM

12
#231 - Miki Tebeka / @tebeka

06/05/2019 at 06:54AM

12
#232 - Miles Edland / @ShutUpMiles

06/06/2019 at 06:41AM

12
#233 - Mike Clarke / @clarkema

06/07/2019 at 12:12PM

12
#234 - Paweł Styczewski / @kryspuss

06/14/2019 at 10:28AM

12
#235 - Sjoerd Thijsse / @SjoerdThijsse

06/25/2019 at 05:50PM

12
#236 - Corey Alexander / @coreyja_dev

06/27/2019 at 02:47AM

12
#237 - pockman / @pockman8

06/29/2019 at 01:46PM

12
#238 - Reid Mitchell / @reidmit

07/05/2019 at 05:35AM

12
#239 - tschoschi / @Todesshnizzle

07/10/2019 at 11:02AM

12
#240 - Paul Sonkoly / @Phaul

07/14/2019 at 08:53AM