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 603ba26a01b4d00009c10a49

simple replacements

The goal is to see the replacement commands in action.

Start file
The sublime users worked on projects more closed to my own project so I started to
check how they did things and then I started learning about emacs. It was not
cool, it was too hard to learn how to use it, to load new config files I had to
restart emacs every time and so much other problems, but since they did,
I convinced myself that I could learn it too so I did.

I used emacs for a few months and what I like about emacs the most is that it's
optimized for editing files not creating new ones. For the most of the time,
we're editing files and moving between lines of code so that makes sense.
Finally I was happy and productive using emacs.
End file
The vim users worked on projects more closed to my own project so I started to
check how they did things and then I started learning about vim. It was not
cool, it was too hard to learn how to use it, to load new config files I had to
restart vim every time and so much other problems, but since they did,
I convinced myself that I could learn it too so I did.

I used vim for a few months and what I like about vim the most is that it's
optimized for editing files not creating new ones. For the most of the time,
we're editing files and moving between lines of code so that makes sense.
Finally I was happy and productive using vim.

View Diff

1,2c1,2
< The sublime users worked on projects more closed to my own project so I started to
< check how they did things and then I started learning about emacs. It was not
---
> The vim users worked on projects more closed to my own project so I started to
> check how they did things and then I started learning about vim. It was not
4c4
< restart emacs every time and so much other problems, but since they did,
---
> restart vim every time and so much other problems, but since they did,
7c7
< I used emacs for a few months and what I like about emacs the most is that it's
---
> I used vim for a few months and what I like about vim the most is that it's
10c10
< Finally I was happy and productive using emacs.
---
> Finally I was happy and productive using vim.

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 369 remaining solutions by signing in and submitting your own entry
#370 D Brody / @DBrody20 - Score: 303 - 06/09/21 @ 14:52
:%s/[ema<BS><BS><BS><BS>sb<BS>ublims<BS>e|emacs<BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS>(sublime|emacs)/vims<BS>/g<CR><Esc><BS>:<Up><Left><Left><Left><Left><Left><Left><BS><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><BS><Right><Right><Right><Right><Right><CR><Esc>:<Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Up><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left>\b(?:<Esc>l:<Up><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Left><Left><Left>)<BS><Right>)'<BS>\b<CR>:<Up><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><BS><BS><BS><BS><BS><Right><Left>(<BS><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><BS>]<Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left>[<CR>:%s/sublime/vim/gc<BS>|%s/emacs/vim/g<CR>:w<CR>:wq<CR>

0 comments


Created by: @iviarcio

370 active golfers, 1658 entries

Leaderboard (lowest score wins):
30
#331 - dakmuk / @yeongha_yang

12/28/2022 at 01:44AM

30
#332 - Evan Miao / @laomiao_

03/01/2024 at 03:39AM

31
#333 - Abraham / @Abraham82157002

02/28/2021 at 10:40PM

31
#334 - De0triKs / @De0triKs

03/30/2021 at 02:02PM

31
#335 - MarK Yang / @MarKdeYaNG

01/25/2022 at 11:35AM

31
#336 - harish dudi / @harishd91170803

02/02/2023 at 03:41PM

31
#337 - Pacific Grove / @frank_green_012

03/31/2023 at 06:36AM

31
#338 - Justin Jung / @bustinbung

01/09/2024 at 09:46PM

32
#339 - Sébastien Lavoie / @sgdlavoie

03/03/2021 at 02:51AM

32
#340 - Ken / @kenc_

10/11/2021 at 04:33PM

33
#341 - K3MUR1 #BLM / @echorebel

05/21/2021 at 04:48PM

33
#342 - Sarthak Gupta / @saarthxk

08/02/2021 at 08:26PM

33
#343 - Sarang Khim / @sarang_khim

07/27/2022 at 08:42AM

33
#344 - ryne LEE / @mearyne

09/03/2023 at 02:21PM

33
#345 - nycksw / @nycksw

04/15/2024 at 06:47PM

34
#346 - 송민서 / @alstj2384

04/11/2024 at 09:33AM

35
#347 - Ayush Mandowara / @Ayushxx7

03/03/2021 at 07:30PM

35
#348 - panakin skywalker / @_j3ffrey

07/16/2021 at 04:15PM

35
#349 - gobborg / @tamalefencer

11/11/2021 at 05:54AM

36
#350 - Tommy / @Tommy75962547

08/23/2021 at 11:00AM

36
#351 - Driver / @zhouyijiaren

06/18/2022 at 08:36AM

36
#352 - Anatoli Liotych / @anatoliliotych

03/06/2024 at 10:05PM

37
#353 - Ian / @stutterrrrer

09/09/2021 at 04:41AM

38
#354 - ubijajaja / @ubijajaja

03/30/2022 at 03:43PM

38
#355 - D G G / @DGJourneyman

02/20/2023 at 10:08AM

38
#356 - Atiq Urrehaman / @Adam-Al-Rahman

03/08/2024 at 02:58PM

39
#357 - Himanshu Tank / @himanshutank75

10/21/2022 at 06:38PM

39
#358 - hribernik / @hribernik

03/30/2024 at 07:30AM

42
#359 - Marius Ropotica / @cipmar

03/29/2024 at 08:39PM

49
#360 - Meshan Naidoo / @realmeshan

01/14/2024 at 02:55PM