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 218 remaining solutions by signing in and submitting your own entry
#219 Jessica Kraft / @JessicaKraft19 - Score: 111 - 06/21/19 @ 14:05
:%s1,4/$/:<BS>;/g<CR>:%s/<BS>1,4/$/\:<BS>;/g<CR>:%s1,4/$/\;/g<CR>::<BS>%s1,<BS><BS>1,4/$/\:<BS>;/g<CR><Up><Up><Up><Up><Down><Up><Esc><Esc><Esc><Down><Down><Esc><Esc><Up><Up>:<BS><Esc><Down><Up><Down><Up>:%s/)/):<BS>l<BS>;/g<CR><Esc>:wq<CR>

0 comments


Created by: @koern82

219 active golfers, 753 entries

Leaderboard (lowest score wins):
11
#121 - 𝕛𝕓𝕣𝕠𝕨𝕟 / @Roguelazer

06/12/2019 at 11:27PM

11
#122 - zealotrush / @zealotrush

06/13/2019 at 01:43AM

11
#123 - Grzegorz Andrzejowski / @AndrzejowskiG

06/13/2019 at 09:35AM

11
#124 - Altafen_ / @Altafen1

06/14/2019 at 06:44AM

11
#125 - Andreas Nordahl / @andreasnordahl

06/14/2019 at 10:12AM

11
#126 - Frank Harrison / @doublethefish

06/15/2019 at 07:39AM

11
#127 - Simon Zeng / @KronicMan

06/15/2019 at 04:23PM

11
#128 - Gabriel Barta / @gbarta

06/17/2019 at 04:33AM

11
#129 - Ben / @ben_g_thomas

06/18/2019 at 04:57AM

11
#130 - Thomas / @TBonnin

06/18/2019 at 08:17AM

11
#131 - Robin / @0x767570

06/18/2019 at 08:28PM

11
#132 - Erik Larsson / @Ermigh

06/18/2019 at 09:03PM

11
#133 - Afonso Junior / @afonsobastosjr

06/19/2019 at 03:30PM

11
#134 - jackjsk / @jackjsk1

06/20/2019 at 03:43AM

11
#135 - couaber / @couaber

06/20/2019 at 02:24PM

11
#136 - Takayuki Sato / @yukitaka1974

06/20/2019 at 05:23PM

11
#137 - Joe Cabezas / @JoeCabezas

06/20/2019 at 06:13PM

11
#138 - Adam Torok / @AdamTorok8

06/20/2019 at 09:27PM

11
#139 - Elan Dubrofsky / @dubroe

06/21/2019 at 01:11AM

11
#140 - Brian Scheuermann / @brianscheu11

06/21/2019 at 01:21AM

11
#141 - Egor Fedkin / @Jet_Flynn

06/21/2019 at 07:10AM

11
#142 - Florian Suess / @suessflorian

06/23/2019 at 04:09AM

11
#143 - etherflow / @etherfl0w

06/23/2019 at 01:00PM

11
#144 - Laurent Atlan / @laurentatlan1

06/23/2019 at 10:05PM

11
#145 - nimbus117 / @nimbus_117

06/23/2019 at 11:24PM

11
#146 - bolpin / @bolpin

06/24/2019 at 12:07AM

11
#147 - Oleg Andriyanov / @OAndriyanov

06/24/2019 at 09:14AM

12
#148 - Miki Tebeka / @tebeka

06/05/2019 at 06:54AM

12
#149 - Miles Edland / @ShutUpMiles

06/06/2019 at 06:41AM

12
#150 - Mike Clarke / @clarkema

06/07/2019 at 12:12PM