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 [challenge ID]

Played Challenges

Easier Align - 291 entries

Align the columns of a markdown table

  • Best score: 57
  • Best player score: 205
  • Position: #47 / 85
  • Number of attempts: 6
delete swap - 1466 entries

delete all swap

  • Best score: 5
  • Best player score: 6
  • Position: #320 / 465
  • Number of attempts: 3
Lowercase first characters - 458 entries

This is the (abridged) input for Day 3 in Advent of Code 2019. The output is a format more suitable for Prolog programming: the two lines of input become two lists of pairs, joined together in a wires functor.

  • Best score: 33
  • Best player score: 48
  • Position: #136 / 172
  • Number of attempts: 1
대법원 인명용 한자 바인딩(Combine Hangul and Chinese characters) - 27 entries

The character system of Chinese characters has caused difficulties in character encoding for a long time. The content is to link the Korean name and the corresponding Chinese character. input is simply pasted Chinese table, and you need to make it in json format. Most of them are omitted because there are too many Chinese characters, but I think it's better to work from "가" to "힐". There are a few rules here. 1. One Hangul must correspond to multiple Chinese characters. 2. In the case of "a(b c)", "a" is a redundant Chinese character, so you must remove "a" and use only "b c". 3. There are some characters here that don't appear to be an encoding issue, but they should all be used. 4. Should follow json format, Chinese characters are arrays. 문자인코딩의 역사속에서 한문은 여러가지 난제를 만들어왔습니다. 이 문제는 대법원 인명용 한자를 바인딩하는 것입니다. input은 단순히 인명용한자 표를 붙여넣기 한 것이며, 이것을 json형식으로 만들어야합니다. 한자가 너무 많은 관계로 대부분을 생략하였으나, 기본적으로 "가"부터 "힐"까지 모두 동작하는 것이 좋다고 생각합니다. 여기에는 몇가지 규칙이 있습니다. 1. 한글 하나에는 여러개의 한자가 대응합니다. 2. "a(b c)"같은 경우 "a"는 중복된 한자이므로, "a"를 제거하고 "b c"만을 사용해야합니다. 3. 몇몇 한자는 인코딩의 문제로 보이지 않을 수 있습니다. 그러나 모두 사용해야합니다. 4. json형식을 따르며, 한자는 배열입니다.

  • Best score: 56
  • Best player score: 75
  • Position: #5 / 5
  • Number of attempts: 9
Making 3 line function a one liner. - 303 entries

Simple challenge for frequent action while programming.

  • Best score: 4
  • Best player score: 4
  • Position: #5 / 193
  • Number of attempts: 1
Modernise code - 1331 entries

Modernise and clean up some C++ code.

  • Best score: 34
  • Best player score: 34
  • Position: #5 / 306
  • Number of attempts: 6
Enumerate Bullets - 292 entries

We will need to refer to the bullet points in our document explicitly later, so we need to assign them some ID's!

  • Best score: 20
  • Best player score: 29
  • Position: #50 / 80
  • Number of attempts: 2
Put a cross in the square - 203 entries

Put a cross in the square

  • Best score: 20
  • Best player score: 24
  • Position: #63 / 84
  • Number of attempts: 2
swap number pairs - 2002 entries

Swap the numbers in a bunch of 2-element arrays.

  • Best score: 16
  • Best player score: 23
  • Position: #160 / 369
  • Number of attempts: 1
HS Final exam vimgolf - 864 entries

Change the initial file to a single line containing all names comma-separated with numbers inside parentheses.

  • Best score: 21
  • Best player score: 23
  • Position: #83 / 227
  • Number of attempts: 5
Change double quotes to single quotes, but with a twist - 281 entries

Although this challenge is in the context of a Python function, you don't need to know Python to do this challenge. It is to add contexts and interesting constraints. The file contains a function that prints a multi-line string literal. I wrote the string literal with double quotes, but then I decided to use single quotes instead, and that's your challenge. However, interestingly enough, the string itself contains single and double quotes. This means, inside the string literal, the originally escaped double quotes no longer need to be escaped, but the single quotes now need to be escaped. Note that the triple double quotes in the docstring should be left alone.

  • Best score: 22
  • Best player score: 23
  • Position: #22 / 53
  • Number of attempts: 11
Rural Post - 4352 entries

Simple challenge to remove all but the post code on each line

  • Best score: 9
  • Best player score: 14
  • Position: #645 / 1066
  • Number of attempts: 5
Satisfy the go linter - 2169 entries

You just came up with this briliant go vars package. But dang, you forgot to add comments to the exported variables. Can you add a comment over each variable with a TODO-placeholder?

  • Best score: 20
  • Best player score: 23
  • Position: #198 / 434
  • Number of attempts: 1
Data reformat - 271 entries

Reformat this copy-paste data! #csv

  • Best score: 38
  • Best player score: 43
  • Position: #26 / 60
  • Number of attempts: 4
xrandr outputs and dashes - 652 entries

uh oh, different video drivers identify display outputs with more dashes. Quick, need to change this xrandr script!

  • Best score: 12
  • Best player score: 17
  • Position: #182 / 213
  • Number of attempts: 2
From a Thunderlink to a Markdown link - 738 entries

ThunderLinks are durable hyperlinks to specific email messages generated from Thunderbird in HTML format. Leverage the power of vim to make them suitable for a markdown-formatted file.

  • Best score: 18
  • Best player score: 20
  • Position: #74 / 165
  • Number of attempts: 3
Yo To Hello - 1107 entries

Simply Turn Yo To Hello

  • Best score: 10
  • Best player score: 10
  • Position: #10 / 512
  • Number of attempts: 1
Replace pattern with 1, 2, 3, ... on each line - 1090 entries

For each line replace a search pattern (in this case $) with numbers starting at 1 and then increasing by 1 for each replaced match. a$b$c$ -> a0b1c2

  • Best score: 21
  • Best player score: 27
  • Position: #111 / 223
  • Number of attempts: 5
Simple, Practical, and Common - 33354 entries

Simple things we do all the time should be able to be done with very few keystrokes, but sometimes I find something I need to do makes me go, "There MUST be a better way." This challenge is just a simple movement and entering text at a certain place.

  • Best score: 22
  • Best player score: 23
  • Position: #2745 / 7358
  • Number of attempts: 6
Swap values - 4535 entries

Well, swap the values...

  • Best score: 11
  • Best player score: 15
  • Position: #962 / 1255
  • Number of attempts: 5
prepend * to every non-blank line - 6202 entries

Prepend an asterisk to every non-blank line in the input file.

  • Best score: 10
  • Best player score: 15
  • Position: #939 / 1514
  • Number of attempts: 3
One number per line - 18615 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 17
  • Position: #1297 / 3841
  • Number of attempts: 10
V to the i - 4743 entries

Input is 99 V's. Output is 100 i's.

  • Best score: 7
  • Best player score: 8
  • Position: #1438 / 1878
  • Number of attempts: 3
Add semicolons - 10785 entries

Simply add a semicolon at the end of each line

  • Best score: 10
  • Best player score: 11
  • Position: #1368 / 3042
  • Number of attempts: 3
Box it - 7818 entries

Create a box around a line.

  • Best score: 21
  • Best player score: 21
  • Position: #296 / 1861
  • Number of attempts: 6
Just the middle - 11346 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 8
  • Position: #3034 / 4160
  • Number of attempts: 1
Line under headers - 1996 entries

Put a line under each header, and remove the other markdown formatting.

  • Best score: 24
  • Best player score: 32
  • Position: #322 / 494
  • Number of attempts: 3
Array transposition - 2378 entries

Transpose two arrays into one.

  • Best score: 16
  • Best player score: 21
  • Position: #241 / 443
  • Number of attempts: 7
I forgot quotes - 15923 entries

Oops.

  • Best score: 10
  • Best player score: 21
  • Position: #3734 / 4159
  • Number of attempts: 2
Alphabet soup - 419 entries

Create a column of all alphabet characters organized in a funky way

  • Best score: 25
  • Best player score: 26
  • Position: #31 / 103
  • Number of attempts: 6
switch variable - 5028 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 11
  • Position: #631 / 1734
  • Number of attempts: 3
Vinícius Hoyer
Twitter:

A modern day philosopher | ptBR | enUS | jpJP | Javascript | Regex | VIM https://t.co/p7SV2tPnR4 - ele/he

entered into 31 challenges

contributed 0 challenges