VIM: Search only between specific line numbers?

前端 未结 7 954
余生分开走
余生分开走 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

提交回复
热议问题