I'm trying to use Dictation on OS X 10.10.5 to enter text into MacVim (or into Terminal). It works for the most part but, for whatever reason, those programs won't let Dictation add a space after each phrase. If I say the phrase "type a sentence" and then pause and say "for me", Dictation will enter "type a sentenceFor me", instead of "type a sentence for me". Any way to fix this?
MacOS – How to fix missing spaces when using Dictation with MacVim or Terminal
macosmacvimterminalvoice-dictation
Related Question
- MacOS – Help me reset the terminal after sudo command mistake
- MacOS – How to find dictation commands in French
- MacOS – How to switch dictation language in Yosemite using a voice command
- MacOS – All applications got paused after disk space usage got near 99% and back to normal. What’s next
- MacOS – Using dictation feature to paste text into Terminal
- How to automate Voice Control to manipulate the currently selected text
Best Answer
TL; DR
This issue appears to be MacVim-specific. Try using Vim 7.4.889 or later instead.
Analysis and Work-Arounds
I have experienced this same issue on both Yosemite and El Capitan with MacVim-snapshot-77. For example, in MacVim:
However, I only experience this problem in MacVim and the versions of gvim and mvim that the MacVim package provides. Vim 7.4.889 (as installed via Homebrew) and Terminal.app with various versions of Bash seem to work fine for me on OS X 10.11 (El Capitan).
In case your settings are different, I have enabled:
This appears to be something hard-wired in MacVim. Even if you define a custom dictation command for MacVim such as "literal space" and assign it the space character, MacVim with Enhanced Dictation always seems to treat pauses as the start of a new sentence. I would recommend filing a bug against MacVim.
While it won't fix the underlying problem with MacVim, you can work around the issue by doing your dictation in a Terminal-based Vim session using a different build. Since the problem appears to be MacVim rather than Vim, this seems like the most pragmatic short-term solution until MacVim is fixed.