Prevent automatic tab insertion or conversion of spaces to tabs
Asked Answered
H

5

21

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?

Hive answered 24/4, 2017 at 17:23 Comment(3)
As a workaround, I replaced every space with a non-breaking space. That is, I replaced Unicode U+0020 with Unicode U+00A0.Hive
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.Suckow
Also here: webapps.stackexchange.com/questions/106582/…Fig
F
16

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
Flathead answered 29/11, 2017 at 0:13 Comment(3)
If you're having trouble with typing a tab into the Find field, turn on regular expressions and use \tEkaterina
The drivenotepad plugin acts like a standard text editor (chrome browser only)Triplicate
Nope, that doesn't work either... the inserted spaces are then, happily recombined into tabs... goddamn google !!!Disaffection
W
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.

Wong answered 25/4, 2019 at 13:48 Comment(0)
P
3

Click-dragging text seems to work, may depend on the OS/application though.

Get your text into an application that supports dragging selected text, e.g. another webpage with a plain textarea. Then select and drag into Google Docs.

Preamble answered 26/1 at 17:20 Comment(1)
This works and it is quick and easyInevitable
T
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"

Triplicate answered 15/2, 2018 at 23:7 Comment(1)
Tried it and it seems to work. Only problem is I have to install it in every browser in every computer I use.Triplicate
T
1

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

Terena answered 25/9, 2020 at 11:28 Comment(2)
This seemed to work in some instances, but in other instances spaces are still converted. Unclear when it works and when it doesn't.Salomo
In 2023, even CTRL+SHIT+V does the (annoying) space-to-tabs conversion.Auberge

© 2022 - 2024 — McMap. All rights reserved.