TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Learning vi -- the "cheatsheet" technique

27 点作者 vp超过 16 年前

4 条评论

bostondjango超过 16 年前
I was a fake vi user for a few years before I finally decided to sit down and learn it. What helped me get into the "feel" of vi was finally disabling my arrow-keys and forcing myself to use the hjkl keys for movement. It will suck for the first few weeks but eventually you'll notice a significant increase in productivity. Throw this into your .vimrc:<p>map &#60;Left&#62; &#60;nop&#62;<p>map! &#60;left&#62; &#60;nop&#62;<p>map &#60;right&#62; &#60;nop&#62;<p>map! &#60;right&#62; &#60;nop&#62;<p>map &#60;up&#62; &#60;nop&#62;<p>map! &#60;up&#62; &#60;nop&#62;<p>map &#60;down&#62; &#60;nop&#62;<p>map! &#60;down&#62; &#60;nop&#62;
评论 #460121 未加载
评论 #460117 未加载
babo超过 16 年前
"There are many versions of vi, and I'm going to be showing you how to use a version of vi called vim." Is there any other clone still under active development? Long years ago Vim won, hands down.
评论 #459957 未加载
评论 #459951 未加载
评论 #459973 未加载
评论 #460685 未加载
评论 #460719 未加载
mct超过 16 年前
Perhaps I'm biased because it's how I first learned vi ~15 years ago, but I still think the best way to learn vi(m) is by running <i>vimtutor</i>. It copies the tutorial text file to /tmp and launches vim against it. The text first teaches the user how to move the cursor around (in order to scroll down to the next lesson), then how to exit the editor, and finally different ways of modifying text. Many lessons are followed by interactive examples, which is a really neat way to learn (e.g., "Make the second line below look like the first line").<p>Text of the tutorial: <a href="http://ftp.vim.org/vim/runtime/tutor/tutor" rel="nofollow">http://ftp.vim.org/vim/runtime/tutor/tutor</a>
评论 #460889 未加载
RiderOfGiraffes超过 16 年前
I'm disappointed. I guess I'm not the intended audience, but I was hoping to learn about the windowing operations. The simple stuff in this "cheatsheet" is stuff anyone other than a complete beginner will use absolutely all the time. Windowing makes vi fantastic - I need to learn it.<p>Note to self: Learn the windowing operations in vi.<p>Ctrl-p and Ctrl-n are the truly awesome commands for programmers.
评论 #460107 未加载
评论 #460384 未加载