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 223 remaining solutions by signing in and submitting your own entry
#224 Kenny Nguyen / @KennyNg72375669 - Score: 56 - 08/05/20 @ 19:09
:%s/VIRTUAL/VIRTUAL-/g<CR>:%s/DP/DP-/g<CR>:%s/HDMI/HDMI-<CR>:wq!<CR>

0 comments


Created by: @argshook

224 active golfers, 716 entries

Leaderboard (lowest score wins):
22
#211 - Danila Kutenin / @Danlark1

09/17/2021 at 02:23PM

24
#212 - Remus Dalrymple / @bornintheflames

12/18/2023 at 05:59AM

25
#213 - Rohan Bansal / @rbnsl_

06/20/2020 at 02:19AM

25
#214 - Nolan Freeman / @NolanFreeman

07/01/2020 at 08:27AM

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

06/20/2020 at 12:37AM

28
#216 - Mathias Chunnoo / @chunnoomathias

03/03/2021 at 11:05AM

30
#217 - Danny Sanchez / @Dane1410s

03/17/2021 at 02:00AM

31
#218 - Jakob Föger / @drvolcano86

02/17/2023 at 01:06PM

37
#219 - Anil Narayan / @AnilNarayan2013

07/10/2020 at 04:43AM

37
#220 - Henry MATHEISEN / @hmatheisen

07/22/2021 at 07:42AM

39
#221 - jackmark / @jackmar14540583

07/10/2020 at 07:56AM

39
#222 - Shubham Tatvamasi / @shubhctl

02/16/2021 at 07:27PM

52
#223 - Alejandro Garrido M / @mogaal

02/28/2021 at 05:39PM

56
#224 - Kenny Nguyen / @KennyNg72375669

08/05/2020 at 07:09PM