Vim Commands

Commands in NORMAL modes

Motions

small granular: move by direction

k
h l
j

mid granular: move by word

  • e move onto the end of the current word
  • b move onto the head of the current word
  • w move onto the head of the next word

    large granular: move by line

  • $ move onto the head char of the line
  • 0 move onto the tail char of the line

    huge granular: move by paragraph

  • { move onto the last blank line
  • ( move onto the begnning of this paragraph
  • } & ) move onto the next blank line

    extreme granular: move by file

  • [line number]G move to the specific line
  • gg move to the first line of the file
  • G move to the last line of the file

Operators

Operators make effects on the corpus when assigned to some range (defined by cursor movement or the object). Operator could be doubled to work on the current line
{Operator} + {Motions} OR {Object} = Operation

  • d delete
  • daw aw for a word(defined by space)
  • dap ap for a whole paragraph(defined by blank line)
  • y yank into register
  • c change
  • g~ swap case
  • gu make lowercase
  • gU Make uppercase
  • > shift right
  • < shift right
  • = auto indent
  • ! filter {Motion} lines through an external program

Undo Tasks

  • u undo one certain operation
    (one editing command in normal mode, all editing in insert mode last time)
  • Ctrl-r for redo one task

Special Command g

Begin Editing

into INSERT mode

  • i begin inserting at current position
  • a begin inserting at the next position
  • A begin inserting at the end of the line
  • o begin inserting at the beginning of the new line below
  • O begin inserting at the beginning of the new line above
  • s delete the current char & begin inserting
  • S delete the current line & begin inserting at the head of current line
  • C delete the rest of current line & begin editing

    local modification

  • r character replacement (quit insert mode after one char modification)
  • D delete the rest of the line
  • J combine this line and the next

Copy and Paste

  1. 删除的文本将储存在寄存器中
  2. p 将寄存器的内容放在光标下方的行

f{char} find the next occurence of {char}
; repeat the last search operation

Command in INSERT modes

Delete in insert mode

  • Ctrl-h Backspace
  • Ctrl-w delect back one word
  • Ctrl-u delect back to start of line

VIM Commands的更多相关文章

  1. 130+ essential vim commands

    Basics :e filename Open filename for edition :w Save file :q Exit Vim :q! Quit without saving :x Wri ...

  2. Rare But Powerful Vim Commands.

    @1: We all know about :wq, but we usually ignore :x. :x和:wq都是保存当前文件并退出. 这两个命令实际上并不完全等价,当文件被修改时两个命令时相 ...

  3. 跟我一起学习VIM

    跟我一起学习VIM - The Life Changing Editor   前两天同事让我在小组内部分享一下VIM,于是我花了一点时间写了个简短的教程.虽然准备有限,但分享过程中大家大多带着一种惊叹 ...

  4. 跟我一起学习VIM - The Life Changing Editor

    前两天同事让我在小组内部分享一下VIM,于是我花了一点时间写了个简短的教程.虽然准备有限,但分享过程中大家大多带着一种惊叹的表情,原来编辑器可以这样强大,这算是对我多年来使用VIM的最大鼓舞吧.所以分 ...

  5. Vim插件之Command-T使用问题

    最近在使用vim插件CommandT时出现问题其实就是vim没有支持ruby,不过google之后找到了解决方法,老外的态度还是很让人敬佩的,度娘搜索的结果太让人呕心了.. 贴下,以后再次遇到解决. ...

  6. 【转载】跟我一起学习VIM - vim插件

    目录 写在前面:Life Changing Editor 什么是VIM 为什么选VIM 为什么选其它 为什么犹豫选择它们 VIM >= SUM(现代编辑器) 如何学习VIM 一秒钟变记事本 VI ...

  7. (转载)跟我一起学习VIM - The Life Changing Editor

    原文: http://ju.outofmemory.cn/entry/79671 前两天同事让我在小组内部分享一下VIM,于是我花了一点时间写了个简短的教程.虽然准备有限,但分享过程中大家大多带着一种 ...

  8. (转) 共享个很棒的vim配置

    发现了一个很棒的vim配置方法,现在共享给大家. https://github.com/kepbod/ivim   ivim - The Vim Distribution of Xiao-Ou Zha ...

  9. 跟我一起学习VIM - vim插件合集

    2016-06-14 15:04 13333人阅读 评论(0) 收藏 举报 分类: Linux(104)  目录(?)[+]  前两天同事让我在小组内部分享一下VIM,于是我花了一点时间写了个简短的教 ...

随机推荐

  1. Oracle实例初始化参数详解

    BACKGROUND_DUMP_DEST 显示和设置Oracle数据库相关日志的存放地,Oracle11g后不再可配置,但其值仍可显示相关日志的存放地,对应配置参数为diagnostic_dest U ...

  2. Mysql学习---基础操作学习2

    基本数据类型 Mysql基本数据类型:二进制,数值[整数,小数].字符串[定长,变长]. 二进制数据.时间和枚举集合 bit[(M)] 二进制位(101001),m表示二进制位的长度(1-64),默认 ...

  3. July 11th 2017 Week 28th Tuesday

    No possession, but use, in the only riches. 真正的财富不是占有,而是使用. These days I have bought tens of books a ...

  4. 三、基于任务的异步模式(TAP),推荐使用

    一.引言 在上两个专题中我为大家介绍.NET 1.0中的APM和.NET 2.0中的EAP,在使用前面两种模式进行异步编程的时候,大家多多少少肯定会感觉到实现起来比较麻烦, 首先我个人觉得,当使用AP ...

  5. 百度地图隐藏LOGO显示

    在引入地图的页面加入下列样式即可隐藏百度地图左下角的LOGO   <style type="text/css">   .anchorBL{display:none;} ...

  6. UIView的多重属性

    1)几何属性: 2)位图属性:

  7. v-bind:的基本用法

    1. v-bind:class(根据需求进行选择) <style> .box{ background-color: #ff0; } .textColor{ color: #000; } . ...

  8. star组件

    一.star组件 <template> <div class="star" :class="starType"> <span v- ...

  9. event对象,ie8及其以下

    event 对象是 JavaScript 中一个非常重要的对象,用来表示当前事件.event 对象的属性和方法包含了当前事件的状态.当前事件,是指正在发生的事件:状态,是与事件有关的性质,如引发事件的 ...

  10. java之静态方法,静态变量

    在自动化测试中,经常会用到静态方法和静态变量.那么什么是静态方法和静态变量呢?以及在什么情况下使用呢?下面来说一说 静态方法和静态变量是使用公共内存空间的,就是说所有对象都可以直接引用,不需要创建对象 ...