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 9v0069cf0efc000000000786

Flip All Bits

Perform a bitwise NOT operation on each bit, meaning that bits that are 0 become 1, and those that are 1 become 0.

Start file
binary0 = 0b00000000_00001001_00010010_00011011
binary1 = 0b00100100_00101101_00110110_00111111
binary2 = 0b01000000_01001001_01010010_01011011
binary3 = 0b01100100_01101101_01110110_01111111
binary4 = 0b10000000_10001001_10010010_10011011
binary5 = 0b10100100_10101101_10110110_10111111
binary6 = 0b11000000_11001001_11010010_11011011
binary7 = 0b11100100_11101101_11110110_11111111
End file
binary0 = 0b11111111_11110110_11101101_11100100
binary1 = 0b11011011_11010010_11001001_11000000
binary2 = 0b10111111_10110110_10101101_10100100
binary3 = 0b10011011_10010010_10001001_10000000
binary4 = 0b01111111_01110110_01101101_01100100
binary5 = 0b01011011_01010010_01001001_01000000
binary6 = 0b00111111_00110110_00101101_00100100
binary7 = 0b00011011_00010010_00001001_00000000

View Diff

1,8c1,8
< binary0 = 0b00000000_00001001_00010010_00011011
< binary1 = 0b00100100_00101101_00110110_00111111
< binary2 = 0b01000000_01001001_01010010_01011011
< binary3 = 0b01100100_01101101_01110110_01111111
< binary4 = 0b10000000_10001001_10010010_10011011
< binary5 = 0b10100100_10101101_10110110_10111111
< binary6 = 0b11000000_11001001_11010010_11011011
< binary7 = 0b11100100_11101101_11110110_11111111
---
> binary0 = 0b11111111_11110110_11101101_11100100
> binary1 = 0b11011011_11010010_11001001_11000000
> binary2 = 0b10111111_10110110_10101101_10100100
> binary3 = 0b10011011_10010010_10001001_10000000
> binary4 = 0b01111111_01110110_01101101_01100100
> binary5 = 0b01011011_01010010_01001001_01000000
> binary6 = 0b00111111_00110110_00101101_00100100
> binary7 = 0b00011011_00010010_00001001_00000000

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 51 remaining solutions by signing in and submitting your own entry
#52 Emek Cohen / @EmekC - Score: 118 - 04/25/26 @ 14:27
::%s/0b\zs[01_]\+/\=substitute(submatch(0),'[01]','\=submatch(0)==''0''?''1'':''0''','g')/g<C-Left><C-Left><C-Left><C-Left><C-Left><C-Left><C-Left><C-Left><C-Left><C-Left><C-Left><C-Left><C-Left><C-Left><C-Left><C-Left><C-Left><C-Left><C-Left><BS><Right><BS><CR>:wq<CR>

0 comments


Created by: @maharba6

52 active golfers, 171 entries

Leaderboard (lowest score wins):
46
#31 - Andy Balaam / @andybalaam

04/09/2026 at 04:15PM

47
#32 - qoober1 / @qoober1

04/04/2026 at 12:18PM

48
#33 - WestonZavadil-Personal / @WestonZavadil-Personal

04/28/2026 at 01:53AM

48
#34 - 000AG000 / @000AG000

05/05/2026 at 07:44PM

50
#35 - gbjandys / @andreaserradev-gbj

05/01/2026 at 08:51AM

51
#36 - Biagio Trimarchi / @biagio-trimarchi

04/27/2026 at 09:03PM

51
#37 - Olivier MARAVAL / @mrvolive

04/30/2026 at 01:43PM

51
#38 - Adam Barla / @adambarla

05/08/2026 at 02:43PM

52
#39 - lemonish / @p-lemonish

04/19/2026 at 04:18PM

52
#40 - Salvatore Farina / @sfarina

05/08/2026 at 02:17AM

55
#41 - gowoodturner / @gowoodturner

04/05/2026 at 10:47PM

55
#42 - Lorenzo Torri / @lorenzotorri

04/09/2026 at 06:20AM

55
#43 - cyan12green / @cyan12green

04/21/2026 at 09:20AM

55
#44 - Ryan Bergman / @stuyry

05/06/2026 at 11:00PM

63
#45 - Binaryman / @Bynaryman

05/11/2026 at 10:26AM

64
#46 - maharba6 / @maharba6

04/03/2026 at 12:57AM

68
#47 - Константин / @kostya_sem

05/09/2026 at 10:17PM

71
#48 - Yondonjamts Ganzorig / @nxic

04/17/2026 at 03:16AM

83
#49 - Hoffen / @he1219

04/19/2026 at 09:48AM

89
#50 - Mateus Verffel Mayer / @mateus-mayer

04/17/2026 at 03:23PM

108
#51 - aReigoto / @aReigoto

04/10/2026 at 10:06AM

118
#52 - Emek Cohen / @EmekC

04/25/2026 at 02:27PM