官术网_书友最值得收藏!

Jumping into insert mode

You've already learned to enter insert mode using i, which puts you in insert mode at the position of the cursor.

There are a few more convenient shortcuts for entering insert mode:

  • a places you in insert mode after the cursor

  • A places you in insert mode at the end of the line (equivalent of $a)

  • I places you in insert mode at the beginning of the line, but after indentation (equivalent of _i)

  • o adds a new line below the cursor before entering insert mode
  • O adds a new line above the cursor before entering insert mode
  • gi places you in insert mode where you last exited it

You've also learned how to enter insert mode after deleting some code with the change command (c). Here are more ways to chain change commands:

  • C deletes text to the right of the cursor (until the end of the line) before entering insert mode
  • cc or S deletes the contents of the line before entering insert mode, while preserving indentation
  • s deletes a single character (prefix by a number to delete multiple) before placing you in insert mode
主站蜘蛛池模板: 鸡泽县| 策勒县| 洪雅县| 古丈县| 西和县| 镇坪县| 英山县| 北宁市| 渭南市| 砀山县| 扎鲁特旗| 顺平县| 瓮安县| 双城市| 南华县| 镶黄旗| 留坝县| 哈尔滨市| 祁门县| 漯河市| 怀仁县| 皮山县| 阿拉善盟| 中牟县| 大英县| 卓尼县| 长春市| 诏安县| 普宁市| 伊宁市| 额尔古纳市| 汝阳县| 胶州市| 南阳市| 新建县| 永平县| 琼结县| 巴里| 长乐市| 赣榆县| 阿城市|