73

I've noticed that in Sublime Text 3, that if I type a word and then double-space quickly after I'm done entering the word in, it automatically places a period after the word

Something like

obj + two spacebar keystrokes

will result in

obj.

I've looked through the preferences and I see all the auto_complete keys, but even with auto completed disabled, Sublime persists in added that period. How can I disable this behavior in Sublime?

ariestav
  • 2,799
  • 4
  • 28
  • 56
  • 2
    I'm not aware of any default functionality in Sublime that does anything like this. It sounds more like either something a plugin is doing, or something e.g. a tablet computer is doing. I'd try temporarily reverting to the default state of Sublime to see if it happens there or not. – OdatNurd Mar 02 '17 at 22:36
  • 1
    @OdatNurd The culprit was a package I had installed via the Package Manager. Specifically it was Markdown Preview. I'll add an issue on [its github repo](https://github.com/revolunet/sublimetext-markdown-preview). Thanks for suggesting to look into plugins! – ariestav Mar 03 '17 at 03:36
  • @OdatNurd I wrote too soon. The issue appears to have returned. I should mention that I'm seeing the behavior on macOS sierra. – ariestav Mar 05 '17 at 03:05
  • 1
    https://apple.stackexchange.com/questions/251531/macos-two-spaces-to-input-period-full-stop – pkamb Aug 27 '20 at 08:26

3 Answers3

179

It's a macOS feature that was added with Sierra

It can be disabled globally via System Preferences -> Keyboard -> Text and unchecking Add period with double-space as per the article instructions.

Quite a handy feature for most things but was driving me to distraction trying to edit .md files!

robin
  • 2,096
  • 1
  • 11
  • 12
  • 2
    Note that this is in the *Mac* keyboard setting itself, nothing to do with sublime. It took me a few minutes of trying what's in this answer before realizing this, so hopefully I can save someone else some time :) – Hugh Perkins Oct 10 '20 at 18:34
  • MacOS Ventura? Go to `System Settings -> Keyboard -> Text Input -> Edit...` and uncheck the option: "Add full stop with double-space" – HJW Feb 25 '23 at 13:14
4

In addition, you can also disable this with the Terminal by executing:

defaults write NSGlobalDomain NSAutomaticPeriodSubstitutionEnabled -int 0

If you want to enable it, pass 1.

Niklas
  • 23,674
  • 33
  • 131
  • 170
1

FYI: this option may also be called "Add full stop with double-space"

Still at: System Preferences > Text

publicapps
  • 160
  • 1
  • 5