violentmonkey-oex icon indicating copy to clipboard operation
violentmonkey-oex copied to clipboard

Integrated script editor inserts spaces instead of tabulations

Open jesus2099 opened this issue 9 years ago • 2 comments

It is not priority issue at all (as I work around by copy/paste back and forth from my EmEditor, now).

I think the integrated editor used to respect my code style by inserting tabulations (as the rest of my script) when pressing ENTER to append a new empty row.

Now it has been inserting new rows with heading spaces instead of tabulations, creating some inconsistencies that I have to remember to fix before committing my changes to my user scripts git repository.

I don’t know if it used to guess what to insert (spaces or tabulations) or if it used to always insert tabulations. Or if I was dreaming. Maybe it always has inserted spaces and I work arounded that all the time, I don’t know.

jesus2099 avatar May 29 '16 14:05 jesus2099

It used to always insert tabulations. AFAIK, most JavaScript scripts use exact two spaces to indent (e.g. MDN), so I changed the default behavior in the last release.

gera2ld avatar May 30 '16 01:05 gera2ld

So maybe we could have a setting for that. Because tab users like me will never use spaces (typewriter era hack) and space users will not want to use tabs either (hard habits). ;)

BTW your link is not showing that most scripts use spaces. ;) It is a project coding styling but we can ironically find all the reasons to use tabs in the comments to a post that commands to use spaces.

jesus2099 avatar May 30 '16 05:05 jesus2099