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):
21
#601 - Vijay Dev / @vijay_dev

12/30/2011 at 07:36PM

21
#602 - Petr Kovar / @pejugo

02/01/2012 at 12:57PM

21
#603 - Cody Veal / @cjhveal

02/05/2012 at 07:36PM

21
#604 - Trevor Orsztynowicz / @trevoro

02/08/2012 at 03:11AM

21
#605 - Lee Quarella / @leequarella

02/21/2012 at 01:38AM

21
#606 - Jesse House / @house9twx

06/27/2013 at 12:01AM

21
#607 - esiegel / @esiegel

07/06/2013 at 07:25PM

21
#608 - Alexander Bandukwala / @abanduk

01/23/2014 at 08:43PM

21
#609 - Jared Fowler / @jared_fowler

07/28/2017 at 10:52PM

21
#610 - 张君杰 / @MYHQlDfwOuLvlGf

12/03/2018 at 07:17AM

22
#611 - krusty_ar / @krusty_ar

02/20/2012 at 03:35PM

22
#612 - Benjamin Sergeant / @bsergean

06/08/2012 at 05:40AM

22
#613 - Sven Keidel / @jungerkrieger89

08/22/2012 at 08:41PM

22
#614 - Stephen Searles / @stephensearles

08/26/2012 at 06:55PM

22
#615 - durcheinandr / @durcheinandr

12/31/2014 at 07:44PM

22
#616 - sinan / @sinan1111111111

02/14/2015 at 04:01PM

22
#617 - Chris Armstrong / @ChrisATweets

06/08/2016 at 07:53PM

23
#618 - Donald Plummer / @dplummer

02/03/2012 at 03:32AM

23
#619 - Cody Roberts / @bloomyminded

11/16/2016 at 01:29AM

23
#620 - Alex Elarbee / @elarbee

10/17/2024 at 11:27AM

24
#621 - francois bard / @misterfrb

05/07/2012 at 07:20AM

24
#622 - Charles Neill / @ccneill

05/01/2014 at 02:16AM

24
#623 - ɐʇnɥsɐpoʇ / @todashuta

03/25/2015 at 01:59PM

24
#624 - Igor Potceluev / @4eppelin

04/04/2015 at 11:20AM

24
#625 - Simon Cheng / @bambooraccoon

01/29/2018 at 09:13PM

24
#626 - Aaron / @_Lordofthevoid_

12/04/2019 at 07:59PM

25
#627 - matthew / @mdespuits

02/01/2012 at 10:20PM

25
#628 - Thomas Hiron / @thomashiron

02/23/2023 at 03:08PM

26
#629 - John Hilliard / @praetorian

01/31/2012 at 03:53AM

26
#630 - Mikael Engström / @mikaelengstrom

05/17/2012 at 10:00AM