VIM: Search only between specific line numbers?

前端 未结 7 948
余生分开走
余生分开走 2020-12-13 09:06

I know that with Vim\'s substitution command you can specific a range of lines:

:12,24s/search/replace

I want to be able to specify a range

相关标签:
7条回答
  • 2020-12-13 09:37

    If you would like to search to the end of the file, use $:

    :3,$s/pattern//gn
    

    This will search from 3-d line to the end

    0 讨论(0)
提交回复
热议问题