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 5ee9ae243a035f000c6141d7

xrandr outputs and dashes

uh oh, different video drivers identify display outputs with more dashes. Quick, need to change this xrandr script!

Start file
xrandr \
  --output VIRTUAL1 --off \
  --output DP3 --off \
  --output eDP1 --off \
  --output DP1 --off \
  --output DP2 --off \
  --output HDMI3 --off \
  --output HDMI2 --off \
  --output HDMI1 --off \
  --output DP3-1 --off \
  --output DP3-3 --off \
  --output DP3-2 --off \
  --output eDP1 --primary --mode 1920x1080
End file
xrandr \
  --output VIRTUAL-1 --off \
  --output DP-3 --off \
  --output eDP-1 --off \
  --output DP-1 --off \
  --output DP-2 --off \
  --output HDMI-3 --off \
  --output HDMI-2 --off \
  --output HDMI-1 --off \
  --output DP-3-1 --off \
  --output DP-3-3 --off \
  --output DP-3-2 --off \
  --output eDP-1 --primary --mode 1920x1080

View Diff

2,13c2,13
<   --output VIRTUAL1 --off \
<   --output DP3 --off \
<   --output eDP1 --off \
<   --output DP1 --off \
<   --output DP2 --off \
<   --output HDMI3 --off \
<   --output HDMI2 --off \
<   --output HDMI1 --off \
<   --output DP3-1 --off \
<   --output DP3-3 --off \
<   --output DP3-2 --off \
<   --output eDP1 --primary --mode 1920x1080
---
>   --output VIRTUAL-1 --off \
>   --output DP-3 --off \
>   --output eDP-1 --off \
>   --output DP-1 --off \
>   --output DP-2 --off \
>   --output HDMI-3 --off \
>   --output HDMI-2 --off \
>   --output HDMI-1 --off \
>   --output DP-3-1 --off \
>   --output DP-3-3 --off \
>   --output DP-3-2 --off \
>   --output eDP-1 --primary --mode 1920x1080

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 103 remaining solutions by signing in and submitting your own entry
#104 jackmark / @jackmar14540583 - Score: 39 - 07/10/20 @ 07:56
:%s/\(.\{-}[a-z]\)\(\d.*\)/\1-\2/g<CR>:wq<CR>

0 comments


Created by: @argshook

104 active golfers, 314 entries

Leaderboard (lowest score wins):
16
#91 - Daniel Habib / @danielhvs

07/21/2020 at 09:45PM

17
#92 - Vinícius Hoyer / @viniciushoyer

06/19/2020 at 04:08PM

17
#93 - Jacob Shomstein / @jshoms

06/29/2020 at 02:27AM

17
#94 - Josh Lindoo / @JoshLindoo

07/02/2020 at 06:14PM

18
#95 - vito / @vito49999722

07/19/2020 at 09:54AM

19
#96 - Tom / @CronutFacts

06/17/2020 at 01:42PM

19
#97 - drGsus / @drGsus

07/24/2020 at 05:45PM

21
#98 - Arijus / @argshook

06/17/2020 at 05:49AM

22
#99 - Norman Liu / @normanwliu

07/25/2020 at 10:54PM

25
#100 - Rohan Bansal / @rbnsl_

06/20/2020 at 02:19AM

25
#101 - Nolan Freeman / @NolanFreeman

07/01/2020 at 08:27AM

26
#102 - Marian Minar (jr.) / @majamin

06/20/2020 at 12:37AM

37
#103 - Anil Narayan / @AnilNarayan2013

07/10/2020 at 04:43AM

39
#104 - jackmark / @jackmar14540583

07/10/2020 at 07:56AM