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

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
主站蜘蛛池模板: 无锡市| 政和县| 凤阳县| 德格县| 收藏| 桃园市| 靖边县| 安阳县| 镇赉县| 台中市| 阿图什市| 马公市| 阜康市| 霞浦县| 隆子县| 禹城市| 且末县| 韶山市| 临西县| 宜城市| 饶平县| 仙游县| 会泽县| 邵东县| 申扎县| 侯马市| 色达县| 邢台市| 治县。| 广平县| 双辽市| 临沭县| 尼木县| 威信县| 博客| 格尔木市| 榆树市| 遂昌县| 宿迁市| 平顺县| 克什克腾旗|