最常用的vim命令/按键是什么? [英] What are the most-used vim commands/keypresses?

查看:92
本文介绍了最常用的vim命令/按键是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是一个Ruby程序,试图从Textmate切换到MacVim,但在浏览庞大的VIM列表以及它们的所有按键时遇到麻烦.我厌倦了听到您可以使用'I'来插入文本,或'a'来在字符后添加文本,或使用'A'来在行的末尾添加文本,或者……"我无法想象每个人都使用全部20种不同的按键来导航文本,使用大约10种按键来开始添加文本,并使用18种方式直观地选择内部块.还是你!?

I'm a Ruby programming trying to switch from Textmate to MacVim, and I'm having trouble wading through the gargantuan lists of things you can do in VIM and all of the keypresses for them. I'm tired of hearing "You can use 'I' for inserting text, or 'a' for appending text after the character, or 'A' for appending text at the end of the line, or…" I can't imagine everyone uses all 20 different keypresses to navigate text, 10 or so keys to start adding text, and 18 ways to visually select an inner block. Or do you!?

我理想的备忘单是每个人每天用于编写代码的30-40个最常用的按键或命令,以及红宝石学家每天使用的绝对必要的插件以及10个最常用的命令.从理论上讲,一旦我有了并开始像在Textmate中一样熟练使用VIM,然后,我就可以开始学习成千上万的其他VIM命令,这将使我更多

My ideal cheat sheet would be the 30-40 most-used keypresses or commands that everyone uses for writing code on a daily basis, along with the absolute essential plugins that rubyists use daily and the 10 most-used commands for them. In theory, once I have that and start becoming as proficient in VIM as I am in Textmate, then I can start learning the thousands of other VIM commands that will make me more efficient.

或者,我是否完全以错误的方式学习了VIM?

Or, am I learning VIM the wrong way altogether?

推荐答案

这是我曾经写过的小技巧,其中包含我经常使用的命令:

Here's a tip sheet I wrote up once, with the commands I actually use regularly:

  • vim documentation online
  • advanced vim tips
  • more useful tips and graphical cheat sheet
  • 几乎所有命令都可以在数字后加上重复计数.例如. 5dd 删除5行
  • <Esc> 使您退出任何模式并返回命令模式
  • :开头的命令在屏幕底部的命令行上执行
  • :帮助有关任何命令的帮助
  • Nearly all commands can be preceded by a number for a repeat count. eg. 5dd delete 5 lines
  • <Esc> gets you out of any mode and back to command mode
  • Commands preceded by : are executed on the command line at the bottom of the screen
  • :help help with any command
查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆