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 4d1ace6c142cca7133000033

Reformat some Python

Fix some very bizarrely laid-out code.

Start file
def fed(j):
    n
= sum([1000000000,
             
200000000,
               
30000000,
               
4000000,
                 
500000,
                 
60000,
                   
7000,
                   
800,
                     
90,
                     j
])
   
print('abc'+str(n)+'def')
End file
def fed(j):
    n
= 1234567890 + j
   
print('abc%ddef' % n)

View Diff

2,12c2,3
<     n = sum([1000000000,
<               200000000,
<                30000000,
<                 4000000,
<                  500000,
<                   60000,
<                    7000,
<                     800,
<                      90,
<                      j])
<     print('abc'+str(n)+'def')
---
>     n = 1234567890 + j
>     print('abc%ddef' % n)

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 237 remaining solutions by signing in and submitting your own entry
#238 Irfan Ahmad / @erfaan - Score: 299 - 12/29/10 @ 14:10
<Down><Down>dddddddddddddddd<Right>i<Del><Del><Up><Left><Left><Left><Left><Left><Left><Left><Left><Left><BS><BS><BS><BS><BS><Right><Del>234567890<Del><Del><Del><Del><Del><Del><Del><Del><Del><Del><Del><Del><Del><Del><Del><Del><Del><Del><Del><Del><Del><Del><Del><Del><Del><Del><Del><Del><Del> <kPlus><Del><Right><Right><Down><Home><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Left><Del><Del><Del><Del><Del><Del><Del><Del><Del><Del>%d<Right><Right><Right><Right> % n<Esc>:wq<CR>

0 comments


Created by: @holizz

238 active golfers, 622 entries

Leaderboard (lowest score wins):
50
#181 - Nick / @quinks25

01/13/2011 at 11:03AM

51
#182 - Mike Waldner / @mawaldne

03/26/2011 at 03:13PM

51
#183 - Dave / @zzdave13

07/31/2011 at 09:59PM

51
#184 - Timothy Hahn / @timyhahn

04/20/2012 at 03:45AM

52
#185 - Henrik Nyh / @henrik

12/29/2010 at 09:52AM

52
#186 - Duda Dornelles / @dudadornelles

01/05/2011 at 01:04PM

52
#187 - marmelad / @jordgubbssylt

11/17/2012 at 11:18AM

52
#188 - victor / @victor20145300

08/22/2020 at 02:28PM

53
#189 - Simon Brown / @caelyxsec

12/29/2010 at 06:43AM

53
#190 - Jason Wolf / @zephyr_wolf

11/08/2012 at 06:42PM

53
#191 - __VimGolfer__ / @VimGolfer19

11/27/2020 at 05:44PM

54
#192 - Alex B. / @SIGKILL

12/29/2010 at 01:48PM

54
#193 - Marian Schubert / @MarianSchubert

12/29/2010 at 01:58PM

54
#194 - Remigijus (ReekenX) / @reekenx

12/29/2010 at 04:08PM

54
#195 - J. R. Felix / @Master_Groove

04/20/2023 at 04:20AM

54
#196 - weiss-i-net / @weiss-i-net

05/26/2024 at 07:38AM

55
#197 - Bernerd Schaefer / @bjschaefer

12/29/2010 at 09:52AM

55
#198 - Lasse Immonen / @turtleman10

12/29/2010 at 02:27PM

55
#199 - Александр Моисеев / @Aleksan43607471

01/24/2023 at 11:36AM

55
#200 - xiaoao1024 / @xiaoao1024

12/28/2023 at 10:39AM

56
#201 - manlon / @manlon

12/29/2010 at 06:12PM

57
#202 - Esteban Ordano / @eordano

04/07/2011 at 04:02AM

58
#203 - 김도현 / @ggobp

06/06/2019 at 10:32AM

59
#204 - Abhishek Mukherjee / @abhishekmukherg

12/29/2010 at 04:32PM

59
#205 - Bjørn Einar Bjartnes / @bjartnes

01/27/2012 at 12:35PM

60
#206 - lionel young / @lionelyoung

12/29/2010 at 07:05AM

60
#207 - Andrey A. Ugolnik / @andreyugolnik

01/19/2011 at 06:51PM

60
#208 - Jurica / @Jurica34581259

12/13/2018 at 04:42PM

61
#209 - Charlene Tshos / @charlymul

06/17/2013 at 08:08AM

62
#210 - Sid Kasivajhula / @CountVajhula

12/29/2010 at 07:39AM