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 55b18bbea9c2c30d04000001

Simple, Practical, and Common

Simple things we do all the time should be able to be done with very few keystrokes, but sometimes I find something I need to do makes me go, "There MUST be a better way." This challenge is just a simple movement and entering text at a certain place.

Start file
*temp var1 0
*temp var2 "hi"
*temp var3 -1
*temp var4 42
*temp var5 "asdf"
*temp var6 0

Simple things we do all the time should be able to be done with very few keystrokes, but sometimes I find something I need to do makes me go, "There MUST be a better way."

This challenge is just a simple movement and entering text at a certain place.
End file
*temp var1 0
*temp var2 "hi"
*temp var3 -1
*temp var4 42
*temp var5 "asdf"
*temp var6 0
*temp var7 11

Simple things we do all the time should be able to be done with very few keystrokes, but sometimes I find something I need to do makes me go, "There MUST be a better way."

New text.

This challenge is just a simple movement and entering text at a certain place.

View Diff

6a7
> *temp var7 11
8a10,11
>
> New text.

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 7446 remaining solutions by signing in and submitting your own entry
#7447 Yushia Sou / @yuessiah - Score: 427 - 05/08/19 @ 16:47
VG<C-P><Esc><Esc>kkkkkkkkkkkVjjjjjjjjjjjjjjjjjjxi<50-53>*temp var1 0<CR>*temp var2 "hi"<CR>*temp var3 -1<CR>*temp var4 42<CR>*temp var5 "asdf"<CR>*temp var6 0<CR>*temp var7 11<CR><CR>Simple things we do all the time should be able to be done with very few keystrokes, but sometimes I find something I need to do makes me go, "There MUST be a better way."<CR><CR>New text.<CR><CR>This challenge is just a simple movement and entering text at a certain place.<Esc>[201~jk<BS><BS><Esc> kk:wq<BS><BS>q<BS>wq<CR>

0 comments


Created by: @Flurrywinde

7447 active golfers, 33742 entries

Leaderboard (lowest score wins):
39
#7081 - Diane Manière / @dianemaniere

01/26/2020 at 02:09PM

39
#7082 - gino / @imGinoW

05/21/2020 at 03:38PM

39
#7083 - 蔣昀劭 / @hjtiun852

09/01/2020 at 01:53AM

39
#7084 - abhijeet patil / @abhijeetptl5

09/02/2020 at 04:37PM

39
#7085 - 伟哥 / @w15659018558

09/12/2020 at 06:25AM

39
#7086 - 𝙲𝚊𝚟𝚊𝚗 𝚆𝚊𝚐𝚐 / @cavankwagg

11/28/2020 at 06:06PM

39
#7087 - mathieu524287 / @mathieu524287

12/20/2020 at 11:49AM

39
#7088 - nguyen hoang khoi / @HoangNhkhoi

01/16/2021 at 08:47PM

39
#7089 - Peter Lukesch / @LukeschPeter

01/25/2021 at 03:50PM

39
#7090 - Jo / @Jo32608644

01/13/2023 at 04:28PM

39
#7091 - Zobi / @zobi

03/11/2025 at 06:14PM

40
#7092 - Alexandros Ntoulas / @ntoulas

08/28/2015 at 07:03PM

40
#7093 - Pin / @ponfelipon

10/06/2015 at 08:56PM

40
#7094 - Kevin Kloud / @KevKloudMusic

11/23/2015 at 06:31AM

40
#7095 - udreki / @udreki

02/05/2016 at 11:46AM

40
#7096 - Shankar Nakai / @NakaiShankar

07/17/2016 at 09:10PM

40
#7097 - Andrew Hanlon / @AndrewDHanlon

10/12/2016 at 06:03PM

40
#7098 - Underfloor / @Underfloor11

10/30/2016 at 11:37PM

40
#7099 - Yongjoo Ji / @msrband

01/12/2017 at 02:52AM

40
#7100 - NG / @dueyfinster

02/07/2017 at 10:06AM

40
#7101 - Hascoet Kevin / @Neolex29

03/12/2017 at 12:58AM

40
#7102 - Dreach Achat Revente / @TheDreach_AR

03/25/2017 at 12:14PM

40
#7103 - 강 / @elfmagic860

05/06/2017 at 01:40AM

40
#7104 - Basile Perrenoud / @BP_DK_

06/08/2017 at 12:16PM

40
#7105 - Vinay Keerthi / @stonecharioteer

10/22/2017 at 09:20AM

40
#7106 - Brennan Minns / @Minns_Brennan

12/18/2017 at 01:43PM

40
#7107 - Yousef Mohamed / @MohamedYoyo94

01/30/2018 at 12:30AM

40
#7108 - MIKAEL / @mbe24_

02/06/2018 at 10:09AM

40
#7109 - Brooks Swinnerton / @bswinnerton

04/19/2018 at 02:39AM

40
#7110 - Trever Shick / @trevermshick

06/05/2018 at 04:10AM