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

Reverse even lines

Reverse only the even lines without altering the odd lines.

Start file
:s%.*%\=getline('.').nr2char(113)%|t.|s(.$(&&(|-s-.-s)\\(.\\)\\([\\x71]\\+\\)\\(\\2.*\\))\\2\\3\\1)|-g|s<[^|]*|$<s>..>><|d d|@d|smile|9sl|se key=|x
:s%.*%\=getline('.').nr2char(119)%|t.|s(.$(&&(|-s-.-s)\\(.\\)\\([\\x77]\\+\\)\\(\\2.*\\))\\2\\3\\1)|-g|s<[^|]*|$<s>..>><|d d|@d|X|se key=vim|x
:s%.*%\=getline('.').nr2char(111)%|t.|s(.$(&&(|-s-.-s)\\(.\\)\\([\\x6f]\\+\\)\\(\\2.*\\))\\2\\3\\1)|-g|s<[^|]*|$<s>..>><|d d|@d|h!|x
:s%.*%\=getline('.').nr2char(112)%|t.|s(.$(&&(|-s-.-s)\\(.\\)\\([\\x70]\\+\\)\\(\\2.*\\))\\2\\3\\1)|-g|s<[^|]*|$<s>..>><|d d|@d|smile|sl|se key=|x


# vim:key=vim
End file
:s%.*%\=getline('.').nr2char(113)%|t.|s(.$(&&(|-s-.-s)\\(.\\)\\([\\x71]\\+\\)\\(\\2.*\\))\\2\\3\\1)|-g|s<[^|]*|$<s>..>><|d d|@d|smile|9sl|se key=|x
x|miv=yek es|X|d@|d d|<>>..>s<$|*]|^[<s|g-|)1\\3\\2\\))\\*.2\\(\\)\\+\\]77x\\[(\\)\\.(\\)s-.-s-|(&&($.(s|.t|%)911(rahc2rn.)'.'(enilteg=\%*.%s:
:s%.*%\=getline('.').nr2char(111)%|t.|s(.$(&&(|-s-.-s)\\(.\\)\\([\\x6f]\\+\\)\\(\\2.*\\))\\2\\3\\1)|-g|s<[^|]*|$<s>..>><|d d|@d|h!|x
x|=yek es|ls|elims|d@|d d|<>>..>s<$|*]|^[<s|g-|)1\\3\\2\\))\\*.2\\(\\)\\+\\]07x\\[(\\)\\.(\\)s-.-s-|(&&($.(s|.t|%)211(rahc2rn.)'.'(enilteg=\%*.%s:


# vim:key=vim

View Diff

2c2
< :s%.*%\=getline('.').nr2char(119)%|t.|s(.$(&&(|-s-.-s)\\(.\\)\\([\\x77]\\+\\)\\(\\2.*\\))\\2\\3\\1)|-g|s<[^|]*|$<s>..>><|d d|@d|X|se key=vim|x
---
> x|miv=yek es|X|d@|d d|<>>..>s<$|*]|^[<s|g-|)1\\3\\2\\))\\*.2\\(\\)\\+\\]77x\\[(\\)\\.(\\)s-.-s-|(&&($.(s|.t|%)911(rahc2rn.)'.'(enilteg=\%*.%s:
4c4
< :s%.*%\=getline('.').nr2char(112)%|t.|s(.$(&&(|-s-.-s)\\(.\\)\\([\\x70]\\+\\)\\(\\2.*\\))\\2\\3\\1)|-g|s<[^|]*|$<s>..>><|d d|@d|smile|sl|se key=|x
---
> x|=yek es|ls|elims|d@|d d|<>>..>s<$|*]|^[<s|g-|)1\\3\\2\\))\\*.2\\(\\)\\+\\]07x\\[(\\)\\.(\\)s-.-s-|(&&($.(s|.t|%)211(rahc2rn.)'.'(enilteg=\%*.%s:

Solutions by @nickandbro:

Unlock 8 remaining solutions by signing in and submitting your own entry
Created by: @maharba6

11 active golfers, 32 entries

Solutions by @nickandbro:
9
#6 - nickGPT / @nickandbro

08/22/2024 at 03:13AM

9
#>6 - nickGPT / @nickandbro

08/26/2024 at 05:16PM

9
#>6 - nickGPT / @nickandbro

08/26/2024 at 07:14PM

16
#>7 - nickGPT / @nickandbro

08/22/2024 at 03:11AM

21
#>8 - nickGPT / @nickandbro

08/22/2024 at 02:49AM

27
#>9 - nickGPT / @nickandbro

08/22/2024 at 02:35AM

36
#>10 - nickGPT / @nickandbro

08/21/2024 at 08:10PM

309
#>10 - nickGPT / @nickandbro

08/21/2024 at 08:09PM