当前位置:网站首页>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
- 理论与实践相结合彻底理解CORS
- On buffer overflow
- A solution to the problem that color picker (palette) cannot use shortcut keys in sublime Text3 plug-in
- Leetcode-11: container with the most water
- Travel notes of csp-s 2020
- Finally, the python project is released as exe executable program process
- Android emulator error: x86 emulation currently requires hardware acceleration的解决方案
- Core knowledge of C + + 11-17 template (2) -- class template
- Concurrent linked queue: a non blocking unbounded thread safe queue
猜你喜欢

Five design patterns frequently used in development

你有没有想过为什么交易和退款要拆开不同的表

Do you know how the computer starts?

图节点分类与消息传递 - 知乎

OSChina 周一乱弹 —— 程序媛的青春

Leetcode-11: container with the most water

Leetcode-15: sum of three numbers

Investigation of solutions to rabbitmq cleft brain problem

A brief introduction of C code to open or close the firewall example

Esockettimeout solution in request in nodejs
随机推荐
VIM 入门手册, (VS Code)
On buffer overflow
VIM Introduction Manual, (vs Code)
理论与实践相结合彻底理解CORS
服务器性能监控神器nmon使用介绍
How does pipedrive support quality publishing with 50 + deployments per day?
Copy on write collection -- copyonwritearraylist
Have you ever thought about why the transaction and refund have to be split into different tables
老大问我:“建表为啥还设置个自增 id ?用流水号当主键不正好么?”
作业2020.11.7-8
基于链表的有界阻塞队列 —— LinkedBlockingQueue
20201108 programming exercise exercise 3
教你如何 分析 Android ANR 问题
C / C + + Programming Notes: pointer! Understand pointer from memory, let you understand pointer completely
C++邻接矩阵
leetcode之反转字符串中的元音字母
Chapter 5 programming
写时复制集合 —— CopyOnWriteArrayList
链表
2. Introduction to computer hardware