Implement the 'gdefault' flag

Implement the 'gdefault' flag for :substitute commands

closes #1236