vim — How to read range of lines from a file into current buffer

前端 未结 7 1950
梦毁少年i
梦毁少年i 2021-01-30 03:49

I want to read line n1->n2 from file foo.c into the current buffer.

I tried: 147,227r /path/to/foo/foo.c

But I get: \"E16: Invalid range\", though I

7条回答
  •  余生分开走
    2021-01-30 04:37

    A range permits a command to be applied to a group of lines in the current buffer.

    So, the range of read instruction means where to insert the content in the current file, but not the range of file that you want to read.

提交回复
热议问题