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 4ef209ef78702b0001000019

Make it more readable

Insert blank lines to make it more organized and readable

Start file
#Set the global prefix key to C-q (default is C-b)
set-option -g prefix C-q
bind-key C-q last-window
# Remove default binding since we’re replacing
unbind %
bind | split-window -h
bind - split-window -v
# Set status bar
set -g status-bg black
set -g status-fg white
set -g status-left '#[fg=green]#H'
# Highlight active window
set-window-option -g window-status-current-bg red
set -g status-right '#[fg=yellow]#(uptime | cut -d "," -f 2-)'
# Set window notifications
setw -g monitor-activity on
set -g visual-activity on
# Automatically set window title
setw -g automatic-rename

End file
#Set the global prefix key to C-q (default is C-b)
set-option -g prefix C-q
bind-key C-q last-window


# Remove default binding since we’re replacing
unbind %
bind | split-window -h
bind - split-window -v


# Set status bar
set -g status-bg black
set -g status-fg white
set -g status-left '#[fg=green]#H'


# Highlight active window
set-window-option -g window-status-current-bg red
set -g status-right '#[fg=yellow]#(uptime | cut -d "," -f 2-)'


# Set window notifications
setw -g monitor-activity on
set -g visual-activity on


# Automatically set window title
setw -g automatic-rename

View Diff

3a4,5
> 
> 
7a10,11
> 
> 
11a16,17
> 
> 
14a21,22
> 
> 
17a26,27
> 
> 

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 651 remaining solutions by signing in and submitting your own entry
#652 Brandon Height / @Lask0x - Score: 93 - 08/08/17 @ 15:33
:2,$s/^#/\r\r#/<CR><Esc>u<Up><Up><Up><Up><Esc>:2,s$/^#/\r\r#<CR>y<Esc>u<Esc>:<Up><C-A><Right><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS><BS>$s<Esc><Esc><Esc>ssss<Esc>uus<Esc>u<Esc>:2,$s,<BS>/^#/\r\r#<CR>ZZ

0 comments


Created by: @alimoeeny

652 active golfers, 2009 entries

Leaderboard (lowest score wins):
13
#91 - Dax / @zacoxi

11/13/2018 at 09:45AM

13
#92 - name / @name65894813

11/22/2018 at 03:49AM

13
#93 - alekfed / @alek_fed

04/15/2019 at 04:05PM

13
#94 - Grant / @grant_7788

05/16/2019 at 11:57PM

13
#95 - deurzen / @devrzen

06/06/2019 at 02:56PM

13
#96 - Ben M / @Sweet_Scientist

06/07/2019 at 05:28AM

13
#97 - majo senf / @majo_senf

06/19/2019 at 11:11AM

13
#98 - Miłosz Łakomy / @foobar01123

08/28/2019 at 12:42PM

13
#99 - James Casey / @hanavi

12/22/2019 at 07:56PM

13
#100 - Ming Dai / @MingDai2

07/02/2020 at 05:30AM

13
#101 - A A A / @37fatos

01/17/2021 at 10:34PM

13
#102 - Jung Yeon Park / @park_jungy

01/27/2021 at 12:13AM

13
#103 - ~~~ / @5AXZmAwcmUg0fOO

05/30/2021 at 08:14AM

13
#104 - lydxn / @lydxn1

07/25/2021 at 06:25AM

13
#105 - Salvador Tojo Quintela / @SalvadorTojo

10/12/2021 at 10:53AM

13
#106 - Flimsy Giraffe / @flimsy_giraffe

12/01/2021 at 03:33AM

13
#107 - Joshua Marple / @JoshuaMarple1

12/17/2021 at 04:23PM

13
#108 - 'ymdarake / @ymdarake

09/11/2022 at 03:48PM

13
#109 - Janzen / @__Coos

09/22/2022 at 08:45AM

13
#110 - scpchicken / @scpchick

10/19/2023 at 07:45PM

13
#111 - asirago / @asiragoo

12/12/2023 at 11:16PM

13
#112 - Peppa Pig / @PeppaPigSg

06/29/2024 at 07:26AM

13
#113 - nickGPT / @nickandbro

08/28/2024 at 10:24PM

13
#114 - Suhaib Murshid / @suhaibm

09/21/2024 at 09:28AM

13
#115 - demouo / @demouo

11/15/2024 at 06:00AM

14
#116 - h_east (トロッコ6個) / @h_east

12/21/2011 at 05:13PM

14
#117 - Ali Moeeny MD PhD / @alimoeeny

12/21/2011 at 05:31PM

14
#118 - Pavlo Klets / @p01nt

12/21/2011 at 05:45PM

14
#119 - Jaime A. Sánchez / @jashbeta

12/22/2011 at 01:57AM

14
#120 - Daniel Schierbeck / @dasch

12/22/2011 at 02:10PM