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 4f0720c8f037090001000007

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 by @magnuswahlstrand:

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

1750 active golfers, 5085 entries

Solutions by @magnuswahlstrand:
11
#672 - Magnus Wahlstrand / @magnuswahlstrand

12/27/2024 at 03:34PM

12
#>1010 - Magnus Wahlstrand / @magnuswahlstrand

12/27/2024 at 03:32PM

13
#>1262 - Magnus Wahlstrand / @magnuswahlstrand

12/27/2024 at 03:07PM

13
#>1262 - Magnus Wahlstrand / @magnuswahlstrand

12/27/2024 at 03:22PM

14
#>1448 - Magnus Wahlstrand / @magnuswahlstrand

12/27/2024 at 03:05PM

14
#>1448 - Magnus Wahlstrand / @magnuswahlstrand

12/27/2024 at 03:06PM

15
#>1545 - Magnus Wahlstrand / @magnuswahlstrand

12/27/2024 at 03:03PM

19
#>1666 - Magnus Wahlstrand / @magnuswahlstrand

12/27/2024 at 12:52PM