当前位置:网站首页>VIM use
VIM use
2022-07-08 01:58:00 【xcrj】
Introduce
- Normal mode enters input mode :a perhaps i
- Input mode enters normal mode :esc
- Normal mode enters command mode ::
- Normal mode enters view mode :v
Common mode
Cursor movement
command | Introduce |
---|---|
hjkl | Lower left, upper right |
4j | Down 4 Row does not include the current row |
w(word) | The beginning of the next word |
b(begin) | Start with the previous word |
gg | Beginning of text |
G | At the end of the text |
$ | At the end of the line |
^ | Head of line |
0 | Head of line |
f(find) | lookup |
fr | Find the latest r |
ctrl+u | Page up |
ctrl+d | Page down |
Copy and paste -y-p
command | Introduce |
---|---|
y(yank) | PULL Copy |
yaw(yank all word) | Duplicate words |
y4j | Copy the current row + below 4 That's ok |
yfr | Replication includes r So far |
p(paste) | Sticking |
Delete -d
command | Introduce |
---|---|
d(delete) | Delete |
dj | Delete current row + The next line |
d8j | Delete current row + below 8 That's ok |
dfr | Delete until recently r The content of + Include r |
change -c
command | Introduce |
---|---|
c(change) | change |
caw(change all word) | Delete the current word and enter the input mode |
c4j | Delete current row + below 4 Line and then enter the input mode |
c4j | Delete current row + below 4 Line and then enter the input mode |
Multiple lines
- ctrl+v: Get into virtual block Pattern
- Move up and down to select multiple lines
- shift+i: Fill in the contents required for multiple lines
- esc: Key esc wait a moment , The content just entered will appear on multiple lines
revoke -u
command | Introduce |
---|---|
u(undo) | revoke |
The input mode
Normal mode enters input mode
command | Introduce |
---|---|
i(input) | Enter... Before the cursor |
a(append) | After the cursor, enter |
I (Input) | Enter at the beginning of the line |
A(Append) | Enter at the end of the line |
Command mode
esc Enter command mode
Normal mode enters input mode
command | Introduce |
---|---|
q(quite) | Exit without saving |
q! | Force exit without saving |
w(write) | preservation |
wq(write quite) | Save and exit |
1,2d | Delete the first 1 That's ok + The first 2 That's ok |
View mode
Normal mode key v Enter view mode
- Use in view mode hjkl, Parallel key y replicate
The configuration file
- vim The configuration file is called
.vimrc
- System configuration file location
/etc/.vimrc
- User profile location
~/.vimrc
( You need to create your own ) - Configure load priority : Load user profile first , Modifying the user profile is only valid under the user directory
- Save and exit after modifying the configuration file, and then enter , The configuration file takes effect automatically
Configure the instance
# Show rows
set nu
# tab Occupy 4 A space
set tabstop=4
# jk Press repeatedly instead esc
# i input map( The input mode )
imap jk <Esc>
# space Instead of :
# normal map Common mode
nmap <space> :
Plug in installation
边栏推荐
- Why did MySQL query not go to the index? This article will give you a comprehensive analysis
- How mysql/mariadb generates core files
- cv2-drawline
- 液压旋转接头的使用事项
- 咋吃都不胖的朋友,Nature告诉你原因:是基因突变了
- PHP calculates personal income tax
- #797div3 A---C
- Keras' deep learning practice -- gender classification based on inception V3
- Tapdata 的 2.0 版 ,开源的 Live Data Platform 现已发布
- 分布式定时任务之XXL-JOB
猜你喜欢
Give some suggestions to friends who are just getting started or preparing to change careers as network engineers
[SolidWorks] modify the drawing format
Tapdata 的 2.0 版 ,开源的 Live Data Platform 现已发布
I don't know. The real interest rate of Huabai installment is so high
分布式定时任务之XXL-JOB
Apache多个组件漏洞公开(CVE-2022-32533/CVE-2022-33980/CVE-2021-37839)
The foreach map in JS cannot jump out of the loop problem and whether foreach will modify the original array
Apache multiple component vulnerability disclosure (cve-2022-32533/cve-2022-33980/cve-2021-37839)
How to make the conductive slip ring signal better
C语言-模块化-Clion(静态库,动态库)使用
随机推荐
Apache multiple component vulnerability disclosure (cve-2022-32533/cve-2022-33980/cve-2021-37839)
node js 保持长连接
nacos-微服务网关Gateway组件 +Swagger2接口生成
MySQL查询为什么没走索引?这篇文章带你全面解析
Get familiar with XML parsing quickly
A comprehensive and detailed explanation of static routing configuration, a quick start guide to static routing
【SolidWorks】修改工程图格式
Matlab r2021b installing libsvm
Mouse event - event object
Is NPDP recognized in China? Look at it and you'll see!
Is it necessary for project managers to take NPDP? I'll tell you the answer
用户之声 | 对于GBase 8a数据库学习的感悟
Remote sensing contribution experience sharing
I don't know. The real interest rate of Huabai installment is so high
静态路由配置全面详解,静态路由快速入门指南
php 获取音频时长等信息
微软 AD 超基础入门
Node JS maintains a long connection
Partage d'expériences de contribution à distance
云原生应用开发之 gRPC 入门