当前位置:网站首页>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]所创,转载请带上原文链接,感谢
边栏推荐
- 图节点分类与消息传递 - 知乎
- Huawei HCIA notes
- Execution of SQL statement
- 深度优先搜索和广度优先搜索
- When iperf is installed under centos7, the solution of make: * no targets specified and no makefile found. Stop
- Have you ever thought about why the transaction and refund have to be split into different tables
- AQS 都看完了,Condition 原理可不能少!
- STS安装
- Introduction to nmon
- 六家公司CTO讲述曾经历的“宕机噩梦”
猜你喜欢
Programmers should know the URI, a comprehensive understanding of the article
深度优先搜索和广度优先搜索
使用递增计数器的线程同步工具 —— 信号量,它的原理是什么样子的?
Copy on write collection -- copyonwritearraylist
写时复制集合 —— CopyOnWriteArrayList
Chapter 5 programming
平台商业化能力的另一种表现形式SAAS
华为HCIA笔记
How to do thread dump analysis in Windows Environment
20201108编程练习——练习3
随机推荐
架构中台图
Introduction to nmon
非阻塞的无界线程安全队列 —— ConcurrentLinkedQueue
Several common playing methods of sub database and sub table and how to solve the problem of cross database query
LeetCode-11:盛水最多的容器
20201108编程练习——练习3
卧槽,这年轻人不讲武德,应届生凭“小抄”干掉5年老鸟,成功拿到字节20Koffer
Talk about my understanding of FAAS with Alibaba cloud FC
object
Bifrost 之 文件队列(一)
Investigation of solutions to rabbitmq cleft brain problem
B. protocal has 7000eth assets in one week!
Copy on write collection -- copyonwritearraylist
Share API on the web
LeetCode-15:三数之和
How to get started with rabbitmq
SaaS: another manifestation of platform commercialization capability
Travel notes of csp-s 2020
C + + adjacency matrix
Programmers should know the URI, a comprehensive understanding of the article