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 50a2bdd4f0ea8a0002000055

Presidential Sorting

Given a nice CSV formatted arrangement of the Presidents of the United States, we need to print out an alphabetical list in pretty columns. Prove that vim can conquer this basic Excel task!

Start file
President,Political Party,Dates in Office
George Washington,,1789_97
John Adams,Federalist,1797_1801
Thomas Jefferson,Democratic-Republican,1801_9
James Madison,Democratic-Republican,1809_17
James Monroe,Democratic-Republican,1817_25
John Quincy Adams,Democratic-Republican,1825_29
Andrew Jackson,Democratic,1829_37
Martin Van Buren,Democratic,1837_41
William Henry Harrison,Whig,1841
John Tyler,Whig,1841_45
James Knox Polk,Democratic,1845_49
Zachary Taylor,Whig,1849_50
Millard Fillmore,Whig,1850_53
Franklin Pierce,Democratic,1853_57
James Buchanan,Democratic,1857_61
Abraham Lincoln,Republican,1861_65
Andrew Johnson,Democratic/National Union,1865_69
Ulysses Simpson Grant,Republican,1869_77
Rutherford Birchard Hayes,Republican,1877_81
James Abram Garfield,Republican,1881
Chester Alan Arthur,Republican,1881_85
Grover Cleveland,Democratic,1885_89
Benjamin Harrison,Republican,1889_93
Grover Cleveland,Democratic,1893_97
William McKinley,Republican,1897_1901
Theodore Roosevelt,Republican,1901_9
William Howard Taft,Republican,1909_13
Woodrow Wilson,Democratic,1913_21
Warren Gamaliel Harding,Republican,1921_23
Calvin Coolidge,Republican,1923_29
Herbert Clark Hoover,Republican,1929_33
Franklin Delano Roosevelt,Democratic,1933_45
Harry S. Truman,Democratic,1945_53
Dwight David Eisenhower,Republican,1953_61
John Fitzgerald Kennedy,Democratic,1961_63
Lyndon Baines Johnson,Democratic,1963_69
Richard Milhous Nixon,Republican,1969_74
Gerald Rudolph Ford,Republican,1974_77
Jimmy Carter,Democratic,1977_81
Ronald Wilson Reagan,Republican,1981_89
George Herbert Walker Bush,Republican,1989_93
Bill Clinton,Democratic,1993_2001
George Walker Bush,Republican,2001_9
Barack Hussein Obama,Democratic,2009_
End file
President                   Political Party            Dates in Office
Abraham Lincoln             Republican                 1861–65
Andrew Jackson              Democratic                 1829–37
Andrew Johnson              Democratic/National Union  1865–69
Barack Hussein Obama        Democratic                 2009–
Benjamin Harrison           Republican                 1889–93
Bill Clinton                Democratic                 1993–2001
Calvin Coolidge             Republican                 1923–29
Chester Alan Arthur         Republican                 1881–85
Dwight David Eisenhower     Republican                 1953–61
Franklin Delano Roosevelt   Democratic                 1933–45
Franklin Pierce             Democratic                 1853–57
George Herbert Walker Bush  Republican                 1989–93
George Walker Bush          Republican                 2001–9
George Washington                                      1789–97
Gerald Rudolph Ford         Republican                 1974–77
Grover Cleveland            Democratic                 1885–89
Grover Cleveland            Democratic                 1893–97
Harry S. Truman             Democratic                 1945–53
Herbert Clark Hoover        Republican                 1929–33
James Abram Garfield        Republican                 1881
James Buchanan              Democratic                 1857–61
James Knox Polk             Democratic                 1845–49
James Madison               Democratic-Republican      1809–17
James Monroe                Democratic-Republican      1817–25
Jimmy Carter                Democratic                 1977–81
John Adams                  Federalist                 1797–1801
John Fitzgerald Kennedy     Democratic                 1961–63
John Quincy Adams           Democratic-Republican      1825–29
John Tyler                  Whig                       1841–45
Lyndon Baines Johnson       Democratic                 1963–69
Martin Van Buren            Democratic                 1837–41
Millard Fillmore            Whig                       1850–53
Richard Milhous Nixon       Republican                 1969–74
Ronald Wilson Reagan        Republican                 1981–89
Rutherford Birchard Hayes   Republican                 1877–81
Theodore Roosevelt          Republican                 1901–9
Thomas Jefferson            Democratic-Republican      1801–9
Ulysses Simpson Grant       Republican                 1869–77
Warren Gamaliel Harding     Republican                 1921–23
William Henry Harrison      Whig                       1841
William Howard Taft         Republican                 1909–13
William McKinley            Republican                 1897–1901
Woodrow Wilson              Democratic                 1913–21
Zachary Taylor              Whig                       1849–50

View Diff

1,45c1,45
< President,Political Party,Dates in Office
< George Washington,,1789_97
< John Adams,Federalist,1797_1801
< Thomas Jefferson,Democratic-Republican,1801_9
< James Madison,Democratic-Republican,1809_17
< James Monroe,Democratic-Republican,1817_25
< John Quincy Adams,Democratic-Republican,1825_29
< Andrew Jackson,Democratic,1829_37
< Martin Van Buren,Democratic,1837_41
< William Henry Harrison,Whig,1841
< John Tyler,Whig,1841_45
< James Knox Polk,Democratic,1845_49
< Zachary Taylor,Whig,1849_50
< Millard Fillmore,Whig,1850_53
< Franklin Pierce,Democratic,1853_57
< James Buchanan,Democratic,1857_61
< Abraham Lincoln,Republican,1861_65
< Andrew Johnson,Democratic/National Union,1865_69
< Ulysses Simpson Grant,Republican,1869_77
< Rutherford Birchard Hayes,Republican,1877_81
< James Abram Garfield,Republican,1881
< Chester Alan Arthur,Republican,1881_85
< Grover Cleveland,Democratic,1885_89
< Benjamin Harrison,Republican,1889_93
< Grover Cleveland,Democratic,1893_97
< William McKinley,Republican,1897_1901
< Theodore Roosevelt,Republican,1901_9
< William Howard Taft,Republican,1909_13
< Woodrow Wilson,Democratic,1913_21
< Warren Gamaliel Harding,Republican,1921_23
< Calvin Coolidge,Republican,1923_29
< Herbert Clark Hoover,Republican,1929_33
< Franklin Delano Roosevelt,Democratic,1933_45
< Harry S. Truman,Democratic,1945_53
< Dwight David Eisenhower,Republican,1953_61
< John Fitzgerald Kennedy,Democratic,1961_63
< Lyndon Baines Johnson,Democratic,1963_69
< Richard Milhous Nixon,Republican,1969_74
< Gerald Rudolph Ford,Republican,1974_77
< Jimmy Carter,Democratic,1977_81
< Ronald Wilson Reagan,Republican,1981_89
< George Herbert Walker Bush,Republican,1989_93
< Bill Clinton,Democratic,1993_2001
< George Walker Bush,Republican,2001_9
< Barack Hussein Obama,Democratic,2009_
---
> President                   Political Party            Dates in Office
> Abraham Lincoln             Republican                 1861–65
> Andrew Jackson              Democratic                 1829–37
> Andrew Johnson              Democratic/National Union  1865–69
> Barack Hussein Obama        Democratic                 2009–
> Benjamin Harrison           Republican                 1889–93
> Bill Clinton                Democratic                 1993–2001
> Calvin Coolidge             Republican                 1923–29
> Chester Alan Arthur         Republican                 1881–85
> Dwight David Eisenhower     Republican                 1953–61
> Franklin Delano Roosevelt   Democratic                 1933–45
> Franklin Pierce             Democratic                 1853–57
> George Herbert Walker Bush  Republican                 1989–93
> George Walker Bush          Republican                 2001–9
> George Washington                                      1789–97
> Gerald Rudolph Ford         Republican                 1974–77
> Grover Cleveland            Democratic                 1885–89
> Grover Cleveland            Democratic                 1893–97
> Harry S. Truman             Democratic                 1945–53
> Herbert Clark Hoover        Republican                 1929–33
> James Abram Garfield        Republican                 1881
> James Buchanan              Democratic                 1857–61
> James Knox Polk             Democratic                 1845–49
> James Madison               Democratic-Republican      1809–17
> James Monroe                Democratic-Republican      1817–25
> Jimmy Carter                Democratic                 1977–81
> John Adams                  Federalist                 1797–1801
> John Fitzgerald Kennedy     Democratic                 1961–63
> John Quincy Adams           Democratic-Republican      1825–29
> John Tyler                  Whig                       1841–45
> Lyndon Baines Johnson       Democratic                 1963–69
> Martin Van Buren            Democratic                 1837–41
> Millard Fillmore            Whig                       1850–53
> Richard Milhous Nixon       Republican                 1969–74
> Ronald Wilson Reagan        Republican                 1981–89
> Rutherford Birchard Hayes   Republican                 1877–81
> Theodore Roosevelt          Republican                 1901–9
> Thomas Jefferson            Democratic-Republican      1801–9
> Ulysses Simpson Grant       Republican                 1869–77
> Warren Gamaliel Harding     Republican                 1921–23
> William Henry Harrison      Whig                       1841
> William Howard Taft         Republican                 1909–13
> William McKinley            Republican                 1897–1901
> Woodrow Wilson              Democratic                 1913–21
> Zachary Taylor              Whig                       1849–50

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 16 remaining solutions by signing in and submitting your own entry
#17 hiding / I_haveno_name - Score: 53 - 10/20/13 @ 09:15
:se ve=all|2,$sor|%s/_/<C-K>-N<CR>qwf,xD28|pF,xD55|p-q45@wZZ

0 comments

#18 Hubba / HubbaBubbaFett - Score: 54 - 11/19/12 @ 16:45
:%s/,/<Tab> /g|se et ts=27|ret|2,sor|%s/_/<C-V>xe2<C-V>x80<C-V>x93<CR>ZZZ

0 comments

#19 Eric Andres / eric_m_andres - Score: 56 - 12/05/12 @ 04:09
:se ts=28 et<CR>qqf,r<Tab>;.x+qVG:sor<CR>60@q:%s/_/<C-V>xe2<C-V>x80<C-V>x93<CR>ZZ

0 comments

#20 Pete Johns / johnsyweb - Score: 62 - 11/24/12 @ 01:37
qqf,x30i <Esc>29|dw;x30i <Esc>56|dw+q@qx27i <Esc>+43@q:%s!_!<C-K>-N!|2,$sor|x<CR>

0 comments

Created by: mr_ino

20 active golfers, 45 entries

Leaderboard (lowest score wins):
40
#1 - Urtica dioica / udioica

12/20/2012 at 05:19AM

40
#2 - John Braxler / braxler

12/22/2014 at 08:18PM

41
#3 - Kerson Hsiao / KersonHsiao

11/14/2012 at 05:33AM

44
#4 - jakeroberts / jakeroberts

05/29/2017 at 04:53PM

44
#5 - galadriel2143 / galadriel2143

09/14/2017 at 01:50AM

45
#6 - a24f0600 / a24f0600

11/28/2012 at 05:32PM

45
#7 - Charles H. Leggett / cleggett

01/16/2015 at 12:39PM

46
#8 - 無ん垢の叫び / john_ababa

11/18/2012 at 06:56AM

46
#9 - Marcin Sza / coot_

11/18/2012 at 01:38PM

47
#10 - h_east (トロッコ6個) / h_east

11/15/2012 at 03:00PM

47
#11 - Petro Тrouq / zulolosi

11/21/2012 at 03:06AM

47
#12 - Robert Goeddel / f0rdpr3fect

11/13/2015 at 09:02PM

49
#13 - ひめ / Milly

11/19/2012 at 08:28AM

50
#14 - Matthieu Crapet / mcr05

12/16/2014 at 09:43AM

51
#15 - Conner McDaniel / connermcd

11/13/2012 at 11:20PM

52
#16 - Stefan Knudsen / knud32

06/26/2015 at 06:13AM

53
#17 - hiding / I_haveno_name

10/20/2013 at 09:15AM

54
#18 - Hubba / HubbaBubbaFett

11/19/2012 at 04:45PM

56
#19 - Eric Andres / eric_m_andres

12/05/2012 at 04:09AM

62
#20 - Pete Johns / johnsyweb

11/24/2012 at 01:37AM