Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在 Vim 中对行范围运行 Ex 命令时,范围总是扩展到覆盖相邻的折叠(在 中记录:help fold-behavior)。例如,给定以下文件:
:help fold-behavior
int foo() { foobar(); }
该:2s/o//n命令(即在第二行计算 o)将打印:
:2s/o//n
2 matches on 1 line
但是,如果我折叠整个文件,我会得到:
4 matches on 2 lines
有没有办法覆盖/解决这种行为?我想在精确指定的行范围内运行我的命令;我不在乎褶皱。