Hi there! You are currently browsing as a guest. Why not create an account? Then you get less ads, can thank creators, post feedback, keep a list of your favourites, and more!
Lab Assistant
Original Poster
#1 Old 15th Aug 2017 at 12:31 AM
Default Notepad++ PSA - Spacing and Indentations
For a while, I was noticing that bits of my XML files show up weirdly spaced in S4PE. I use Notepad++ to edit. I just assumed it was some quirk of S4PE because everything looks spaced fine on the Notepad++ end.

But after running into some issues with Python and spacing interpretation throwing errors, I did a search and found this:

https://stackoverflow.com/questions...ation-messes-up

If you're working in Notepad++, I suggest doing both of these suggested things from that stackoverflow discussion:
Quote:
There is no universal tab size, so I always make sure to replace tabs by spaces (so you know what you see is what you get everywhere else as well)

Go to Settings -> "Preferences..." -> Language Menu/Tab Settings and check 'Replace by space'

Quote:
I would suggest going to View > Show Symbol > Show Whitespace and Tab to get an better idea of how your indentations look.


The first one will avoid future spacing issues. And the second will allow you to easily spot existing spacing issues. Just go in and get all the now-visible arrows replaced with dots.

I'm going to have a lot of spacing to fix.

Don't be like me and end up with tens or hundreds of files to tweak. Not that the spacing thing causes actual errors in XML (that's what made it so easy to ignore). But it may cause difficulties if you're trying to read the file from S4PE, or someone else is trying to read or edit your file in another text editor. And it can cause issues in Python.

♫ Improvising into a corner ♫
♫ No rhyme or rhythm in this verse cause I'm in a corner ♫
Back to top