Return the cow
This cow is too verbose. Give it a lesson.
Start file
________________________________________
/ If you learn one useless thing every \
| day, in a single year you'll learn 365 |
| useless things. |
\ -- fortune | cowsay /
----------------------------------------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||
End file
________________________________________
/ If you learn one useless thing every \
| day, in a single year you'll learn 365 |
| useless things. |
\ -- fortune | cowsay /
----------------------------------------
^__^ /
_______/(oo) /
/\/( /(__)
| w----||
|| ||
View Diff
7,11c7,11 < \ ^__^ < \ (oo)\_______ < (__)\ )\/\ < ||----w | < || || --- > ^__^ / > _______/(oo) / > /\/( /(__) > | w----|| > || ||
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.
#25 Renat Aksitov / @Korvin79 - Score: 70 - 03/04/12 @ 04:06
:se ri et<NL>7GcG<C-R>"<Esc>geld<fd-58>3I <Esc>-.2-4.-12.f\*l<C-V>jr(%r(E<C-V>kr)Nr/N.n.n.W.N.hr\ZZ
0 comments
#26 Francisco Dibar / @frandibar - Score: 77 - 01/10/11 @ 18:27
:7,$!rev<CR>/\/<CR>r\/\\<CR>r/n.nnn.n.n.n./)<CR>r(n.n./(<CR>r)3n.7G<C-V>L11I <Esc>9i <Esc>ji <Esc>j3xL$T|DZZ
0 comments
#27 aimee / @sermoa - Score: 80 - 01/03/11 @ 10:07
:7,11!rev<CR>20I <Esc>j12I <Esc>j8I <Esc>j11I <Esc>j.:7,9s/\\/\//g<CR>lr\:7,9s/(/)<CR>:8,9s/)/(<CR>f)r(jjDZZ
@sermoa: Okay, so it's not as simple as reversing lines 7-11 as i first thought! I have to insert some spaces, then i have to switch backstrokes to forwardstrokes, and change open brackets to close brackets and vice versa. Finally i have to remove a bit of whitespace so that it matches the expected result.
@sermoa: I much prefer @derp's :tr to transpose characters. Much more efficient than my :s commands.
@henrik: :7,$ is a little shorter - $ means the last line. You could avoid having to escape the / by using % as separators instead, e.g. s%\\%/%g
@sermoa: Oh, so THAT'S why people use different characters. I had wondered! thanks! :)
4 comments
#28 drio / @drio - Score: 85 - 01/16/11 @ 08:53
:7,$!rev<CR>20I <Esc>j12I <Esc>j8I <Esc>jj11<Esc>k11I <Esc>j.<Esc>:7,9s/\\/\//g<CR>lr\:7,9s/(/)<CR>:8,9s/)/(<CR>f)r(jjDZZ
0 comments
#29 Mohammad-Javad Izadi / @mjizadi - Score: 87 - 01/05/11 @ 06:55
G11A <Esc>k.k8A <Esc>k12A <Esc>k20A <Esc>VG!rev<CR>G9 d$:%s/)/x/g<CR>:%s/(/)/g<CR>:%s/x/(/g<CR>R/\/<Esc>f\r/k.f\r/kl.ZZ
0 comments
#30 Pete Johns / @johnsyweb - Score: 99 - 01/10/11 @ 11:47
7Gx9I <Esc>3A <Esc>a/<Esc>+R /<Esc>df\A<C-R>"<BS> /<Esc>I <Esc>+d%$pf\F\xh3XF\s/\/( <Esc>04x+5XlR w<Esc>fwR-|<Esc>+5X:se ve=all<CR>-$16l<C-V>3kr ZZ
0 comments
#31 無ん垢の叫び / @john_ababa - Score: 181 - 02/24/12 @ 02:18
6jdG:a!<CR> ^__^ / <CR> _______/(oo) / <CR> /\/( /(__) <CR> | w----|| <CR> || ||<CR><Esc><Esc>ZZ
0 comments
VimGolf