当前位置:网站首页>2 normal mode
2 normal mode
2020-11-09 07:30:00 【osc_71qxolcv】
List of articles
- Vim The natural relaxation state of
- The whole book talks about how to use common patterns
- This chapter only deals with some core concepts
- General skills
- Other editors spend most of the time Vim Insertion mode
-
Many normal mode commands are executed with a specified number of times
-
skill 10
- A pair of commands for adding and subtracting values
- And you'll see how these two commands are combined with the number of times , Do simple arithmetic operations
-
Specifying the number of times to execute can reduce the number of keys
-
You'll see some examples ,
- Simply repeat a command ,
- It's better than taking the time to figure out how many times you want to execute
- The power of normal mode commands ,
- Largely because it can combine operators with action commands .
- At the end of this chapter , We're going to see the effect of this combination .
skill 7 Please move the brush when you pause
- Painters don't put their brushes on the canvas when they're resting .
- Yes Vim It's the same thing about it , The normal pattern is Vim The natural relaxation of
- Painters spend only a small part of their time painting
- Programmers also spend only a fraction of their time writing code
- Most of the time I think about 、 read , And shuttling through the code
- When you really want to modify , Who said you had to switch to insert mode ?
- We can reformat the existing code , Copy them , Move its position , Or delete them
- In normal mode , There are many tools to use
skill 8 Cut the undo unit into blocks
- u Undo the latest changes
- A modification can be any operation that changes the text within the document ,
- Included in the normal mode 、 Commands triggered in visual mode and command line mode
- And a modification also includes input in insert mode ( Or delete ) The text of ,
- i{insert some text} It's a modification
- In a schema insensitive text editor , Enter some words and use the undo command ,
- There are two possibilities .
- Undo the last character entered ;
- The other is better , It may break characters into blocks , Make each undo delete a word instead of a character .
- Vim You can control the granularity of undo commands
- Start with insertion mode ,
- To return to normal mode ,
- Anything entered or deleted during this period is treated as a modification
- As long as it's under control <Esc> Use
- You can make the undo command work on the word 、 A sentence or paragraph .
- How often should you leave insert mode ?
- I like
- Every “ Revocable block ” Corresponding to a thinking process
- In writing this passage ( Of course is in Vim Write in ),
- I often end with a pause ,
- What do you want to write next
- No matter how short the pause is ,
- It's a natural break point ,
- It's time for me to quit plug-in mode .
- When you're ready to continue writing , Press A Just go back to where you were and continue
- If I think I'm going in the wrong direction , I switch to normal mode , Then press u
- Every time you do undo , The words follow the way I first wrote , Cut into well-organized pieces , That means I can easily try to write a sentence or two , If it doesn't feel right , You can discard it by pressing a key or two .
- When in insert mode ,
- If the cursor is at the end of the line , The fastest way to start another line is to press .
- Sometimes I prefer to press o ,
- Because I have a hunch , Maybe I want to have a finer granularity in undo
- It doesn't sound very understandable , When you are right Vim More and more familiar with , It's easier to switch modes .
- If you pause long enough to ask “ Should I quit insert mode ?” This problem ,
So quit .
Moving the cursor in insert mode resets the modification state
- The undo command reverses the input from entering insert mode to exiting this mode ( Or delete ) When all the characters of ,
- I've missed a little detail .
- If you use 、 、
or These cursor keys , A new undo block will be generated . - You can think of it as switching back to normal mode first ,
- And then use h 、 j 、 k or l Command to move the cursor ,
- The only difference is that we're not out of insert mode .
- That would be right . The operation of the command has an impact .
版权声明
本文为[osc_71qxolcv]所创,转载请带上原文链接,感谢
边栏推荐
- Copy on write collection -- copyonwritearraylist
- A few lines of code can easily transfer traceid across systems, so you don't have to worry about losing the log!
- 卧槽,这年轻人不讲武德,应届生凭“小抄”干掉5年老鸟,成功拿到字节20Koffer
- 服务器性能监控神器nmon使用介绍
- Travel notes of csp-s 2020
- 老大问我:“建表为啥还设置个自增 id ?用流水号当主键不正好么?”
- 自然语言处理(NLP)路线图 - kdnuggets
- 通过canvas获取视频第一帧封面图
- On buffer overflow
- Tips in Android Development: requires permission android.permission write_ Settings solution
猜你喜欢
Fiddler can't grab requests from browsers like Google_ Solution
A few lines of code can easily transfer traceid across systems, so you don't have to worry about losing the log!
android开发中提示:requires permission android.permission write_settings解决方法
使用递增计数器的线程同步工具 —— 信号量,它的原理是什么样子的?
The vowels in the inverted string of leetcode
3.你知道计算机是如何启动的吗?
2 普通模式
上线1周,B.Protocal已有7000ETH资产!
App crashed inexplicably. At first, it thought it was the case of the name in the header. Finally, it was found that it was the fault of the container!
OpenGL ES 框架详细解析(八) —— OpenGL ES 设计指南
随机推荐
《MFC dialog中加入OpenGL窗体》
基于链表的有界阻塞队列 —— LinkedBlockingQueue
服务网格仍然很难 - cncf
基于LabVIEW实现的几种滚动字幕
LeetCode-15:三数之和
对象
分库分表的几种常见玩法及如何解决跨库查询等问题
理论与实践相结合彻底理解CORS
自然语言处理(NLP)路线图 - kdnuggets
STC转STM32第一次开发
作业2020.11.7-8
1. What does the operating system do?
Factory Pattern模式(简单工厂、工厂方法、抽象工厂模式)
Adding OpenGL form to MFC dialog
20201108 programming exercise exercise 3
小议缓冲区溢出
老大问我:“建表为啥还设置个自增 id ?用流水号当主键不正好么?”
你有没有想过为什么交易和退款要拆开不同的表
Web上的分享(Share)API
leetcode之反转字符串中的元音字母