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):
12
#241 - Marcus Grass / @grass_marcus

07/15/2019 at 02:46PM

13
#242 - Καράτε Μόνο / @karate_mono

06/04/2019 at 11:58AM

13
#243 - deHman89 / @danho89

06/04/2019 at 01:08PM

13
#244 - toddagibson / @toddagibson

06/04/2019 at 05:36PM

13
#245 - notabot / @notabot84394972

06/04/2019 at 11:14PM

13
#246 - Raphael / @Console64

06/05/2019 at 11:53AM

13
#247 - dave / @shmitcoins

06/05/2019 at 10:44PM

13
#248 - JamesB41 / @JamesB41

06/06/2019 at 08:37PM

13
#249 - Guillaume / @arteymix

06/07/2019 at 03:41AM

13
#250 - Brooks Garrett / @brooksgarrett

06/09/2019 at 10:00PM

13
#251 - tapio / @gncnaxb

06/10/2019 at 01:26PM

13
#252 - Alexander Peplowski / @AlexPeplowski

06/12/2019 at 12:25PM

13
#253 - Andy Gnias / @GniTheSciGuy

06/22/2019 at 04:42PM

13
#254 - Rohit Kumar Jena / @rohitrango

07/01/2019 at 01:29PM

13
#255 - Diego Balseiro / @diegobalseiro

07/10/2019 at 02:37AM

13
#256 - Florent Uguet / @FlorentUguet

07/10/2019 at 09:08AM

13
#257 - Jeremy Jess / @jeremyjess19

07/11/2019 at 04:47PM

14
#258 - Just...That / @I_am_JustThat

06/04/2019 at 12:11PM

14
#259 - Mat / @matpbo

06/07/2019 at 06:32PM

14
#260 - Jouderian Junior / @jouderianjr

06/14/2019 at 02:25PM

14
#261 - Kamil Gwóźdź / @kamil_gwd

06/17/2019 at 01:31PM

14
#262 - Daniel Hakimian / @danrafhak

06/19/2019 at 08:24PM

14
#263 - Hans-Wilhelm / @hanswilw

06/21/2019 at 12:53PM

14
#264 - Mauricio Fierro / @_mfierro

06/25/2019 at 05:36AM

14
#265 - Hog of the Forsaken / @leonrobbins

06/28/2019 at 06:57AM

14
#266 - Ola / @Ola73745831

07/05/2019 at 08:48AM

14
#267 - Myungho Jung / @jung_myungho

07/14/2019 at 04:48AM

14
#268 - Thirdegree / @Thirdegree1

07/14/2019 at 06:46AM

15
#269 - Pablo P Varela / @pablopunk

06/06/2019 at 11:06AM

15
#270 - rich / @richardhanger

06/06/2019 at 02:19PM