Vim Tutorial Study(3)
来源:互联网 发布:数据新闻网 崔岸雍 编辑:程序博客网 时间:2024/06/11 19:53
Chapter 3 Searching
Simple Searches
I remember i used to use a stupid ':' before '/' , now I know that only '/' is enough!
find a string: /string<ENTER>
*[]^%//?~$ have special meaning, so if you want to use them in a search you must put a backslash / in front of them
find a . : //.
to find the next matching, you can use either /<Enter> or n 3/ and 3n are also correct
Make full use of search history
input a /, then use <Up> key, u will find search history
Searching options
Highlighting
:set hlsearch
:set nohlsearch
只是把当前搜到的结果去除Highlighting的方法是 :nohlsearch
Incremental searches
:set incsearch
:set noincsearch
Searching Backward
use ? instead of /
? and n to find next matching backward 3? and 3n are also correct
Changing Direction
reverse the direction: N (注意一个小点,就在第一次会转向,然后就和n一样了;就是说第一次使用N的时候会转向)
always backward: ?
always forward: /
always the same direction: n
Basic Regular Expressions: extremely powerful and compact way to specify a search pattern
start of line: ^
end of line: $
a single charater: .
x: any literal charater x
/charater: turns off the special meaning of many charaters
Example:
/^the
/the$
/^the$: means only 'the' appears in the line, spaces cannot appear either in front of 'the' or after 'the'
/^$: search for empty line
生单词一枚coincidence [koˈɪnsɪdəns]n. 1. (令人吃惊的)巧合,巧事2. (意见等的)相同, 符合, 一致3. 同时存在;并存
Example: It is no coincidence that this is also the command to move to the beginning of the line.
我觉得这句话的意思就是说:并不是巧合。。。意味着是必然
- Vim Tutorial Study(3)
- Vim Tutorial Study(1)
- Vim Tutorial Study(2)
- Vim Tutorial Study(4)
- Vim Tutorial Study(5)
- Vim Tutorial Study(6)
- Vim Tutorial Study(7)
- Vim Tutorial Study(8)
- Vim Tutorial Study(9)
- Vim Tutorial Study(10)
- Vim Tutorial Study(11)
- vim study
- vim tutorial
- VIM Tutorial
- vim tutorial
- XUL Tutorial Study Notes - Introduction
- VIM interactive tutorial
- Vim Introduction and Tutorial
- 字体浮动样式代码
- 一个windows下基于select多路分离器的Reactor模型
- Windows Oracle 10G手工创建数据库
- Oracle 绑定变量
- 手机离线地图服务
- Vim Tutorial Study(3)
- Oracle Flashback 技术 总结
- HeartSurface & matplotlib
- 喜欢
- 使用javascript实现用户名验证
- 情怀
- 心情
- platform_device和platform_driver
- Java中String类型的参数传递问题的解析