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):
17
#301 - Wembley Hoo / @wembleyhoo

06/08/2019 at 01:30AM

17
#302 - Kim Le / @kimle78

06/14/2019 at 05:27PM

17
#303 - Runze Xu / @xrz000

07/03/2019 at 05:54AM

17
#304 - Thiago Preischadt / @TPreischadt

07/10/2019 at 01:41AM

17
#305 - JonathanAlvaro / @jonalvarot

07/12/2019 at 11:31AM

17
#306 - mirsemen / @mirsemen1

07/14/2019 at 10:10AM

18
#307 - John Maxwell / @JohnMax54083745

06/04/2019 at 09:02AM

18
#308 - SnakyPoutz / @snakypoutz

06/06/2019 at 08:12AM

18
#309 - John Christensen / @Johnnyc1423

06/06/2019 at 04:49PM

18
#310 - Matthew Krafczyk / @int_matt

06/06/2019 at 09:40PM

18
#311 - Tomas Burianek / @TomasBurianek

06/15/2019 at 06:24PM

18
#312 - Alaa Sawaya / @alaa_sawaya

06/19/2019 at 07:47AM

18
#313 - Noel Evans / @noelevans

06/19/2019 at 08:40PM

18
#314 - de note / @denote46553649

06/20/2019 at 02:32AM

18
#315 - HuangLiang / @HuangLi12951248

06/30/2019 at 02:35PM

18
#316 - Witcher / @WitcherWitcherW

07/05/2019 at 03:50PM

18
#317 - Xio / @Xiomerra

07/06/2019 at 04:30AM

18
#318 - acidburnburn / @shelvinskyi

07/10/2019 at 03:16PM

19
#319 - Richard Bagshaw / @bagwaa

06/07/2019 at 07:47PM

19
#320 - e.d. / @tzzttzzt

07/06/2019 at 01:14PM

19
#321 - Andrew Ferrier / @andrewferrier

07/09/2019 at 12:14PM

19
#322 - James / @mulholio

07/16/2019 at 05:52PM

19
#323 - Kishou Yusa / @YusaKishou

07/18/2019 at 04:46AM

20
#324 - EvaKuator / @eva_kuator

06/08/2019 at 06:06AM

20
#325 - Spanky / @Spankyy___

06/14/2019 at 06:48PM

20
#326 - Casey Pogue / @casey_1220

07/09/2019 at 12:55PM

22
#327 - Larry Adames / @LarryAdames

07/02/2019 at 03:55PM

23
#328 - Am Jam / @LoneJam

06/07/2019 at 12:26AM

23
#329 - duyanh.y4n.pham / @PhamY4n

06/10/2019 at 05:09PM

23
#330 - Lewis Marshall / @LewisAMarshall

06/16/2019 at 06:22PM