I there a way to view the changes generated by search and replace in vim?
E.g. the following example deletes trailing whitespaces
:%s/\s\+$//g
but say, I am not sure of the regex and I am afraid it changed something that I did not want to be changed. But I also do not want to use gc instead of g, because confirming too many changes is confusing and takes a while, instead I would like to see the changes in a new buffer, as some sort of list. Is this possible?