当前位置:网站首页>Vim practical skills_0.vim - introduction
Vim practical skills_0.vim - introduction
2022-08-09 17:23:00 【Cola Pine Nuts】
vim是一个强大的工具,是linuxmust-learn tools
文章目录
part1:what to learnvim?
There are specialized similarities for writing large programsVSCode的工具,为what to learnvim?
修改linuxVarious scripts and configuration files under,直接使用vim就可以操作,This operation is more efficient thanVScode高多了,且vim基本是linux系统自带的,Benefit a lot after learning
These words still do not arouse your interest in learning,Think about this scenario:When your program on the customer's production environment problems,You need to modify a few lines of source code to verify directly,You wouldn't also ask the client to install you a similarVScode的工具吧???
At this moment if you can'tvim,then you can directlygg了
提示:not necessarilyvimwhat a great learning,But the most basic modification、粘贴,Routine operations such as copying should work.
最低要求:在linux平台上,only let you usevim修改代码,It can work normally without affecting the efficiency
part2:为什么要写这个笔记?
既然《vim实用技巧》The book has been written in great detail,为什么要写这个笔记?
说明:平时使用vimAlso are some regular operations,I've always wanted to learnvim;最近有点时间,因此将《vim实用技巧》Time the study notes for finishing
基础:For basic learning, see《鸟哥的Linux私房菜-基础篇》的第九章_vimprogram editor andLinux vi/vim | 菜鸟教程 (runoob.com),The picture below is from the rookie tutorial,You should see this picture more often,Familiar with each operation
The main reasons for writing this note are given below:
- 1.Refine the skills from the book
Summarize in your own way,Convenient for quick review later
- 2.Force yourself to operate the content of each skill
vimYou can't learn by reading,Very practical focus,Force yourself to much for several times
- 3.save learningvim的时间(这个最重要)
想让vimdo something inVScodeIt's normal operation but I don't know what to do?比如:Take a look at the system catalog,Or execute a paragraph firstshell命令,你通常会怎么做?百度…;This way of learning is too inefficient,Sometimes it takes a long time to find a satisfactory result
Since there is such an extractvimbook of tricks,Why don't you system to learn,Take notes as long as a few days,但是会将vimThe time to study late cost greatly reduced,So it's a good deal…
part3:vimhelp information and easy setup
有vimlook at the basics《vim实用技巧》效率会更高,下面将vimOrganized some general settings in
- 1.查看帮助信息:对一个命令不熟悉,可以直接使用
:h 命令
进行查看 - 2.动态改变vim的设置(以 ‘ignorecase’ 选项为例,This is a boolean option)
# 设置生效
:set ignorecase
# 关闭功能(Add word before the name of the setting item“no”)
:set noignorecase
# Add an exclamation mark after a boolean option,you can reverse the setting
:set ignorecase!
# add a question mark at the end,then you can get the current status of the option:
:set ignorecase?
# 可以通过引入&号后缀,Reset any option to default
:set ignorecase&
# The parameters of some setting items use strings or numbers;如,’tabstop’ Specifies the number of columns occupied by tabs,设置如下
:set tabstop=2
# Vim The setting items usually take effect globally,But some options only take effect for one window or buffer
If we want to apply the same settings to all existing buffers,可设置如下
:bufdo setlocal tabstop=4
part4:《vim实用技巧》约定
《vim实用技巧》Many operation are used in the books阴影+解释
的模式(这种模式很好,Many of the notes in the back skills are the original pictures in the book,如果想详细了解,read books directly),Therefore, the simple operations are organized,So that you won't be blinded when you look at the skills behind
普通模式下,The basic explanation of the command is as follows
2.
<C-p>
Mark is equivalent to Ctrl-p,意为“同时按 及 p”3.占位符(Use curly braces to indicate that a command can be followed by a set of valid keys)
4.Show special keys
提示:The following techniques are sorted by default.vimOn the basis of the basic operation,And in the finishing, the valuable pictures in the book are directly pasted(Pictures are more persuasive than simple words)
参考
- 《Vim实用技巧》,书籍写的很好,强烈建议读一读
边栏推荐
猜你喜欢
Vim实用技巧_0.vim - introduction
[Deep Learning] SVM solves the linear inseparable situation (8)
Vim实用技巧_4.管理多个文件(打开 + 切分 + 保存 + netrw)
Detailed Explanation of Software Secure Memory Area
Visio画神经网络卷积层
将类指针强制转换为void*指针进行传参的使用方法
Vim实用技巧_8.替换(substitute)和global命令
[Paper reading] LIME: Low-light Image Enhancement via Illumination Map Estimation (the most complete notes)
【工具使用】Modbus Slave软件使用详解
堆(heap)系列_0x09:堆破坏示例(非法访问+未初始化+堆句柄不匹配)
随机推荐
交叉编译 OpenSSL
Postgraduate Work Weekly (Week 4)
深入浅出最优化(5) 共轭梯度下降法
TOPSIS优劣解距离法
PatchEmbed代码讲解记录
基于MTCNN和FaceNet的实时人脸检测识别系统
hugging face tutorial - Chinese translation - fine-tuning a pre-trained model
【力扣】114. 二叉树展开为链表
软件安全内存区域详解
Introduction to common commands in SQLMap
【学习笔记】win10报0xc0000221错误无法开机
Heap series _0x02: The past and present of the heap (WinDbg+Visual Studio compilation)
交叉编译 CURL
ASCII码表
模糊综合评价
主成分分析——MATLAB在数学建模中的应用(第2版)
【力扣】75. 颜色分类
[Deep learning] attention mechanism
图论最短路径求解
Vim实用技巧_2.普通模式和插入模式