I would like to add to my vimrc a custom command (:customFilter {pattern}
) for filtering text and placing result in a new tab.
I tried using :global
or :vimgrep /{pattern}/ %
but the problem is that I would like to redirect this result of global
or content of Quickfix list
(without name of file) to a new tab.
Please help.
Example
my file:
class TemperatureNode {
+ uint8_t getTemperatureValue()
+ void setTemperatureValue(uint8_t newVal)
+ uint8_t getHumidityValue()
+ void setHumidityValue(uint8_t newVal)
}
and then I call :customFilter void
and get:
+ void setTemperatureValue(uint8_t newVal)
+ void setHumidityValue(uint8_t newVal)
Having this with line numbers from the filtered file would be even better.