惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

S
SegmentFault 最新的问题
Spread Privacy
Spread Privacy
Google DeepMind News
Google DeepMind News
WordPress大学
WordPress大学
Blog — PlanetScale
Blog — PlanetScale
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Apple Machine Learning Research
Apple Machine Learning Research
SecWiki News
SecWiki News
腾讯CDC
P
Privacy International News Feed
Webroot Blog
Webroot Blog
J
Java Code Geeks
爱范儿
爱范儿
A
About on SuperTechFans
S
Secure Thoughts
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
D
DataBreaches.Net
Cloudbric
Cloudbric
Security Archives - TechRepublic
Security Archives - TechRepublic
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
C
Cyber Attacks, Cyber Crime and Cyber Security
P
Proofpoint News Feed
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Security Latest
Security Latest
Forbes - Security
Forbes - Security
小众软件
小众软件
www.infosecurity-magazine.com
www.infosecurity-magazine.com
C
Cybersecurity and Infrastructure Security Agency CISA
T
Threatpost
量子位
MongoDB | Blog
MongoDB | Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
月光博客
月光博客
W
WeLiveSecurity
P
Privacy & Cybersecurity Law Blog
Vercel News
Vercel News
Google Online Security Blog
Google Online Security Blog
云风的 BLOG
云风的 BLOG
GbyAI
GbyAI
S
Security @ Cisco Blogs
T
The Exploit Database - CXSecurity.com
Help Net Security
Help Net Security
V
Visual Studio Blog
C
CXSECURITY Database RSS Feed - CXSecurity.com
Application and Cybersecurity Blog
Application and Cybersecurity Blog
博客园 - 聂微东
P
Proofpoint News Feed
C
CERT Recently Published Vulnerability Notes
Attack and Defense Labs
Attack and Defense Labs

博客园 - BigOrang

linux top快捷键 druid 获取数据库连接失败,一直wait.DruidDataSource.takeLast -Xmx3G -Xms2G 在已经指定了最小内存2G后,启动的时候,就会直接分配2G给jvm吗 ?还是动态从1m到2G逐步分配的 java8类加载器示例&类加载1.8和1.8+的区别 windows查看端口占用 vmware Docker 设置代理 腾讯云域名托管到 cloudflare nginx 代理eureka后css/js/fonts无法访问 docker 基础镜像损坏 一起来找bug茬-01 mysql SHOW PROFILE 将所有容器docker都重启, 但是不重启mysql 正则 .*? 和 .* 的区别是什么 nginx打印所有配置内容 NoClassDefFoundError: org/slf4j/impl/StaticLoggerBinder kubesphere org.tmatesoft.svn.core.SVNException: svn: E160013: '/leifengyang/yygh-parent.git' path not found: 404 Not Found (https://gitee.com) 布隆过滤器原理及应用场景 linux中,使用alias, 应该在/etc/bashrc 中写,还是~/.bashrc中写,哪个更好 java date 时间最大连续天数
在vim中搜索关键字
BigOrang · 2026-03-08 · via 博客园 - BigOrang

练习用的文本文件,里面包含各种可以搜索的内容:

📝 创建练习文件

在终端中运行以下命令来创建文件:

cat > vim_search_practice.txt << 'EOF'
Vim 搜索练习文件
=================

这是一个用来练习 Vim 搜索功能的文本文件。
包含各种可以搜索的单词和模式。

第一部分:简单单词搜索
------------------------
apple
banana
cherry
apple pie
banana split
cherry blossom

apple 再次出现
banana 又一次
cherry 也在这里

第二部分:大小写混合
------------------------
Apple
BANANA
Cherry
APPLE
Banana
CHERRY

第三部分:编程相关
------------------------
function hello() {
    console.log("Hello, World!");
    return hello;
}

const hello = "Hello";
const world = "World";

hello_world
helloWorld
HelloWorld

第四部分:数字和特殊字符
------------------------
2023
2024
2025
v1.0
v2.0
v3.0
user@example.com
https://vim.org
/path/to/file
#comment
//comment
<!--comment-->

第五部分:长句子和重复词
------------------------
The quick brown fox jumps over the lazy dog.
The quick brown fox jumps over the lazy dog again.
The quick brown fox jumps over the lazy dog one more time.

vim 是一个很好的编辑器,vim 很强大,vim 很灵活。
学习 vim 需要练习,练习 vim 需要耐心。

第六部分:中文内容
------------------------
你好,世界!
这是一个中文搜索练习。
Vim 支持中文搜索。
中文搜索也很方便。
你好,再次出现。
世界,你好!

第七部分:URL和路径
------------------------
http://vim.org
https://www.google.com
ftp://example.com
/home/user/documents
C:\Users\username\Desktop
/var/log/syslog
~/vimrc

第八部分:代码片段
------------------------
if (condition) {
    doSomething();
    if (nested) {
        doMore();
    }
}

for (i = 0; i < 10; i++) {
    console.log(i);
    if (i === 5) {
        break;
    }
}

while (true) {
    process();
    if (done) {
        break;
    }
}

EOF

🎯 练习建议

创建好文件后,用 Vim 打开它:

vim vim_search_practice.txt

练习任务清单:

  1. 基础搜索练习

    /apple    搜索 "apple"
    按 n 继续向下找
    按 N 往回找
    
  2. 大小写敏感练习

    /Apple    搜索大写的 Apple
    /APPLE    搜索全大写的 APPLE
    :set ignorecase  设置忽略大小写后再试试
    
  3. 单词边界搜索

    /\<hello\>   只搜索完整的 "hello" 单词
    /hello       会匹配 hello, hello_world 等
    
  4. 特殊字符搜索

    /\.        搜索点号(需要转义)
    /\@        搜索 @ 符号
    /\/        搜索 / 符号
    
  5. 快速单词搜索

    把光标放在某个单词上
    按 * 向下搜索
    按 # 向上搜索
    
  6. 组合练习

    :set hlsearch     开启高亮
    /function         搜索所有 function
    n n n             跳转查看
    :nohl             临时取消高亮
    

💡 搜索技巧测试

试试这些搜索模式:

/^第        搜索以"第"开头的行
/\.$        搜索以点号结尾的行
/\d\{4\}    搜索4位数字(如年份)
/vim\|hello 搜索 vim 或 hello
/第[一二三四]  搜索"第一"到"第四"