Add replaceAtCaret functionality

Pass %% into the function, the selection will replace this.