- Mastering Vim
- Ruslan Osipov
- 196字
- 2021-06-10 18:51:31
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
推薦閱讀
- 手機安全和可信應用開發指南:TrustZone與OP-TEE技術詳解
- 微信公眾平臺與小程序開發:從零搭建整套系統
- LabVIEW 2018 虛擬儀器程序設計
- ASP.NET動態網頁設計教程(第三版)
- Learning Apache Mahout Classification
- 深入淺出PostgreSQL
- Building RESTful Python Web Services
- Spring Boot+MVC實戰指南
- GameMaker Essentials
- MySQL程序員面試筆試寶典
- Building Serverless Architectures
- 軟件體系結構
- Android系統下Java編程詳解
- Python大規模機器學習
- Visual C++開發寶典