Sublime Forum

Old plain text documents not properly formatted

#1

All of my old plain text documents are not properly formatted.
In all different editors (TextPad / WordPad / NotePad / whatever) my old files looks the same.

In sublime its totally messed up. Why is that?

Also when I correct the tabs and spaces from an old text to look correct in Sublime and save it,
the text is not formatted correctly in ALL editors.

That is preventing me to use Sublime.

Text formatting should be the same throughout all editors - hey it’s just plain text after all. Where is the error?

Thank You for reading
HAL

PS: Tried to upload images but: Sorry, the board attachment quota has been reached - ??? Slowly doubts are raising if I want to use Sublime…

0 Likes

#2

You’ll have to be a bit more specific about the nature of your problem. Saying “totally messed up” really doesn’t help too much.

Off the top of my head the only culprits I can come to for what you describe are issues to do with line endings (unix v windows) or a plugin thats screwing around with your files. Did you try a fresh, portable Sublime install?

On line endings, Sublime determines that likely using an algorithm that inspects the first few “lines”. If your plain text files have a mix of line endings that could possibly cause the behaviour you describe. Typically, for me and I think most, Sublime gets this right. Perhaps you can dump a non-sensitive plaintext file on a free filehost somewhere for one of us to load and try.

0 Likes

#3

looking like this pictures

TextPad / WordPad / NotePad / Editor / whatever looks like this:
http://www.directupload.net/file/d/3792/agxu28s6_jpg.htm

SubLime look like this:
http://www.directupload.net/file/d/3792/hblsjx5s_jpg.htm

And yes… this is with all my txt (plaintext) files. Why is that so?

0 Likes

#4

Looks like your tab width’s wrong

0 Likes

#5

The tab size in all my editors are 4.

The predefined tab size in Sublime is 4.

But it’s only working / correct looking with a tab space of 8.

How’s that?

Edit: Tested how many spaces he does with a predefined tab space of 8… it’s 4

strange bug ?

0 Likes

#6

Looking at the correct textpad version of the file, it looks as though the tab size here is 8, since the space between the number and the first column is eight characters. Perhaps TextPad has an option to autodetect tabsize. Sublime will do this too, but it’s autodetection routine is designed more for code than arbitrary plaintext files.

Regarding tabs, Sublime is only different to most other editors in one limitation, that being that tabstop positions cannot be set independently. So in Sublime if you set tab size to X, there will be a tabstop at every X position. Some editors allow you to set tabstops like electric typewriters, say, stop one at 10, stop 2 at 30, stop 3 at 50, then stops at every 5 after that so 55, 60, 65, 70 etc… When routinely dealing with tab delimited text that can be very useful and is lacking in Sublime unfortunately. In such cases I usually fall back to another editor (Crisp in my case), though of course I’d love to see this added.

Sublime can operate in “tab” or “spaces” mode (indicated bottom right in the status). The mode simply determines what the tab key and autoindent will do; in spaces mode it will simply insert as many space characters as are needed to get to the required tabstop. Regardless of mode, Sublime won’t convert tab chars to spaces and vice-versa automatically on load or save, but you can do this manually (View…Indentation…Convert to tabs/spaces).

0 Likes