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

前端之家收集整理的这篇文章主要介绍了vim增量搜索在文件末尾停止前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
在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
原文链接:https://www.f2er.com/bash/388188.html

猜你在找的Bash相关文章