I have a command-line tool that can print search results in a format that works with vimgrep. The example output looks like this:
foo/path/lib/usdviewq/appController.py:3795:22: index = prim.GetPrimIndex()
foo/bar/lib/testenv/testUsdSpecializes.py:104:28: refNode = prim.GetPrimIndex().rootNode.children[0]
foo/bar/lib/testenv/testUsdInherits.py:108:28: refNode = prim.GetPrimIndex().rootNode.children[0]
foo/bar/lib/testenv/testUsdPrims.py:720:14: def test_GetPrimIndex(self):
foo/bar/lib/testenv/testUsdPrims.py:722:43: s = Usd.Stage.CreateInMemory('GetPrimIndex.'+fmt)
foo/bar/lib/testenv/testUsdPrims.py:739:34: self.assertTrue(prim.GetPrimIndex().IsValid())
foo/bar/lib/testenv/testUsdPrims.py:740:34: self.assertTrue(prim.GetPrimIndex().DumpToString())
foo/bar/lib/testenv/testUsdPrims.py:745:35: self.assertFalse(prim.GetPrimIndex().IsValid())
foo/bar/lib/testenv/testUsdPrims.py:746:35: self.assertFalse(prim.GetPrimIndex().DumpToString())
foo/bar/lib/testenv/testUsdInstancing.py:101:18: s = prim.GetPrimIndex().DumpToString()
foo/bar/lib/testenv/testUsdEditTarget.py:40:26: primIndex = prim.GetPrimIndex()
foo/bar/lib/testenv/testUsdReferences.py:275:28: refNode = prim.GetPrimIndex().rootNode.children[0]
foo/bar/lib/testenv/testUsdTimeOffsets.py:288:27: refNode = foo.GetPrimIndex().rootNode.children[0]
foo/bar/lib/testenv/testUsdTimeOffsets.py:306:31: payloadNode = foo.GetPrimIndex().rootNode.children[1]
Is there any way to feed that as input into Vim as a quickfix window?
I tried doing
command_that_makes_these_lines | vim -
But that only adds that given text to a Vim buffer.
vim -c
will help you. – Alex Kroll Aug 31 '19 at 7:31vim -q [filename]
Unfortunately, stdin is not supported. – Matt Aug 31 '19 at 11:27