当前位置:网站首页>vim edit mode
vim edit mode
2022-08-02 03:54:00 【strive to ping】
vim enters edit mode, vim command mode
vim enters edit mode
To enter the editing mode from the normal mode, just press one of the keys i, I, a, A, o, O, r and R. When entering the editing mode, INSERT (if Chinese is supported, insert is displayed).Press the Esc key to return from edit mode to normal mode.
The meaning of the key function
i Insert before the current character (memory: insert)
I Insert at the beginning of the line where the cursor is located
a Insert after the current character (memory: after insert)
A Insert
at the end of the line where the cursor is located o Insert a new line in the current next line
O Insert a new line in the current previous line(memory: switch)
S deletes the line where the cursor is located and starts inserting a similar overwrite replacement operation (memory: switch)
Vim bottom line mode functionIn normal mode, enter or / to enter command modeCommand Function Meaning:w save file (memory: write):q is used to exit Vin without modifying the contents of the file (memory: quit):w! Force save, even if the text is read-only, the save can be done under the root user:q! Force quit, so the changes will not take effect Use when modifying and not saving the contents of the file:wq save and exit (remember :write quit):set nu display line number:set nonu don't show line numbersCommon commands in three modes of vim
/*vim common commands in three modes*Command Meaning Remarksyy Copy the line where the cursor is located 3yy means copy 3 lines, nyy means copy n linesp starts pasting at the lower line of the line where the cursor is located (remember: lowercase at the bottom)P starts pasting on the upper line of the line where the cursor is located (memory: uppercase)gg The cursor jumps to the first character of the first line ngg means jump to the position n lines away from the first lineG cursor jumps to the first letter of the last line^ (shift+6) Jump to the first letter of the line where the cursor is located (memory: ^ means head)#(shift+3) Jump to the letter at the end of the line where the cursor is located (memory: $ means tail)*dd or D delete the line where the cursor is locatedd^ delete from the cursor position to the beginning of the line (excluding the cursor) (memory: d means delete, ^ means head, d^ means delete to the beginning)d$ delete from the cursor position to the end of the line (including the cursor) (memory: d means delete, ^ means the end, d^ means delete to the end)dgg delete all lines above the line where the cursor is located (memory: d means delete, gg means locate the first letter of the first line, that is, dgg means delete to the first line)dG deletes all lines below the line where the cursor is located (memory: d means delete, G means positioning to the first letter of the last line, that is, dG means deleting to the last line)x delete a character after the cursor nx means delete n characters after the cursor, similar to the delete key under windows (try it and find that the delete key under linux has the same function as x)X delete a character before the cursor nX means delete n characters after the cursor, similar to the backspace keyboard under windows (try to find that the backspace under linux means the cursor moves left)u undo the last operationctrl+←/→ keys quickly move the cursor left and right, that is, move quickly between each space and line)n+←/→ keys move n characters to the left or right边栏推荐
- [phpunit/php-timer] A timer for code execution time
- AES加密的各种蛋疼方式方式
- TCP communications program
- TypeScript 错误 error TS2469、error TS2731 解决办法
- 1.10今日学习
- About the apache .htaccess file of tp
- easyswoole uses redis to perform geoRadiusByMember Count invalid fix
- meime module
- 13.JS输出内容和语法
- uniapp | 使用npm update更新后编译报错问题
猜你喜欢
随机推荐
1.6一些今日学习
每日面试题 2022/7/28
面试总结 22/7/22 面试中的重点
1.uview form校验位置可以改变 2.时间区间
查询数据库中所有表的索引,并且解析成sql
js的“类数组”及“类数组转数组”
page load process
关于tp的apache 的.htaccess文件
IO流、 编码表、 字符流、 字符缓冲流
1.13 学习JS
[league/flysystem]一个优雅且支持度非常高的文件操作接口
[league/climate]一个功能健全的命令行功能操作库
Add a full image watermark to an image in PHP
Advanced Operations on Arrays
Query the indexes of all tables in the database and parse them into sql
Guangzhou Huawei Interview Summary
[league/climate] A robust command-line function manipulation library
Batch replace file fonts, Simplified -> Traditional
批量替换文件字体,简体->繁体
(8) requests、os、sys、re、_thread









