当前位置:网站首页>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
边栏推荐
- Codeforces Round #633 (Div. 2) B. Sorted Adjacent Differences
- 云原生应用开发之 gRPC 入门
- Redission源码解析
- [error] error loading H5 weight attributeerror: 'STR' object has no attribute 'decode‘
- Codeforces Round #643 (Div. 2)——B. Young Explorers
- Remote Sensing投稿经验分享
- Kwai applet guaranteed payment PHP source code packaging
- Sum of submatrix
- Sword finger offer II 041 Average value of sliding window
- 能力贡献 GBASE三大解决方案入选“金融信创生态实验室-金融信创解决方案(第一批)”
猜你喜欢
Introduction à l'outil nmap et aux commandes communes
A comprehensive and detailed explanation of static routing configuration, a quick start guide to static routing
进程和线程的退出
How to make enterprise recruitment QR code?
Why did MySQL query not go to the index? This article will give you a comprehensive analysis
Voice of users | winter goes and spring comes, waiting for flowers to bloom -- on gbase 8A learning comprehension
ClickHouse原理解析与应用实践》读书笔记(8)
#797div3 A---C
给刚入门或者准备转行网络工程师的朋友一些建议
《ClickHouse原理解析与应用实践》读书笔记(7)
随机推荐
Introduction to ADB tools
微软 AD 超基础入门
How to fix the slip ring
Nacos microservice gateway component +swagger2 interface generation
The function of carbon brush slip ring in generator
城市土地利用分布数据/城市功能区划分布数据/城市poi感兴趣点/植被类型分布
Redux使用
【错误】加载h5权重出错AttributeError: ‘str‘ object has no attribute ‘decode‘
WPF 自定义 写实风 雷达图控件
Redisson分布式锁解锁异常
Get familiar with XML parsing quickly
Redux usage
Introduction to Microsoft ad super Foundation
很多小伙伴不太了解ORM框架的底层原理,这不,冰河带你10分钟手撸一个极简版ORM框架(赶快收藏吧)
能力贡献 GBASE三大解决方案入选“金融信创生态实验室-金融信创解决方案(第一批)”
Uniapp one click Copy function effect demo (finishing)
ANSI / NEMA- MW- 1000-2020 磁铁线标准。. 最新原版
用户之声 | 对于GBase 8a数据库学习的感悟
Neural network and deep learning-5-perceptron-pytorch
How to make the conductive slip ring signal better