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

推荐订阅源

GbyAI
GbyAI
J
Java Code Geeks
雷峰网
雷峰网
WordPress大学
WordPress大学
宝玉的分享
宝玉的分享
云风的 BLOG
云风的 BLOG
V
Visual Studio Blog
V
Vulnerabilities – Threatpost
S
Securelist
The Hacker News
The Hacker News
The Register - Security
The Register - Security
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Help Net Security
Help Net Security
G
Google Developers Blog
Hugging Face - Blog
Hugging Face - Blog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
M
MIT News - Artificial intelligence
AI
AI
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
The GitHub Blog
The GitHub Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Schneier on Security
Schneier on Security
N
Netflix TechBlog - Medium
T
The Blog of Author Tim Ferriss
Google DeepMind News
Google DeepMind News
Hacker News - Newest:
Hacker News - Newest: "LLM"
H
Hacker News: Front Page
博客园 - 司徒正美
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
B
Blog
Microsoft Azure Blog
Microsoft Azure Blog
大猫的无限游戏
大猫的无限游戏
Security Latest
Security Latest
Engineering at Meta
Engineering at Meta
N
News and Events Feed by Topic
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
酷 壳 – CoolShell
酷 壳 – CoolShell
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
T
Threat Research - Cisco Blogs
U
Unit 42
V
V2EX
V2EX - 技术
V2EX - 技术
L
LINUX DO - 最新话题
aimingoo的专栏
aimingoo的专栏
Microsoft Security Blog
Microsoft Security Blog
Recorded Future
Recorded Future
P
Privacy & Cybersecurity Law Blog
美团技术团队
小众软件
小众软件
F
Fortinet All Blogs

博客园 - 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
/第[一二三四]  搜索"第一"到"第四"