switch variable
how fast can you switch two variable ?
Start file
int barins, foovariable = 1;
End file
int foovariable, barins = 1;
View Diff
1c1 < int barins, foovariable = 1; --- > int foovariable, barins = 1;
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.
#328 arye lukashevski / @aryelukashevski - Score: 15 - 01/14/12 @ 10:21
wd2wea, <Esc>p<Left>xxZZ
0 comments
#329 Ravil Bayramgalin / @brainopia - Score: 15 - 01/19/12 @ 01:31
<Esc>wd2wea, <Esc>pXxZZ
0 comments
#338 Dan Herbert / @pocketninja_au - Score: 15 - 02/28/12 @ 16:40
fbif<C-N>, <Esc>f,13xZZ
0 comments
#342 Christoph Stock / @christophstock - Score: 15 - 04/04/12 @ 04:59
wd2wea, <Esc>phxxZZ
0 comments
#351 Robby Grossman / @freerobby - Score: 15 - 07/16/12 @ 21:24
ffdwhi<BS><Esc>bPi,<Esc>ZZ
0 comments
#352 Andrew D. Wong / @andrewdwong - Score: 15 - 07/17/12 @ 10:28
fbdtfea,<C-O>p<Esc>hxZZ
0 comments
#353 Sven Keidel / @jungerkrieger89 - Score: 15 - 08/22/12 @ 13:54
<NL>wcwf<C-P><C-C><C-C>WPldeZZ
0 comments
#354 Lance Levine / @LanceSMLevine - Score: 15 - 10/09/12 @ 23:30
f,dw.i <Esc>bPi,<Esc>ZZ
0 comments
#362 Stormy Shippy / @Stormy - Score: 16 - 02/26/12 @ 15:49
WdWEa, <C-R>"<BS><BS><Esc>:wq<CR>
0 comments
#368 Bjørn Einar Bjartnes / @bjartnes - Score: 17 - 01/27/12 @ 04:19
wdwlpldwi <Esc>bbPxZZ
0 comments
#374 kenichiro watanabe / @_kenichirow - Score: 17 - 04/05/13 @ 09:08
2WdwBhpi,<Esc>f,x:wq<CR>
0 comments
#375 Raja Sharan Mamidala / @rajasharan - Score: 18 - 01/30/12 @ 11:46
wvf xea, <Esc>phxx:wq<CR>
0 comments
#376 Tyler Breisacher / @tbreisacher - Score: 18 - 08/27/12 @ 23:25
wdwep5hi, <Esc>bbbx.ZZ
0 comments
#378 James Freed / @JamesTFreed - Score: 19 - 02/02/12 @ 14:44
3wdwbbPxdwlpa <Esc>:wq<CR>
0 comments
#380 Matty Williams / @matty_jwilliams - Score: 19 - 06/08/12 @ 05:28
2WdwF ;pi,<Esc>elx<Esc>:wq<CR>
0 comments
#381 Brandon Farmer / @bthesorceror - Score: 19 - 06/18/12 @ 13:17
wdf elphxbhi,<Esc><Esc>:wq<CR>
0 comments
#383 Alfredo Di Napoli / @alfredodinapoli - Score: 20 - 04/28/12 @ 10:03
wdwelpli <Esc>bbdwbhpxZZ
0 comments
#387 bluse1995 / @bluse1995 - Score: 22 - 01/21/12 @ 13:06
f,xxdwi <Esc>F Pu<Right>Pi,<Esc>:wq<CR>
0 comments
#388 Simon Scarfe / @simonscarfe - Score: 22 - 03/08/12 @ 06:14
<NL>wdwwPldwF,Pxf=i <Esc>:wq<CR>
0 comments
#390 Eddie Monge / @eddiemonge - Score: 23 - 01/30/12 @ 11:13
wvwyd2ww<Left>p<Left>xb<Left>px<Left>i,<Esc>:x<CR>
0 comments
#392 Jakub Okoński / @farnoy - Score: 24 - 01/25/12 @ 06:39
fb"1dw2xw"1Pa <Esc>Fea,<Esc>:wq<CR>
0 comments
#393 Steven Rosato / @steven_rosato - Score: 24 - 02/28/12 @ 12:17
w"adwW"bdw"aPa <Esc>F,"bPxZZ
0 comments
#394 Timothy Hahn / @timyhahn - Score: 25 - 04/19/12 @ 20:59
wd2w<Esc>wea<Left><Left><Left><Left>, p<BS><Esc>p<Left>xx<Esc>:x<CR>
0 comments
#396 John Hilliard / @praetorian - Score: 28 - 04/12/12 @ 13:47
<CR>wwlldwbbhpldwpbbhxli <Esc><Esc>:wq<CR>
0 comments
#397 Mike Korcynski / @mkorcy - Score: 29 - 02/04/12 @ 10:55
3wvllllllllllld0wPi,<Esc>7llx:wq<CR>
0 comments
#398 Jan Paul Erkelens / @jperkelens - Score: 30 - 04/26/12 @ 14:24
wd2wePupxXhhhhhhi, jj<BS><BS><Esc>:w<CR>:q<CR>
0 comments
#399 jonathanpberger / @jonathanpberger - Score: 33 - 01/29/12 @ 18:58
wyypwdtfwwb<Left>,w<Left>i, barins<Esc><Up>dd<Esc>:wq<CR>
0 comments
#400 skellam / @skellam - Score: 33 - 02/19/12 @ 09:11
:%s/\(b.*s\), \(f.*e\)/\2, \1/<CR>ZZ
0 comments
#401 Michaël M. / @asenar - Score: 33 - 06/02/12 @ 09:18
:s/ \(.*\), \(.*\) =/ \2, \1 =<CR>ZZ
0 comments
#402 Lee Quarella / @leequarella - Score: 34 - 02/20/12 @ 17:18
wwwdwhhhhhhhhpuhpi,<Esc>llllllllx<Esc>:wq<CR>
0 comments
#403 Matthias Viehweger / @der_kronn - Score: 37 - 01/27/12 @ 09:58
:s/\v (.*), (.*) \=/ '2<BS><BS>\2, \1 =/<CR>ZZ
0 comments
#404 Noel Alejandro / @noelrock333 - Score: 52 - 06/25/12 @ 13:35
<Right>1wWXW<Esc>u<Right>WX<Esc>u0<Right>wwd<Esc>u0wdw1wpu<Left>p<Right>dw hi <Esc>01wp<Esc>uPx<Esc>:w<CR><C-W>q
0 comments
#405 Kevin Lin / @kevinslin8 - Score: 55 - 03/03/12 @ 15:38
bjeebdweellbbpuuuuu"tdwll"rdw"tpu"tPa <C-C><C-C>bb"rPlhx:w<CR>:wq<CR>
0 comments
#406 SeanPlusPlus / @SeanPlusPlus - Score: 99 - 01/30/12 @ 22:33
<Esc>V:s/barins/ =/<BS><BS><BS>foovariable, barins<Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left>, foovariabe<BS>le<Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right>/<CR><Esc>:wq<CR>
0 comments
VimGolf