by dhoe · 10y ago · 0 comments
Navigating large files with motions like 50%, 70% should however be instantaneous. Navigating by line number is again somewhat slower, because the file actually needs to be read in this case.
Aside from that :v/ has a different meaning in vis.
:[range]v[global]/{pattern}/[cmd] Same as :g!.
Where:
:[range]g[lobal]!/{pattern}/[cmd] Execute the Ex command [cmd] (default ":p") on the lines within [range] where {pattern} does NOT match.
So :v/error/d will delete all lines that don't contain the string "error".
sed -i "/#include <vcl\/button\.hxx>/d" $(git grep -l "vcl\/button\.hxx" *.hxx | grep -v precompiled)
Knowing about a :v might have been helpful...