- 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
推薦閱讀
- GAE編程指南
- 算法訓練營:入門篇(全彩版)
- 從程序員到架構師:大數據量、緩存、高并發、微服務、多團隊協同等核心場景實戰
- Visual Basic程序設計教程
- Mastering Kali Linux for Web Penetration Testing
- Web全棧工程師的自我修養
- MySQL數據庫管理與開發(慕課版)
- 軟件架構:Python語言實現
- JavaScript+jQuery網頁特效設計任務驅動教程
- Julia High Performance(Second Edition)
- Web開發的平民英雄:PHP+MySQL
- 嵌入式C編程實戰
- 計算機程序的構造和解釋(JavaScript版)
- PHP 7 Programming Blueprints
- CISSP in 21 Days(Second Edition)