How can I make my match non greedy in vim? September 13, 2022 by Tarik Instead of .* use .\{-}. %s/style=".\{-}"//g Also, see :help non-greedy