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):
15
#271 - extumblrnerdo / @extumblrnerdo

06/07/2019 at 07:04AM

15
#272 - mrrdl / @mrrdl5

06/07/2019 at 06:11PM

15
#273 - 김형창 / @uVmEMZsCgcYvqZi

06/11/2019 at 01:28AM

15
#274 - Gauthier B / @gogoprog

06/11/2019 at 10:54AM

15
#275 - Hans Aschenloher / @aschenloher

06/12/2019 at 07:36AM

15
#276 - Arnold Kell / @KellArnold

06/12/2019 at 10:48AM

15
#277 - MartinRAndersen / @MyrionSC2

06/12/2019 at 01:40PM

15
#278 - Mike / @Mike04212280

06/15/2019 at 03:00PM

15
#279 - Stefan Schneider / @hinogi

06/16/2019 at 05:26AM

15
#280 - Furopure / @furopure

06/19/2019 at 03:45AM

15
#281 - Giggles MacChumpsworth / @macchumpsworth

06/19/2019 at 04:23AM

15
#282 - Adam Wilson / @adamlemurwilson

06/21/2019 at 08:11PM

15
#283 - Andrew Tindall / @turngod

06/29/2019 at 09:14PM

15
#284 - wsg / @wsg31986835

07/04/2019 at 02:13PM

15
#285 - Kar Ming Chu / @KarMingChu

07/09/2019 at 04:35PM

15
#286 - Mitchell Hanberg / @mitchhanberg

07/12/2019 at 01:24AM

15
#287 - Emanuele Aliverti / @memeAliverti

07/12/2019 at 12:05PM

16
#288 - Aleksa Zdravkovic / @zdravce98

06/04/2019 at 06:26PM

16
#289 - filippo facioni / @filipeisho

06/04/2019 at 09:31PM

16
#290 - Fabien C. / @vaga_io

06/11/2019 at 03:28PM

16
#291 - John M Devin / @John_Devin

06/16/2019 at 10:12PM

16
#292 - Dominique M. / @19cupsofcoffee

06/17/2019 at 12:09AM

16
#293 - Jack Corley / @JackCorley12

06/26/2019 at 01:45AM

16
#294 - Luis Rodriguez / @luisthecoder

07/01/2019 at 09:23AM

16
#295 - Phoon / @justflashhim

07/04/2019 at 02:58AM

16
#296 - Hector Davensburg / @hdavensburg

07/05/2019 at 12:53PM

16
#297 - Josh Callender / @Saponifi3d

07/10/2019 at 10:49PM

16
#298 - 浚宇 / @Junyu_Wang_cn

07/16/2019 at 12:14PM

17
#299 - koern82 / @koern82

06/04/2019 at 08:42AM

17
#300 - bakk / @bakk88164925

06/06/2019 at 03:48PM