19

Google Docs has a "feature" that sometimes converts four spaces to one tab.

Copying and pasting text does not solve this problem, because the spaces in that text are converted to tabs automatically.

Is there a way to turn this off?

jkdev
  • 11,360
  • 15
  • 54
  • 77
  • 2
    As a workaround, I replaced every space with a non-breaking space. That is, I replaced Unicode U+0020 with Unicode U+00A0. – jkdev Apr 26 '17 at 02:29
  • 1
    Another workaround is to upload the content as a new document rather than pasting into an existing one; no conversion is applied to uploads. You can then paste from the new Google Doc into an existing one without the conversion happening. – Nathan Long Sep 26 '18 at 11:55
  • Also here: https://webapps.stackexchange.com/questions/106582/how-do-i-prevent-google-docs-from-changing-some-spaces-to-tabs-when-pasting-fr – Tim Abell May 31 '23 at 11:06

4 Answers4

14

No way to turn of that I know of. So annoying.

You can work-around using normal copy-paste, then a search-and-replace.

  1. Copy-Paste you content into the Google Doc
  2. In a text-editor, enter a tab character then cut it to your clipboard
  3. Back in Google Docs, highlight the content you wish to fix
  4. Hit Ctrl + H to open Find and replace dialogue
  5. Paste the tab character into the Find field
  6. Insert 4 space characters into the Replace with field
  7. Click Replace all
zero-day
  • 362
  • 2
  • 13
7

The approach that caused me the least headaches was to replace all spaces by another character (say underscore) in the original text, copy/paste it, then replace the underscore using find+replace. This was in Google slides.

micans
  • 1,106
  • 7
  • 16
2

i use cmd+shift+v (edit -> paste without formatting) to paste.
The spaces are not converted to tabs.

Philip Clarke
  • 727
  • 6
  • 13
  • This seemed to work in some instances, but in other instances spaces are still converted. Unclear when it works and when it doesn't. – Mark Gates Jan 28 '21 at 17:59
1

I did find one solution: there is a Chrome plugin called "Drive Notepad" which edits google drive files and has an option "Tabs: hard"

Dustin Soodak
  • 553
  • 5
  • 15