当前位置:网站首页>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]所创,转载请带上原文链接,感谢
边栏推荐
- leetcode之反转字符串中的元音字母
- centos7下安装iperf时出现 make: *** No targets specified and no makefile found. Stop.的解决方案
- 简单介绍c#通过代码开启或关闭防火墙示例
- Factory pattern pattern pattern (simple factory, factory method, abstract factory pattern)
- APP 莫名崩溃,开始以为是 Header 中 name 大小写的锅,最后发现原来是容器的错!
- 常见特征金字塔网络FPN及变体
- Windows环境下如何进行线程Dump分析
- This program cannot be started because msvcp120.dll is missing from your computer. Try to install the program to fix the problem
- Teacher Liang's small class
- 20201108编程练习——练习3
猜你喜欢
FC 游戏机的工作原理是怎样的?
For the first time open CSDN, this article is for the past self and what is happening to you
2. Introduction to computer hardware
写时复制集合 —— CopyOnWriteArrayList
VIM 入门手册, (VS Code)
几行代码轻松实现跨系统传递 traceId,再也不用担心对不上日志了!
非阻塞的无界线程安全队列 —— ConcurrentLinkedQueue
C++邻接矩阵
OSChina 周一乱弹 —— 程序媛的青春
Five design patterns frequently used in development
随机推荐
23张图,带你入门推荐系统
3.你知道计算机是如何启动的吗?
为什么我们不使用GraphQL? - Wundergraph
OpenGL ES 框架详细解析(八) —— OpenGL ES 设计指南
How does semaphore, a thread synchronization tool that uses an up counter, look like?
Several common playing methods of sub database and sub table and how to solve the problem of cross database query
GDI 及OPENGL的区别
Why choose f for the back end of dark website? - darklang
How to analyze Android anr problems
卧槽,这年轻人不讲武德,应届生凭“小抄”干掉5年老鸟,成功拿到字节20Koffer
Core knowledge of C + + 11-17 template (2) -- class template
AQS 都看完了,Condition 原理可不能少!
梁老师小课堂|谈谈模板方法模式
一堆代码忘了缩进?快捷方式教你无忧无虑!
Fiddler can't grab requests from browsers like Google_ Solution
B. protocal has 7000eth assets in one week!
结合阿里云 FC 谈谈我对 FaaS 的理解
Detailed analysis of OpenGL es framework (8) -- OpenGL es Design Guide
上线1周,B.Protocal已有7000ETH资产!
C++之异常捕获和处理