Skip to content

Instantly share code, notes, and snippets.

@callahad
Created December 28, 2010 21:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save callahad/757767 to your computer and use it in GitHub Desktop.
Save callahad/757767 to your computer and use it in GitHub Desktop.
My solution for VimGolf Challenge "Braces or Brackets?" at http://vimgolf.com/challenges/4d1a522ea860b7447200010b
# 50 Characters
Vjj:!tr '{}[()' '(){[]'
jj$r{j3lr(7wlr)jr}j0.ZZ
# 49 Characters
Vjj:!tr '{}[()' '(){[]'
jj$r{jf{r(f}r)jr}j0.ZZ
# 48 Characters
Vjj:!tr '{}[()' '(){[]'
jj$r{jf{r(f}r)jr}w.ZZ
# 45 Characters
:%!tr '{}[]' '(){}'
jf(r[f)r]jr{j2lr[jr}ZZ
# 44 Characters
:%!tr '{}[]' '(){}'
jf(r[f)r]jr{7wr[jr}ZZ
# 41 Characters
:%!tr '{}' '()'
$r{4wr[f)r]jr{2jr}w.ZZ
# 40 Characters
:%!tr '{}' '()'
$r{4wr[f)r]jr{Lr}b.ZZ
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment