加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

vim增量搜索在文件末尾停止

发布时间:2020-12-15 19:30:31 所属栏目:安全 来源:网络整理
导读:在Vim中,当我通过输入/ x I进行“x”的增量搜索,然后按n跳转到下一个事件。如果我刚刚匹配文件中的最后一次,当我按n时,光标将开始在文件的开头寻找一个匹配 – 它会循环回到开头。我不想让它循环回到开始。我想要n在最终发生之后根本找不到任何更多的比
在Vim中,当我通过输入/ x I进行“x”的增量搜索,然后按n跳转到下一个事件。如果我刚刚匹配文件中的最后一次,当我按n时,光标将开始在文件的开头寻找一个匹配 – 它会循环回到开头。我不想让它循环回到开始。我想要n在最终发生之后根本找不到任何更多的比赛。我想要这个行为的原因是,我可以很容易地看到,当我搜索整个文件。

有谁知道如何影响这个行为?

FYI:我使用以下.vimrc选项:

colorscheme zenburn   " zenburn colorscheme

set nocompatible      " prevent Vim from emulating Vi's bugs
set scrolloff=5       " keeps cursor away from top/bottom of screen
set nobackup          " don't make automatic backups

set incsearch         " incremental searching
set ignorecase        " case insensitive matching
set smartcase         " smart case matching
set showmatch         " show matching bracket

set autoindent        " indentation
set smartindent       " indentation
set cindent           " indenting for C code
set tabstop=4         " 4-space tabs
set shiftwidth=4      " 4-space tabs

syntax on             " syntax highlighting
filetype on           " behavior based on file type
filetype plugin on    " behavior based on file type
filetype indent on    " behavior based on file type

set visualbell        " replace beeping with flashing screen

set gfn=Lucida_Sans_Typewriter:h10:cANSI
关闭’wrapscan’选项。
set nowrapscan

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读