Switch function arguments
How to switch two arguments of a function.
Start file
function testFunction (foo, bar) {
}
End file
function testFunction (bar, foo) {
}
1c1
< function testFunction (foo, bar) {
---
> function testFunction (bar, foo) {
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
159 remaining solutions by
signing in and submitting your own entry
#160
Robby Grossman / @freerobby -
Score: 15 -
07/16/12 @ 20:51
ffibar, <Esc>f,deZZ
0 comments
#161
Federico Bond / @federicobond -
Score: 15 -
07/17/12 @ 22:49
f,xxdwFfPa, <Esc>ZZ
0 comments
#162
Allan Caffee / @AllanCaffee -
Score: 15 -
08/08/12 @ 00:12
WWldWea, <Esc>pxXZZ
0 comments
#163
Ikhsan Maulana / @ixandidu -
Score: 15 -
08/18/12 @ 07:47
ffdf ea, foo<Esc>ZZ
0 comments
#164
juan patlang / @juanpatlang -
Score: 15 -
08/23/12 @ 01:57
5edt)bibar, <Esc>ZZ
0 comments
#165
Ori Kremer / @orikr -
Score: 15 -
08/28/12 @ 13:35
f(abar, <Esc>f,deZZ
0 comments
#166
Arto Vuori / @dhpe -
Score: 15 -
08/31/12 @ 12:25
ffdtbea, <Esc>pxXZZ
0 comments
#167
Nicolas Friedli / @NicolasFriedli -
Score: 15 -
10/29/12 @ 09:50
fbdT(wi, foo<Esc>ZZ
0 comments
#168
Underhill Labs / @underhilllabs -
Score: 15 -
10/29/12 @ 21:38
f,dt)bibar, <Esc>ZZ
0 comments
#169
Adam Dratwinski / @adwinsky -
Score: 15 -
11/27/12 @ 11:46
ffdtbwi, foo<Esc>ZZ
0 comments
#170
Casey Robinson / @rampant_monkey -
Score: 15 -
12/05/12 @ 13:32
4wdt)bibar, <Esc>ZZ
0 comments
#171
Michaël M. / @asenar -
Score: 16 -
06/08/12 @ 02:10
3wcwbar<Esc><Right><Right>p<Right>dwZZ
0 comments
#172
Omar Ramos / @_omarramos -
Score: 16 -
06/08/12 @ 21:23
f(ci(bar, foo<Esc>ZZ
0 comments
#173
Mario Forner / @m_forner -
Score: 16 -
06/18/12 @ 11:49
f,dbwPldwF,P:wq<CR>
0 comments
#174
Dan Masquelier / @danmasq -
Score: 16 -
06/19/12 @ 14:58
f,dt)bPa, <Esc>BXXZZ
0 comments
#175
Anouar ADLANI / @aadlani -
Score: 16 -
07/13/12 @ 16:05
f(ci(bar, foo<Esc>ZZ
0 comments
#176
Sebastian Korten / @FlashKorten -
Score: 16 -
07/14/12 @ 03:28
ffdwwPldwF,P<Esc>:x<CR>
0 comments
#177
Eric Soderstrom / @eksoderstrom -
Score: 16 -
07/18/12 @ 10:55
f(ldwllPldwBBpZZ
0 comments
#178
fyolnish / @fyolnish -
Score: 16 -
07/25/12 @ 18:17
3wdwwPldw2bp:wq<CR>
0 comments
#179
Petri Rosenström / @wuzuuz -
Score: 16 -
08/12/12 @ 02:48
ffdelpldeF,P:wq<CR>
0 comments
#180
Jason Bruce / @jbrucenet -
Score: 16 -
08/26/12 @ 10:48
ffibar, <Esc>f,dt)ZZ
0 comments
#181
Dragos Miron / @capze -
Score: 16 -
11/27/12 @ 12:07
f)cb<BS><BS><Esc>FfPa, <Esc>ZZ
0 comments
#182
James S.P. Barth / @sp_barth -
Score: 16 -
01/16/13 @ 13:29
3wdWea, foo<Esc>:wq<CR>
0 comments
#183
Niels Madan / @nielsmadan -
Score: 16 -
01/22/13 @ 13:13
f,ci(bar, foo<Esc>ZZ
0 comments
#184
Sam Phippen / @samphippen -
Score: 16 -
05/08/13 @ 13:47
f)ci)bar, foo<Esc>ZZ
0 comments
#185
James Cash / @jamesnvc -
Score: 17 -
06/04/12 @ 11:29
ff"adwwdw"aPF(pZZ
0 comments
#186
Endri Runa / @endiruna -
Score: 17 -
06/10/12 @ 08:15
f,dblpldeF,P<Esc>:wq<CR>
0 comments
#187
emmanuel delgado / @chischaschos -
Score: 17 -
06/22/12 @ 10:11
ffvwlxwi, <Esc>ph2xZZ
0 comments
#188
Christopher Biscardi / @chrisbiscardi -
Score: 18 -
07/17/12 @ 00:21
3Wdwi<BS><BS><Esc>Bpa, <Esc>:wq<CR>
0 comments
#189
Lajos Koszti / @Ajnasz -
Score: 19 -
06/04/12 @ 07:52
f(ldf wi, <Esc>phdt):x<CR>
0 comments
#190
Святослав Сюрин / @rmrfhome -
Score: 19 -
06/11/12 @ 06:16
f(wvedwPlvedbbp:wq<CR>
0 comments
#191
Philippe Creux / @pcreux -
Score: 21 -
07/12/12 @ 23:44
/fo<CR>2dwea, <Esc>phdt):wq<CR>
0 comments
#192
Gowtham Madhava / @gowthamgowtham -
Score: 22 -
07/02/12 @ 09:54
ffdf,ea, <Esc>"<Esc><Esc><Esc>pxFb<Left>xZZ
0 comments
#193
Tyler Breisacher / @tbreisacher -
Score: 23 -
08/25/12 @ 00:40
t(llvlldt)phhi, <Esc>T(xxZZ
0 comments
#194
Howard / @h0w412d -
Score: 25 -
07/15/12 @ 19:53
:%s/foo, bar/bar, foo/<CR>ZZ
0 comments
#195
Korbinian Stoemmer / @PaulSmecker -
Score: 25 -
03/08/13 @ 05:15
wwldwwwPhhi, <Esc>WWBBBlxx<Esc>ZZ
0 comments
#196
Noel Alejandro / @noelrock333 -
Score: 27 -
06/22/12 @ 16:03
3Wdw7hlplwjhhhkhhhdwlp:w<CR><C-W>q
0 comments
#197
Dustin Willis Webber / @Mephux -
Score: 28 -
08/28/12 @ 09:29
:%s/foo\, bar/bar\, foo/g<CR>ZZ
0 comments
#198
JR Tashjian / @jrtashjian -
Score: 31 -
04/18/13 @ 10:49
:s:\(\w*\), \(\w*\):\2, \1<CR>:wq<CR>
0 comments
#199
Jan Wedekind / @wedesoft -
Score: 33 -
07/12/12 @ 14:43
:.s/\(...\), \(...\)/\2, \1/<CR>:wq<CR>
0 comments