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):
27
#631 - Ben Moss / @mossity

01/02/2012 at 01:23AM

29
#632 - Adam Fraser / @Code_Post

02/29/2012 at 02:06AM

29
#633 - Nicolas Friedli / @NicolasFriedli

10/28/2012 at 08:09AM

29
#634 - Alpha Chen / @kejadlen

08/27/2013 at 04:03PM

29
#635 - Bùi Lê Huỳnh / @wyattbui

06/11/2024 at 03:42PM

29
#636 - Luis Fernando Rodríguez Vargas / @LuisFerRodVar

06/25/2024 at 10:19PM

30
#637 - Andreas Siegrist / @andreaszwei

02/01/2022 at 08:41PM

31
#638 - Kyle Decot / @kyledecot

12/29/2011 at 07:40PM

31
#639 - Simon Jefford / @simonj

01/01/2012 at 10:38PM

31
#640 - Eric Kelly / @HeroicEric

02/15/2012 at 04:53PM

32
#641 - jonathanpberger / @jonathanpberger

01/30/2012 at 03:21AM

33
#642 - ümit kablan / @udslk

03/09/2012 at 05:02PM

33
#643 - . / @cronesan

11/20/2012 at 07:34PM

35
#644 - Alex Okolish / @aokolish

02/10/2012 at 02:35AM

35
#645 - Skim / @skimskimmilk

04/05/2012 at 09:03PM

35
#646 - Jakob Föger / @drvolcano86

02/17/2023 at 03:13PM

37
#647 - Travis Millott / @ritherz

01/22/2014 at 12:00AM

41
#648 - Julie Ann Horvath / @nrrrdcore

01/09/2012 at 05:32PM

42
#649 - David L Goldberg / @DavidLGoldberg1

09/20/2013 at 03:54AM

45
#650 - Chirag Tailor / @ctailor2

01/27/2014 at 07:04AM

70
#651 - Noel Alejandro / @noelrock333

06/25/2012 at 08:40PM

93
#652 - Brandon Height / @Lask0x

08/08/2017 at 03:33PM