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 54ddd1d261cec11d1b01707c

Mute the second method of this script

prepend a # infront of every line of the second method

Start file
def this_method_should_be_active
  here is happening something
end

def this_method_should_be_muted
  here is not happening anything
end

End file
def this_method_should_be_active
  here is happening something
end

#def this_method_should_be_muted
#  here is not happening anything
#end

View Diff

5,7c5,7
< def this_method_should_be_muted
<   here is not happening anything
< end
---
> #def this_method_should_be_muted
> #  here is not happening anything
> #end

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 245 remaining solutions by signing in and submitting your own entry
#246 Avi / @tomerlevi444 - Score: 58 - 02/15/15 @ 12:54
4j<c-v><Up><Up><Up><Up>4j<C-V>2jII<BS><Esc><Up><Up><Up><Up><Up>4j<C-C><C-C>I<Down><Down><Up><Up><Esc><C-C><C-C><Esc><Esc><Esc><Esc><Esc><Esc><Up><Up><Up><Up><Up>4j<C-V>2jI#<Esc>ZZ

0 comments


Created by: @netznarkose

246 active golfers, 465 entries

Leaderboard (lowest score wins):
9
#121 - Daniel / @Daniel00288663

03/30/2017 at 02:26PM

9
#122 - Rami Hovi / @hacker_lawyer

05/27/2017 at 09:25PM

9
#123 - Turkey Man / @lvturkeyman

11/23/2017 at 05:22PM

9
#124 - DHM / @DHM29978992

04/30/2018 at 02:48AM

9
#125 - Arijus / @argshook

07/12/2018 at 12:23PM

9
#126 - Martynas Bardauskas / @mbardauskas

07/12/2018 at 12:27PM

9
#127 - Gytis Vinclovas / @GytisVinclovas

07/18/2018 at 05:46AM

9
#128 - Jonathan Gin / @jonathangin52

12/03/2018 at 07:35PM

9
#129 - Dax / @zacoxi

12/07/2018 at 05:06AM

9
#130 - Anant Mishra / @anantanni22

12/08/2018 at 03:00PM

9
#131 - Mihai / @mihaicristiant

01/16/2019 at 10:49AM

9
#132 - Ben M / @Sweet_Scientist

06/07/2019 at 03:27AM

9
#133 - Johannes / @joka253

06/17/2019 at 04:15PM

9
#134 - majo senf / @majo_senf

06/25/2019 at 10:15AM

9
#135 - Brandon Harrison / @llAboutB

09/25/2019 at 10:26PM

9
#136 - vimgolfer / @vimgolfer7

11/03/2019 at 07:17AM

9
#137 - Lory / @Lory46845742

12/02/2019 at 10:55AM

9
#138 - Miłosz Łakomy / @foobar01123

01/25/2020 at 03:56AM

9
#139 - Jung Yeon Park / @park_jungy

02/17/2021 at 12:36AM

9
#140 - 김범준 / @kmbmjn

03/10/2021 at 08:04AM

9
#141 - hepebexè / @hepebexe

03/16/2021 at 10:15PM

9
#142 - Joe Farnsworth / @JoeFarnsworth

06/22/2021 at 04:09PM

9
#143 - mevmev / @mevmev8

10/06/2021 at 11:05PM

9
#144 - Jean George / @JeanGeo20504212

02/13/2022 at 06:08PM

9
#145 - z_r_a / @z_r_a

03/15/2022 at 02:45AM

9
#146 - ._. / @Katharsic

04/25/2022 at 05:48AM

9
#147 - russellzhaomao / @russellzhaomao

06/19/2022 at 02:57AM

9
#148 - Janzen / @__Coos

09/30/2022 at 10:56AM

9
#149 - Omar Alawadhi / @OmarAla59544225

10/29/2022 at 05:24PM

9
#150 - nickGPT / @nickandbro

08/28/2024 at 04:33AM