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):
16
#391 - Clinton シ / @iblamefish

01/05/2014 at 07:10PM

16
#392 - Qhuatre / @Qhuatre

01/10/2014 at 04:21PM

16
#393 - Fat troll / @fat_troll

03/29/2014 at 08:24AM

16
#394 - Endir / @Endir2

04/17/2014 at 05:16PM

16
#395 - Jeff Parent / @jeffparent

05/16/2014 at 03:56PM

16
#396 - Araka Bar / @ArakaBar

12/28/2014 at 11:56AM

16
#397 - Jake Eskel / @JakeEskel

01/08/2015 at 01:23AM

16
#398 - d1uckym d1uckym / @d1uckym

02/16/2015 at 09:58PM

16
#399 - TheProgrammer971 / @tp971

03/14/2015 at 03:00PM

16
#400 - Paul / @MapCalculator

06/24/2015 at 03:31AM

16
#401 - No Holiness / @NoHoliness

10/03/2015 at 10:59AM

16
#402 - Yahyalexandre33 / @yahyalexandre33

03/14/2016 at 07:03PM

16
#403 - Bogumił Kamiński / @BogumilKaminski

05/01/2016 at 09:38PM

16
#404 - Peter Brynza / @v3_1

08/19/2016 at 09:19PM

16
#405 - И К / @igorjan94

09/15/2016 at 08:25AM

16
#406 - Etienne Florent / @EtienneFlorent

11/28/2016 at 08:56AM

16
#407 - Liam S Ismail / @AC01Y

04/04/2017 at 09:33PM

16
#408 - Geoff / @RealGeoffErwin

12/18/2017 at 09:43PM

16
#409 - Paul Draghicescu / @pdragy

03/22/2018 at 07:30AM

16
#410 - aaa1195 / @aaa11954

08/03/2018 at 06:52PM

16
#411 - Luis Rodriguez / @luisthecoder

11/16/2018 at 02:11AM

16
#412 - Michaël Lévesque-Dion / @mlevesquedion

04/26/2019 at 12:43AM

16
#413 - Phoon / @justflashhim

05/11/2019 at 03:10AM

16
#414 - vimgolfaccfekxh / @vimgolfaccfekxh

10/20/2022 at 01:05PM

16
#415 - steve / @steve35773420

12/02/2022 at 02:57AM

16
#416 - Hugh / @deeoh22

12/14/2022 at 12:43AM

16
#417 - shahanavaz m / @shahanavazm

03/17/2024 at 02:49AM

17
#418 - celery rho gamma / @rentalcustard

12/21/2011 at 05:01PM

17
#419 - Beau Dacious / @nocash

12/21/2011 at 05:52PM

17
#420 - Kent Sibilev / @datanoise

12/21/2011 at 06:17PM