当前位置:网站首页>VIM editor use
VIM editor use
2022-07-29 05:29:00 【Ryan fitter】
vim Editor use
If we want to edit text or modify files in terminal mode, we can use VI/VIM Editor ,Ubuntu
Bring it with you VI Editor , however VI Editors are used to Windows It's inconvenient for people who develop under , For example, unexpectedly
You cannot use the up, down, left and right keys on the keyboard to adjust the cursor position . So I recommend that you use VIM Editor ,VIM Editor
yes VI Editor upgrade version ,VI/VIM Editors are instruction based editors , You don't need a mouse , There is no food
single , Just use the keyboard to do all the editing .
We need to install it first VIM Editor , The order is as follows :
sudo apt-get install vim
After installation, you can use VIM The editor ,VIM The editor has 3 Working mode : The input mode 、 Instructions
Mode and bottom line mode , Different functions can be completed by switching different modes , Let's take editing a text document as an example
Explain VIM Use of editor . Open the terminal , Enter the command :
vi test.txt
We try to enter numbers in the figure , I found it impossible to input , This is not because your keyboard is broken . because VIM
The default is the document opened in read-only mode , So we need to switch to input mode , The command to switch to input mode is as follows :
i In front of the current cursor character , Switch to input mode .
I Convert to input mode at the beginning of the line where the current cursor is located .
a After the character of the current cursor , Switch to input mode .
A At the end of the line where the cursor is located , Switch to input mode .
o Below the line of the current cursor , Create a new line , And switch to input mode .
O Above the line of the current cursor , Create a new line , And switch to input mode .
s Delete cursor character .
r Replace character at cursor .
Remember to exit more times when you need to esc key Exit edit mode , Try it first shift Key point out : Press again w Key sum q Key to exit, as shown in the figure below 
边栏推荐
猜你喜欢

510000 prize pool invites you to fight! The second Alibaba cloud ECS cloudbuild developer competition is coming

关于局部变量

GPIO的输入输出详解

Complete ecological map of R & D Efficiency & selection of Devops tools

刷题狂魔—LeetCode之剑指offer58 - II. 左旋转字符串 详解

365天挑战LeetCode1000题——Day 042 数组序号转换 + 相对名次 离散化处理

365天挑战LeetCode1000题——Day 041 二分查找完结纪念 + 第 N 个神奇数字 + 在线选举

365 day challenge leetcode 1000 questions - day 041 two point search completion anniversary + nth magic number + online election

【C语言系列】— 把同学弄糊涂的 “常量” 与 “变量”

365 day challenge leetcode1000 question - distance between bus stops on day 038 + time-based key value storage + array closest to the target value after transforming the array and + maximum value at t
随机推荐
Helm chart for Kubernetes
研发效能生态完整图谱&DevOps工具选型必看
一维数组练习
【活动预告】云上数字工厂与中小企业数字化转型创新论坛
Preemptive appointment | Alibaba cloud shadowless cloud application online conference appointment opens
数千个数据库、遍布全国的物理机,京东物流全量上云实录 | 卓越技术团队访谈录
Come on! See how Clickhouse, which has risen 16 places a year, can be implemented in jd.com
【C语言系列】—深度解剖数据在内存中的存储(二)-浮点型
指针
C language one-dimensional array
ANSI C类型限定符
千人规模互联网公司研发效能成功之路
Live broadcast preview | how to improve enterprise immunity through "intelligent edge security"?
51万奖池邀你参战!第二届阿里云ECS CloudBuild开发者大赛来袭
递归的基本原理
End of document
为啥谷歌的内部工具不适合你?
C语言数组入门到精通(数组精讲)
【C语言系列】— 一道递归小题目
微信小程序视频上传组件直接上传至阿里云OSS