当前位置:网站首页>1. Editing weapon VIM
1. Editing weapon VIM
2022-07-02 14:31:00 【Little BigUs】
VIM
vim There are edit mode and command mode , What you enter in edit mode is what , In command mode, specific functions can be achieved through specific keys .
Just entered vim It's command mode , Press... In command mode i( Insert... At the current cursor )、a( Insert... After the cursor )、o( Insert )
You can go into insert mode . Press... In insert mode ESC Exit insert mode and enter command mode .
In command mode :
:wpreservation:qsign out:wqSave and exit:q!Forced exit , Do not saveurevoke , This is very usefulCtrl + rCounter cancellation , This is also useful
The next thing is a little windy , It's about copying and pasting , It's also important. .
A lowercase letter v Enter single selection mode , That is, select one character by one , Capitalization V Enter the line Selected mode , That is, line by line selection , Select to copy , Press down y replicate , After copying Press p Paste .
You can also press yy Copy the current row , No need to check , Press nyy Copy the n That's ok .
yw Copy a word ,nyw Copy n Word .
shear :
Cut the selected part :d
Cut a line :dd
shear n That's ok :ndd
Cut a word 、 shear n Word …
Find a word : Slash / + The word to look for , The first qualified word in the file will be found and highlighted , Press enter , Position the cursor over the highlighted area . Press A lowercase letter n Will navigate to the next word , Capitalization N Go to the previous word .
If you want to replace all one word in the file with another word , The operation is as follows ::%s/ Replaced word / New words among %s Represents the meaning of the whole document , Indicates the replacement range . If you only want to replace some lines , For example, I want to replace n,m Words between , Then the % Switch to n,m Note that it must be lowercase s.
:800 Go straight to 800 That's ok
ctrl+d Page down
ctrl+u Page up
Capitalization G Go straight to the end of the file , Two lowercase g Navigate directly to the beginning of the file , Of course :1 The same effect .
21
13
边栏推荐
- Word frequency statistics & sorting
- Fabric. JS free draw circle
- Multi rotor aircraft control using PID and LQR controllers
- 每日学习3
- Fabric.js 缩放画布
- C crystal report printing
- [Hongke technology sharing] how to test DNS server: DNS performance and response time test
- Tip: SQL Server blocked the state 'openrowset/opendatasource' of component 'ad hoc distributed queries'
- 卷积神经网络(入门)
- <口算練習機 方案開發原理圖>口算練習機/口算寶/兒童數學寶/兒童計算器 LCD液晶顯示驅動IC-VK1621B,提供技術支持
猜你喜欢

Fabric. JS free draw circle

当贝投影4K激光投影X3 Pro获得一致好评:万元投影仪首选

Custom events, global event bus, message subscription and publishing, $nexttick

Stm32-dac Experiment & high frequency DAC output test

默认插槽,具名插槽,作用域插槽

TeamTalk源码分析之win-client

STM32-DAC实验&高频DAC输出测试

Penetrate the remote connection database through the Intranet

MQ教程 | Exchange(交换机)

提示:SQL Server 阻止了对组件‘Ad Hoc Distributed Queries ‘的STATEMENT ‘OpenRowset/OpenDatasource“”
随机推荐
Data Lake (11): Iceberg table data organization and query
< schéma de développement de la machine d'exercice oral > machine d'exercice oral / trésor d'exercice oral / trésor de mathématiques pour enfants / lecteur LCD de calculatrice pour enfants IC - vk1621
Uniapp automated test learning
MQ tutorial | exchange (switch)
NLA natural language analysis realizes zero threshold of data analysis
String matching problem
Method of creating linked server for cross server data access
Fabric. Keep the original level when JS element is selected
Pycharm连接远程服务器
go操作redis
Launcher startup process
Fabric. JS upper dash, middle dash (strikethrough), underline
Stm32-dac Experiment & high frequency DAC output test
4、数组指针和指针数组
Fabric.js 上划线、中划线(删除线)、下划线
自定义事件,全局事件总线,消息订阅与发布,$nextTick
你知道Oracle的数据文件大小有上限么?
没有从远程服务器‘‘映射到本地用户‘(null)/sa‘的远程用户‘sa‘及服务主密码解密错误的解决办法
线性dp求解 最长子序列 —— 小题三则
MQ教程 | Exchange(交换机)