Find and replace Replace all self.assertEqual statements with assert :%s/self.assertEqual(\(.*\), \(.*\))/assert \1 == \2/gc