return to table of content

Vim Racer

ccvannorman
9 replies
20h4m

:4 does not go to line 4. Or at least, the line numbers are not correct. No thanks, I'll pass.

thot_experiment
4 replies
19h54m

It's using relative line numbering, at least for me this is how I've had vim set up for the last 10 years. It makes commands like 10j easier to do because you can just look to the side and see how many lines away the target is.

dools
3 replies
19h27m

I've never even heard of relative line numbering! I just thought it was broken.

chamomeal
1 replies
17h3m

That’s so funny, I love relative line numbers, but I had no idea about half the tips in here.

I use relative numbers while in normal mode, and absolute numbers in insert mode. That way you get easy vertical jumps, but you still have a sense of your line numbers.

vim_racer
0 replies
12h30m

Another variation on that is relative in both modes, but my current cursor line has the absolute. That's what I tend to roll with!

ccvannorman
0 replies
19h7m

Same!

I guess I can see the appeal; it's not for me though, I'm swimming in the local minimum of absolute line number dependence :)

vim_racer
3 replies
19h47m

Another user mentioned this too. I'll be adding settings to let users turn relative lines off.

ccvannorman
2 replies
19h6m

is the vimrc exposed?

For maximum vimness you could let players mod an empty vinrc from start

vim_racer
0 replies
16h53m

I think the library just has key bindings, so it wouldn't even have a vimrc.

The library seems great at the time, but I might need to look into alternatives in the future.

JoshTriplett
0 replies
16h8m

A full vimrc would allow blatant cheating, such as preprogramming commands to do exactly the movements you need for a given case.

It sounds like allowing toggles for a few key options would probably satisfy most people while keeping the spirit of the exercise.

s1mplicissimus
6 replies
23h10m

Hi, I just engraved myself in the highscore for the jpeg level with 17 seconds. What a lovely competitive game! I had great fun just "shooting from the gut" (no minmaxing, just did the movements i would do "instinctively" to get to the requested position) I particularly cherish the "show me the moves of leaderboard games" feature which hopefully can serve as an educational resource.

In regards to how the leaderboard is constructed, i noticed some of the top players are at 1 second, which doesn't seem humanly possible to me (that would amount to < 0.05 seconds per move). my assumption is they are using scripted input, which with this interface will be hard to prevent. i read you are still figuring out how to regulate everything, so here's an idea: if you rank the leaderboard by number of keystrokes (might consider special handling for shift etc.) instead of time elapsed, you will get the most efficient leaders instead of the fastest ones - that way scripting wouldn't help cheaters anymore.

All the best moving forward!

omega3
3 replies
21h6m

VimGolf does it this way.

rahen
2 replies
20h56m

It's unfortunately very broken.

wyclif
1 replies
20h30m

Do you mean vimgolf or Vim Racer?

rahen
0 replies
6h10m

I mean vimgolf, the answers are very noisy.

swah
0 replies
4h14m

Did you use % ? I'm down to 6.5 and I'm being very clunky.

roflmaostc
0 replies
22h27m

Well you can search for the shortest command combination to reach that position, at least to some extent.

javier_e06
6 replies
20h48m

sounds interesting but I don't understand what:"12 Targets (Burn Detector)" Means. What or where are the targets? I got it! Navigate to the yellow flashing square! Is fun but the numbers are relative so I can't type: :4 To go to line 4 which is the intuitive way.

vim_racer
5 replies
20h37m

I've got this feedback quite a few times, so I'm going to bump configurations up on the roadmap. I think proper vimrc configs might be impossible unless I swap out some of my libraries.

I should provide the ability to disable relative lines though

vim_racer
1 replies
20h36m

Are there any other configurations that people want to have? I can try to do a number of them manually.

wadd1e
0 replies
18h33m

I think a choice between standard/relative line numbers would be nice to have because that choice potentially affects your chosen motions

crucialfelix
1 replies
9h13m

I couldn't figure out what targets were either. simple fix is to put am example yellow square in the sentence inline.

vim_racer
0 replies
4h42m

Oh that's a great suggestion! I was adding a bit to the description, but I should provide an example too.

3np
0 replies
18h51m

I'd echo that "what am I even aiming for" was an initial confusion for me as well. The targets are pretty subtly styled and it took a few rounds of looking to realize it was already there. Also found it confusingly visually similar to the matching-brace/paren/bracket markers. And I'd say I have sharper eyes than most. I imagine even mildly color-blind people will struggle.

Changing to a more distinct color for the targets could already help a lot to improve on those parts I think.

ddlutz
6 replies
23h43m

Maybe i'm missing it, but I think this would be much more useful if it showed what the optimal way to navigate per-target was.

JelteF
1 replies
21h7m

I actually think the wall clock time that is used here is a more useful metric here. Using as few keystrokes is not necessarily most "efficient" in time if you have to think longer about which ones to press.

adumer
0 replies
17h44m

I worry about this, I feel faster using a simple set and mashing, but how do I know I've not just settled into a local minimum.

I think is why I like the jumping plugins

vim_racer
0 replies
21h8m

Hmmm, thats interesting. Right now it just shows every character press, regardless of what it was to achieve.

You'd be interested in something a bit more organized, so you can see how they got specifically from one target to the next. I do have a ton on the roadmap right now, but that has been added as well!

lucianbr
0 replies
23h34m

It shows what the people on the leaderboard used, seems close enough.

kreyenborgi
0 replies
11h14m

You can load the leaderboard and see what keys they used. E.g. number 2 finished in 1.002s and used these keys:

ArrowRight, ArrowRight, ArrowDown, ArrowRight, ArrowUp, ArrowRight, ArrowRight, ArrowRight, ArrowDown, ArrowLeft, ArrowLeft, Shift, ArrowUp, ArrowUp, Shift, ArrowRight, ArrowRight, ArrowRight, ArrowDown, ArrowDown, ArrowLeft, ArrowUp, ArrowRight, Shift, :, 4, Enter, ArrowDown, ArrowDown, ArrowDown, ArrowLeft, ArrowUp, ArrowLeft, ArrowDown, ArrowLeft, ArrowDown, ArrowDown, ArrowDown, ArrowDown, ArrowDown, ArrowDown, ArrowDown, ArrowDown, ArrowDown, ArrowDown, ArrowDown, ArrowDown, ArrowUp, ArrowLeft, ArrowDown, ArrowDown, ArrowLeft, ArrowUp, ArrowUp, ArrowUp, ArrowUp, ArrowUp, ArrowUp, ArrowUp, ArrowUp, ArrowUp, ArrowUp, ArrowUp, ArrowLeft, Escape, Shift, :, 1, 1, Enter, Shift, :, 1, 0, 0, 0, Enter, ArrowDown, ArrowDown, ArrowDown, ArrowRight, ArrowLeft, ArrowLeft, ArrowLeft, ArrowUp, ArrowUp, ArrowUp, ArrowUp, ArrowUp, ArrowUp, ArrowDown, ArrowLeft, Shift, :, 5, Enter, ArrowDown, ArrowDown, ArrowDown, ArrowDown, ArrowDown, ArrowDown, ArrowDown, ArrowDown, ArrowDown, ArrowDown, ArrowDown, ArrowDown, ArrowRight, ArrowRight, ArrowRight, ArrowUp, ArrowRight, ArrowRight, ArrowRight, ArrowRight, ArrowLeft, Shift, ArrowUp, ArrowUp, ArrowUp, ArrowUp, ArrowUp, ArrowLeft, ArrowDown, ArrowDown, ArrowDown, ArrowDown, ArrowDown, ArrowDown, ArrowLeft

...

cryptonector
5 replies
13h44m

This is fun! Keypress count, and a mode where rather than go faster you have to minimize the number of keypresses, would be fantastic additions.

The game description could clarify what the "target" is.

vim_racer
2 replies
12h34m

Thats a good point! I'll have a better description by the next release.

I'm conflicted about keypress count because I really want the focus to be about speed. VimGolf does a great job of covering those types of puzzles/scenarios. The differentiator here is speed. I'm hoping that I'll be able to do some sort of data analysis on key strokes. An interesting finding might be that www is faster than f<a character>.

One of my hypothesis was that searching with 'f' and 'F' is not as efficient as simply navigating with more commong motions like w, e, h, j etc. I've already been proved wrong, Although, I should phrase it like "many top performers use 'f' and 'F'." Which would suggest that they might be fast, or using them isn't too much of a detriment

cryptonector
1 replies
9h34m

I'm very suspicious of the 1s leaders on the board.

F and f are fast (ditto T and t) because , and ; are faster.

vim_racer
0 replies
4h43m

There are some things that make the fake scores really obvious.

It's going to be a challenge to protect the leaderboard against fake scores. There weren't a whole lot of them before, but it's starting to increase as the site grows.

knighthack
1 replies
10h37m

I really need to second keypress minimization as a competitive factor! One reason why Vim appeals to me is not the speed (which is great) but it's ability to minimize the keypresses needed to go somewhere, or to do something.

That may not equate to raw speed, but it does equate to pleasantness of use vis-à-vis other text editors, which matters a lot to the typing experience.

vim_racer
0 replies
1h13m

I think adding the ability to order by different columns would be good.

I'm actually not 100% sure if I can achieve that with dynamo db and my current data structure though. It has a great free tier, but the query language and limitations are very foreign to me.

If I wanted to sort by timeTaken, I had to set it to be one of the two keys. This also has the unfortunate consequence of blocking duplicate times.

It might just be my implementation that is strange, or the dynamo is significantly less featureful than an SQL server.

kingkongjaffa
4 replies
1d1h

This is super fun, do you know any other vim games like this? I've always wanted to vim (emacs evil mode user) but I'm not exactly fast.

gnomespaceship
2 replies
1d

There's Vim Adventure which is more tutorial than a game bit still: https://vim-adventures.com/

palata
1 replies
23h54m

Vim Adventure is great! I find it annoying that it's 25$ for 6 months, because I definitely won't pay again just to quickly redo one level. I think a one-time payment would be more fair.

Or maybe if they keep adding level, we could pay per level, so that the levels that have already been paid would stay forever? I don't know.

alpinisme
0 replies
15h50m

Agree wholeheartedly. I did pay once but the sour taste it leaves in my mouth to redo what I’ve done makes me reluctant even to recommend it to others. I do recommend it, but with a caveat that probably scares them away.

jrvieira
0 replies
1d

vimgolf.com is a classic

gtm1260
4 replies
21h27m

I feel like I found a bug but I'm not sure - when I do <line_number> then Shift +G I don't think the behavior is correct.

vim_racer
3 replies
21h13m

I've heard that feedback before, but I couldn't quite understand what was wrong. I'd really appreciate your help in troubleshooting.

My understanding is that Shift + G should be absolute positioning, so 12G will bring you to the twelfth line.

I do deviate slightly from default VIM in that relative lines are one, so the line count starts at 0, respective to your cursor. Is there a chance that this plays into your experience of the bug?

mewse
1 replies
18h44m

Not the person you're replying to, but I agree that for me (as another heavy shift-G user), vim-racer having `:relativenumber` turned on is where my own troubles are coming from.

I'd really love to be able to specify whether I want absolute or relative numbering (or both or neither); the :set commands don't seem to be implemented?

vim_racer
0 replies
16h51m

I'll make the line numbers absolute by default soon.

It's just a shallowish vim, so there's mostly only key bindings. I'd like to support more in the future though.

mFixman
0 replies
3h44m

It would be nice to be able to toggle off `:relativenumber`.

Half the Vim users navigate large spaces by doing `42j`; have some thought for the other half that does `142G` :-)

Keyframe
4 replies
13h12m

Something is broken on the site. Nothing happens no matter what I try. I've tried in chrome and firefox.

dmichulke
1 replies
11h46m

This was also my first experience was vim, so maybe it's just realistic.

marginalia_nu
0 replies
4h24m

Lacking from the experience is the BEL noises.

vim_racer
0 replies
12h48m

Sorry about that! Something seems to be broken with my publishing pipelines. It used to be a graceful switch. Now I have to manually invalidate a cache. Seems to only happen on some publishes.

gitaarik
0 replies
12h47m

I have the same problem. Also in Chrome it uses a lot of CPU but yeah nothing happens and pressing any buttons doesn't do anything.

rossant
3 replies
23h3m

It's a game you can't stop once you start.

dp-hackernews
1 replies
22h3m

Because you can't exit vim? :-)

rossant
0 replies
20h45m

You got it!

vim_racer
0 replies
20h35m

I might just have to add a :q easter egg some day.

helix278
2 replies
23h54m

Very nice. I would like this for Helix, and allow bringing your own config!

vegabook
1 replies
23h49m

What's the latest talk on the timing for the scheme-based scripting language?

ctenb
0 replies
12h10m

The PR is being worked on steadily. People use it on their own fork. The Helix team does not provide any target dates for features.

fillmore
2 replies
4h18m

I'd like to play, but the line numbers are following the cursor. Seems like a bug, but am I missing something? I'm not an experienced vim user but I'm normally able to navigate fine (albeit slowly).

(Tried in Chrome and Firefox)

swah
0 replies
4h16m

Thats a vim option called relative line numbers.

bananicorn
0 replies
3h36m

Try this in your local vim: set rnu

Really handy for relative movements like 5j or 12k :)

rpigab
1 replies
8h23m

This game made me realize that even if I think it's sweet to code with keyboard only, using the mouse is generally faster, especially in this game where there's no back and forth to type something.

However, using the mouse to navigate is flaky here, probably because of how the terminal and decorations are rendered, it lands a character to the right or left when clicking the target.

vim_racer
0 replies
1h9m

Ideally, I could fix the mousing clicking and add targets that you need to delete.

I'm actually curious who would win that race. Because you're right; mouse users have a huge advantage right now, but no one just clicks on code haha!

mFixman
1 replies
3h41m

This is fantastic!

I wish there was a mode where you minimise the keypresses rather than the speed; that way the best solution is Vim golfing rather than fast hjkl'ing.

Quick bug report: the character '`' appears as "Unsupported" in the leaderboard. This is very visible when following Duff's device using marks.

vim_racer
0 replies
1h19m

Oh that's a huge find thank you. I wasn't sure what was missing.

I think I'm working off a white list, so I should just be able to add that to it.

latexr
1 replies
16h31m

My first solution: wjkljl4j%%%6k$%%G

tmountain
0 replies
10h4m

It changes every time.

fdlaks
1 replies
22h10m

This is really cool, I ran into a bug where I deleted a line that the program would have targeted in a future step which crashed it for me though

vim_racer
0 replies
21h11m

That has been a tough bug to fix. From a configuration standpoint, deleting should be impossible. The VIM keybindings library seems to override that.

I do really appreciate you mentioning it though because it helps in prioritization.

bArray
1 replies
8h33m

Has the leader board be gamed by any chance [1]?

1st himom 0min 1.001s 490

2nd elmoFOOBAR 0min 1.002s 400

3rd VeryFastTyper 0min 1.003s 708

4th EmacsUser 0min 1.004s 717

5th ShawnT 0min 1.005s 720

6th benbp 0min 1.008s 714

7th hehe 0min 1.023s 604

8th anthony 0min 1.274s 565

9th chris 0min 1.327s 543

10th MasterWq 0min 1.333s 540

11th blake 0min 1.334s 540

12th jbp 0min 1.381s 521

13th test12345 0min 1.437s 20

14th jonmv 0min 1.476s 488

15th spektrokalter 0min 1.577s 457

[1] https://vim-racer.com/#leaderboardAnchor

Psoodu1313
0 replies
8h26m

probably used macro for those, since the navigation is the same every time

Woshiwuja
1 replies
12h32m

Certified vim racist

Woshiwuja
0 replies
8h23m

Downvoted by true racists

rmurray2050
0 replies
6h5m

really fun to play! very creative game! thank you :)

notemaker
0 replies
21h34m

I've had a similar idea on my backburner for two years, as a fun project to dabble in Elixir, but this is just so much more _fun_ than my version which looks like an admin page that just happens to have a Vim canvas on it.

Well done!

lizardking
0 replies
4h38m

This is a lot more fun than I would have expected. Nicely done!

lelanthran
0 replies
21h52m

Doing `/searchterm/e` doesn't work.

Quite nice otherwise.

knighthack
0 replies
10h40m

This was really fun! I could imagine myself really getting into this, as someone who enjoys Vim motions. It would also be great to see automated replays, based on the inputs in the leaderboard.

iamcreasy
0 replies
23h24m

It is very useful to be able to see how other did it though leaderboard.

gloosx
0 replies
13h56m

Terrible game, but it's good at one thing: showing that navigating Vim without Easymotion is racing on foot instead of a race car.

daphodile
0 replies
1d

I just went through all the "maps," very insightful!

_jcrossley
0 replies
2h40m

Just hit top 30 in all the standard races - thanks so much, this was such a delightful way to practice my new Glove80 :)