I accidentally blew away my .hgrc and it took me some time to recover my 3-way merge inspired by Dan McGee’s article on the subject. So for my and your future reference here’s what you need in your .hgrc to get hg merge to give you a three merge window in vim:[ui] merge = vimdiff [merge-tools] vimdiff.executable = vim vimdiff.args = -f -d -c "wincmd J" "$output" "$local" "$base" "$other"
To delete all lines matching a certain regular expression pattern, use
To do the opposite, i.e. only keep those lines matching the pattern, use
And to only temporarily print matching lines, use