Live data from Hacker News

A CLI game to learn Vim

ostechnix.com

21–30 of 55 posts

Re: A CLI game to learn Vim

#21

Doesn't work for me at all on Arch. I always just see : Press enter to play => You win the game! Without anything inbetween, and it jumps straight to the next level.

I'm getting the same behaviour on Ubuntu 16.04 with gcc version 7.2.0.

Edit: There seems to be an issue for this with a fix. https://github.com/jmoon018/PacVim/issues/28

Re: A CLI game to learn Vim

#22
post #16

Earlier quoted context omitted.

I've been practicing making Dockerfiles for things so I figured I'd do this one too. https://gist.github.com/allanlw/64aaa1ed1b24fa3eb833da7940b3... Dockerfile style/feedback appreciated, although this is really quite terse

Here's one based on alpine which should be a bit smaller: https://gist.github.com/tlrobinson/f64d80b872338a878d14601ed...

Nice. I forked it and added tini to handle signals. I also pushed it up to docker hub so anybody can run with:

  docker run -it freedomben/pacvim
I'm gonna send a PR to the pacvim project but here's the repo for now: https://github.com/FreedomBen/pacvim-docker

Edit: Here is the PR - https://github.com/jmoon018/PacVim/pull/29

Re: A CLI game to learn Vim

#24
Other editors are available.

I've never been either old enough (47) or cool enough (-20C) to really give a shit about vi/vim or emacs and co. I merely tolerate them and can do the very basics.

I use joe by preference at the console ("boredom" if you like - no real excitement) and live with nano. vi and emacs I merely tolerate because I generally have to look up something.

kate's alright - she's a pretty lass (for an editor) but needs a lot of Plasma and QT.

Re: A CLI game to learn Vim

#25
post #24

Other editors are available. I've never been either old enough (47) or cool enough (-20C) to really give a shit about vi/vim or emacs and co. I merely tolerate them and can do the very basics. I use joe by preference at the console ("boredom" if you like - no real excitement) and live with nano. vi and emacs I merely tolerate because I generally have to look up something. kate's alright - she's a pretty lass (for an…

"JOE is a blending of MicroPro's venerable microcomputer word processor WordStar and Richard Stallman's famous LISP based text editor GNU-EMACS (but it does not use code from either program): most of the basic editing keys are the same as in WordStar as is the overall feel of the editor. JOE also has some of the key bindings and many of the powerful features of EMACS."

sounds like you'd enjoy emacs

Re: A CLI game to learn Vim

#26

Or try kakoune, a more discoverable and ergonomic rewrite of vim.

Absolutely. 19 years of using vi/vim, and kak won me over in less than a week. One year later, still very happy with kak. Vim is great, but kak is better. Its source code is pretty exemplary, too, and I don't ordinarily have anything at all good to say about C++.

Re: A CLI game to learn Vim

#27
post #20
post #11

Earlier quoted context omitted.

The classic key bindings for rougelikes were vi key bindings. So rogue, hack, nethack, moria... Newer games of the genera typically still allow the classic bindings, but not as easily supported.

Back in the early 90s, I learned the vi movement keys through hunt(6) from the BSD Games collection. Can't find a good link for the package, but here is the man page: https://www.unix.com/man-page/bsd/6/hunt/

That package has another excellent way of learning vi commands...

The 'quiz' program had the data set of 'ed' ( https://github.com/vattam/BSDGames/tree/master/quiz / https://github.com/vattam/BSDGames/blob/master/quiz/datfiles... )

    print whole file:1,$p|g/[^|$]/p
So it would print out "print whole file" and you could enter one of:

    1,$p  
    g/^/p
    g/$/p
Hunt is also in that repo.

Re: A CLI game to learn Vim

#28
I got comfortable on the basic Vim keys using shortcutFoo [0], plus actually diving in to using it full-time. Learning Vim takes full time usage as you need to switch over your muscle memory. I still find that GVim is brilliant for beginners as it is tolerant of using other style shortcuts so you don't burn yourself. Even though you might learn slower you're more likely to progress as it's less frustrating.

I don't know if there's much evidence of these game style methods actually working. I tried vim-adventures [1], but just found it annoying. As far as I can tell you just want to apply similar learning techniques as with touch typing, so just typing the letters to the screen.

As a side benefit of learning Vim, it's encouraged me to improve my touch typing because of the added benefit that you can type your Vim commands faster.

[0]: https://www.shortcutfoo.com/app/dojos/vim

[1]: https://vim-adventures.com/

Re: A CLI game to learn Vim

#29
post #28

I got comfortable on the basic Vim keys using shortcutFoo [0], plus actually diving in to using it full-time. Learning Vim takes full time usage as you need to switch over your muscle memory. I still find that GVim is brilliant for beginners as it is tolerant of using other style shortcuts so you don't burn yourself. Even though you might learn slower you're more likely to progress as it's less frustrating. I don't k…

I felt vim adventures helped me, but then again that's just anecdotal proving your point.

Re: A CLI game to learn Vim

#30
post #28

I got comfortable on the basic Vim keys using shortcutFoo [0], plus actually diving in to using it full-time. Learning Vim takes full time usage as you need to switch over your muscle memory. I still find that GVim is brilliant for beginners as it is tolerant of using other style shortcuts so you don't burn yourself. Even though you might learn slower you're more likely to progress as it's less frustrating. I don't k…

I felt vim adventures helped me, but then again that's just anecdotal proving your point.

That's good to hear. As long as it's useful for some people that's all that matters for the people that created it. It's not like there's much evidence about the best way to learn Vim so your anecdote is as good as mine. At least there's a lot of people that have generated different methods to suit different people.
Post reply on HN