Closed merwok closed 7 years ago
Would :windo HighlightCoverage
suffice?
I’m not exactly sure what a window is for vim; I know about tabs, splits and buffers.
I tried :bufdo HighlightCoverage
yesterday with two files opened in splits but that’s not good since it uses :bufnext
which loads the next buffer in the current split, so that messes up all your layout.
A "window" is the official vim term for a split. :windo would highlight all the currently visible files for you.
I'm not sure why :bufdo opened new splits -- did you have unsaved changes and 'hidden' disabled?
Anyway, the idea of adding signs to all the files mentioned in a coverage report is starting to grow on me.
I’m not saying that bufdo opened new splits, but that it changed the file loaded in my current split. Ideally I’m looking for a way to run a command in each open window in-place, so that I can continue working.
I’m not saying that bufdo opened new splits, but that it changed the file loaded in my current split.
Ah, yes, it does that. Unfortunately.
Ideally I’m looking for a way to run a command in each open window in-place, so that I can continue working.
:windo
is exactly what you're looking for then.
Anyway, the idea of adding signs to all the files mentioned in a coverage report is starting to grow on me.
I've implemented a :HighlightCoverageForAll
that does this.
(Note that due to a Vim limitation it only highlights files that are already loaded into buffers.)
That seems perfect! I can decide to open two files or twenty, then ask to see their coverage.
I often find myself with a couple related files open, let’s say utils, views and test_views. When I run coverage by itself, I can see the lines missing in all three files.
Would you add a command like ShowHighlightAll to all buffers?