TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Snake Vim Trainer

109 pointsby zachgershalmost 12 years ago

19 comments

theon144almost 12 years ago
When I was learning vikeys, I just disabled arrowkeys in my .vimrc :)<p><pre><code> inoremap &lt;Up&gt; &lt;NOP&gt; inoremap &lt;Down&gt; &lt;NOP&gt; inoremap &lt;Left&gt; &lt;NOP&gt; inoremap &lt;Right&gt; &lt;NOP&gt; noremap &lt;Up&gt; &lt;NOP&gt; noremap &lt;Down&gt; &lt;NOP&gt; noremap &lt;Left&gt; &lt;NOP&gt; noremap &lt;Right&gt; &lt;NOP&gt; </code></pre> I know it sounds masochistic, but it really isn&#x27;t; I actually had to check after a while whether I really set it, because I didn&#x27;t remember any issues with navigation. Try it!
hademalmost 12 years ago
I was about to say that the keyboard controls didn&#x27;t work for me until I remembered that I had Vimium installed with Chrome.
评论 #6224819 未加载
评论 #6225188 未加载
cyphaxalmost 12 years ago
I certainly like VIM, it&#x27;s my default editor on non-Windows operating systems, but I really don&#x27;t care one bit about the h,j,k,l keymapping; I can use my arrow keys, which I find to be lots easier. So I TOTALLY suck at this game because it doesn&#x27;t support the arrow keys like VIM does! :P
评论 #6224412 未加载
评论 #6224185 未加载
评论 #6224149 未加载
评论 #6224539 未加载
carlmroalmost 12 years ago
The game is fun, but perhaps a bit misleading regarding what &#x27;mastering vim movement&#x27; amounts to. As I am sure many of you know, vim has tons of constructs for efficient navigation: Using b or w for word-wise jumping, special markers like $ and 0, Ctrl-D and Ctrl-U etc. A good overview of movement commands can be found here: <a href="http://vim.wikia.com/wiki/Moving_around" rel="nofollow">http:&#x2F;&#x2F;vim.wikia.com&#x2F;wiki&#x2F;Moving_around</a>
评论 #6225992 未加载
aithalmost 12 years ago
I made this site at Dev Bootcamp Chicago. It&#x27;s super simple, but if it brings someone any amount of entertainment, it&#x27;ll make my day.<p>The snake part is a HTML5 canvas, and the back end is Ruby&#x2F;Sinatra.<p>Enjoy!
boushleyalmost 12 years ago
This is awesome! You should add ctrl+[ as an alias for escape as vim does. I&#x27;ve used that for a while now, and actually reaching up for escape feels unnatural now.
评论 #6224241 未加载
评论 #6226019 未加载
评论 #6224217 未加载
评论 #6224373 未加载
评论 #6224255 未加载
评论 #6224898 未加载
ilikepialmost 12 years ago
I find I&#x27;m having a mental conflict between Vim&#x27;s hjkl controls and WASD-style gaming controls, despite having very little experience using the latter with my right hand. This is made worse since it happens to be &#x27;i&#x27; that my right-hand middle finger hits when I think &quot;go up&quot;.<p>Very neat though, regardless!
评论 #6225214 未加载
评论 #6228788 未加载
评论 #6225552 未加载
评论 #6226956 未加载
评论 #6225289 未加载
ottocodealmost 12 years ago
This is awesome. I thought I was pretty good at vim, but the added pressure of needing to switch modes and directions at the same time without thinking about the keys was a great learning experience! (and fun game too!)
pitalmost 12 years ago
In light of the recent comments about mods editing article titles, I gotta say that when I saw this earlier today I didn&#x27;t think it sounded interesting. After the rename, I clicked on it, and man, it&#x27;s awesome.
guard-of-terraalmost 12 years ago
vim and BSDs default configurations insisting on inexistance of arrow keys is a &quot;tradition&quot; not completely unlike clitoridectomy. Come on guys (and gals), we&#x27;ve been over this already.
评论 #6225496 未加载
评论 #6225559 未加载
评论 #6225750 未加载
评论 #6225509 未加载
评论 #6225606 未加载
评论 #6226688 未加载
评论 #6225507 未加载
w0ts0nalmost 12 years ago
On Firefox, It just goes right through the &quot;food&quot;
评论 #6224164 未加载
评论 #6224154 未加载
clubhialmost 12 years ago
A good way for me to learn movement is to think of direction as:<p>walking up stairs: kl kl kl kl kl kl kl walking down stairs: jh jh jh jh jh jh jh jh jh
barbsalmost 12 years ago
I played Nethack on a MacBook Pro (with no number-pad) to get used to the vim movement keys.
andrew_wc_brownalmost 12 years ago
I use vim everyday and I don&#x27;t find this game easy to play.
dllthomasalmost 12 years ago
robots, and later nethack, served this purpose for me as a child... likely less effectively.
yefimalmost 12 years ago
topscore never seems to update.<p>Try `$.post(&#x27;&#x2F;newtop&#x27;, {score: 16000})`
bndwalmost 12 years ago
leaderboard doesn&#x27;t appear to update (at least in real time).
snake_plisskenalmost 12 years ago
you just had to go with something different than WASD didntcha?
TallboyOnealmost 12 years ago
That game is impossible