All those mysterious extra tabs

Talk about anything and everything related or unrelated to the FreeOrion project, especially Strategy Games.

Moderator: Oberlus

Post Reply
Message
Author
User avatar
MatGB
Creative Contributor
Posts: 3310
Joined: Fri Jun 28, 2013 11:45 pm

All those mysterious extra tabs

#1 Post by MatGB »

So, I'm working on a patch, and it involves digging out code I wrote ages ago but never completed, copying it into a current techs.txt which regularly involves copying lines of code, adding extra lines, etc.

And I noticed, whenever I hit return at the end of an indented line, Notepad++ handily indents the next line to keep the code coherent. What I'd never noticed until now was it does it using tabs, not the 4 spaces preferred for FO.

All those many many times Geoff has asked me to redo a patch and remove the tabs, and I've been confused where they came from, it was N++ being helpful. And now I've noticed it, there's a handy setting in options to check a box to keep it being helpful but to replace tabs with 4 spaces.

This is good. Hopefully, Geoff won't need to get me to delete lots of extraneous tabs from now on. I'll undoubtedly start getting something else wrong, but, y'know, progress.
Mat Bowles

Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

User avatar
Vezzra
Release Manager, Design
Posts: 6095
Joined: Wed Nov 16, 2011 12:56 pm
Location: Sol III

Re: All those mysterious extra tabs

#2 Post by Vezzra »

MatGB wrote:I'll undoubtedly start getting something else wrong, but, y'know, progress.
Well, three steps forward and two steps back is still one step forward ;)

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13587
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: All those mysterious extra tabs

#3 Post by Geoff the Medio »

Komodo Edit has something similar...
Attachments
tabs or spaces?
tabs or spaces?
komodo_edit_tabs_spaces.png (50.66 KiB) Viewed 8932 times

User avatar
MatGB
Creative Contributor
Posts: 3310
Joined: Fri Jun 28, 2013 11:45 pm

Re: All those mysterious extra tabs

#4 Post by MatGB »

I keep meaning to give Komodo a go at some point but I've got N++ setup the way I like it ATM and I'm used to it, but yeah, one of those simple-when-you-know answers.
Mat Bowles

Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

User avatar
Dilvish
AI Lead and Programmer Emeritus
Posts: 4768
Joined: Sat Sep 22, 2012 6:25 pm

Re: All those mysterious extra tabs

#5 Post by Dilvish »

Also, qsswin kindly shared a FOCS User-Defined-Language file for Notepad++, which should facilitate writing well-formed/well-formatted content scripts. It probably could use an update by now, though.

Our Effects page should probably say something about editor requirements & suggestions, and a link from there to qsswin's thread would probably also be helpful.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

User avatar
MatGB
Creative Contributor
Posts: 3310
Joined: Fri Jun 28, 2013 11:45 pm

Re: All those mysterious extra tabs

#6 Post by MatGB »

Oh, that might be useful, assuming I can get it to work.

Wiki. That reminds me, wanted to update the quickstart play guide for 0.4.4 when we were close to ready for release (it's currently for 0.4.0, horribly outdated). Who do I talk to to go edit that, Geoff?
Mat Bowles

Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13587
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: All those mysterious extra tabs

#7 Post by Geoff the Medio »

MatGB wrote:Who do I talk to to go edit that, Geoff?
You should have recently received an email about a wiki account.

User avatar
MatGB
Creative Contributor
Posts: 3310
Joined: Fri Jun 28, 2013 11:45 pm

Re: All those mysterious extra tabs

#8 Post by MatGB »

Yup, thanks, I'll try to remember to play through a pure default game with RC1 and write up a basic strategy guide for it, based on the existing one.
Mat Bowles

Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

Post Reply