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 7275 remaining solutions by signing in and submitting your own entry
#7276 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

7276 active golfers, 32962 entries

Leaderboard (lowest score wins):
42
#7021 - Gustavo Hidalgo / @ghidalgo3

06/02/2016 at 08:49PM

42
#7022 - T. Payne / @TorreyPayne

06/30/2016 at 12:33AM

42
#7023 - Cameron Dershem / @jerknextdoor

10/04/2016 at 11:37PM

42
#7024 - simplaY / @silentsimplaY

10/11/2016 at 10:49PM

42
#7025 - あー大きい / @aaooki

12/29/2016 at 04:54AM

42
#7026 - Ari Morcos / @arimorcos

01/05/2017 at 11:04PM

42
#7027 - ben eisner / @b_eisner

02/09/2017 at 08:02AM

42
#7028 - Joseph Siddall / @jbsiddall

04/07/2017 at 10:14PM

42
#7029 - Vim Golf / @VimGolf1231

04/11/2017 at 08:04AM

42
#7030 - Brian Hague / @bhague1281

10/02/2017 at 06:39PM

42
#7031 - Peter Flockhart / @FreshPeter_

12/05/2017 at 06:32PM

42
#7032 - Joe Nye / @prokonye

06/12/2018 at 04:51PM

42
#7033 - Chris Venteicher / @cventeicher

07/03/2018 at 02:41PM

42
#7034 - carcheky / @carcheky

09/10/2018 at 11:08AM

42
#7035 - el manami / @el_manami

11/04/2018 at 12:13AM

42
#7036 - olspookishmagus / @olspookishmagus

11/08/2018 at 11:11PM

42
#7037 - tuyen / @tuyen66827418

11/14/2018 at 10:55AM

42
#7038 - aced cibi / @acedcibi

11/29/2018 at 07:25AM

42
#7039 - Артём Пепел / @Super1or1ty

12/10/2018 at 01:55PM

42
#7040 - Joe Cho / @iminsik

12/31/2018 at 12:56AM

42
#7041 - Sam Pedley / @sam_pedley

03/19/2019 at 01:23PM

42
#7042 - Caleb Rollins / @CalebRollins1

05/14/2019 at 09:21PM

42
#7043 - Kyung Mo Kweon / @eneloop88

06/01/2019 at 04:27PM

42
#7044 - Yan / @Yan87408860

10/22/2019 at 08:13AM

42
#7045 - Doemae / @Doemae02

10/24/2019 at 02:11PM

42
#7046 - John Poon / @shinvalor

12/28/2019 at 02:08AM

42
#7047 - Ron Peters / @thepistonhead

02/28/2020 at 03:31PM

42
#7048 - tinyfat / @tanghaijun12345

03/27/2020 at 09:36AM

42
#7049 - kenny fan / @kennyfa13857074

05/12/2020 at 02:45PM

42
#7050 - a b c / @abc41115243

06/17/2020 at 03:31AM