replaceRecentlyTypedWord to replaceTextAtCaret