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

Lowercase first characters - 76 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: #23 / 28
  • Number of attempts: 1
대법원 인명용 한자 바인딩(Combine Hangul and Chinese characters) - 17 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: 72
  • Best player score: 75
  • Position: #2 / 2
  • Number of attempts: 9
Making 3 line function a one liner. - 47 entries

Simple challenge for frequent action while programming.

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

Modernise and clean up some C++ code.

  • Best score: 34
  • Best player score: 34
  • Position: #5 / 120
  • Number of attempts: 6
Enumerate Bullets - 112 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: #21 / 28
  • Number of attempts: 2
Put a cross in the square - 58 entries

Put a cross in the square

  • Best score: 20
  • Best player score: 24
  • Position: #31 / 33
  • Number of attempts: 2
swap number pairs - 1123 entries

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

  • Best score: 16
  • Best player score: 23
  • Position: #91 / 215
  • Number of attempts: 1
HS Final exam vimgolf - 512 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: #48 / 139
  • Number of attempts: 5
Change double quotes to single quotes, but with a twist - 204 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: #17 / 43
  • Number of attempts: 11
Rural Post - 3731 entries

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

  • Best score: 9
  • Best player score: 14
  • Position: #540 / 919
  • Number of attempts: 5
Satisfy the go linter - 1524 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: #138 / 316
  • Number of attempts: 1
Data reformat - 207 entries

Reformat this copy-paste data! #csv

  • Best score: 38
  • Best player score: 43
  • Position: #21 / 50
  • Number of attempts: 4
xrandr outputs and dashes - 523 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: #147 / 173
  • Number of attempts: 2
From a Thunderlink to a Markdown link - 597 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: #56 / 136
  • Number of attempts: 3
Yo To Hello - 883 entries

Simply Turn Yo To Hello

  • Best score: 10
  • Best player score: 10
  • Position: #10 / 414
  • Number of attempts: 1
Replace pattern with 1, 2, 3, ... on each line - 898 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: #97 / 184
  • Number of attempts: 5
Simple, Practical, and Common - 32746 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: #2695 / 7235
  • Number of attempts: 6
Swap values - 4390 entries

Well, swap the values...

  • Best score: 11
  • Best player score: 15
  • Position: #942 / 1230
  • Number of attempts: 5
prepend * to every non-blank line - 5776 entries

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

  • Best score: 10
  • Best player score: 15
  • Position: #871 / 1421
  • Number of attempts: 3
One number per line - 18240 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 17
  • Position: #1255 / 3760
  • Number of attempts: 10
V to the i - 4596 entries

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

  • Best score: 7
  • Best player score: 8
  • Position: #1417 / 1837
  • Number of attempts: 3
Add semicolons - 10429 entries

Simply add a semicolon at the end of each line

  • Best score: 10
  • Best player score: 11
  • Position: #1335 / 2954
  • Number of attempts: 3
Box it - 7622 entries

Create a box around a line.

  • Best score: 21
  • Best player score: 21
  • Position: #297 / 1819
  • Number of attempts: 6
Just the middle - 11074 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 8
  • Position: #3002 / 4088
  • Number of attempts: 1
Line under headers - 1852 entries

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

  • Best score: 24
  • Best player score: 32
  • Position: #296 / 459
  • Number of attempts: 3
Array transposition - 2234 entries

Transpose two arrays into one.

  • Best score: 16
  • Best player score: 21
  • Position: #225 / 422
  • Number of attempts: 7
I forgot quotes - 15639 entries

Oops.

  • Best score: 10
  • Best player score: 21
  • Position: #3673 / 4095
  • Number of attempts: 2
Alphabet soup - 333 entries

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

  • Best score: 25
  • Best player score: 26
  • Position: #24 / 78
  • Number of attempts: 6
switch variable - 4863 entries

how fast can you switch two variable ?

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

Vue.js web developer at @queroedu "Automatic translate friendly" tweets; Tweets "fáceis para o tradutor automático": en ↔ pt-BR. https://t.co/p7SV2u6YIC - ele/he/him

entered into 29 challenges

contributed 0 challenges