When I want to do a new project I'm going through the project wizard & creating a new project.So all the files in a single folder.
My problem is when I need to copy this asm file to a website or write to a CD the alignments (tab sizes) are messed up.So again from the beginning I have to re-indent line by line.
Any method to copy this asm file to another location without messing up the tab sizes?
Here's a little perl script I wrote way back to strip tabs and replace with spaces. I've turned it into a EXE file so you don't need perl installed to run it, but you do need to run it from a DOS window
**broken link removed**
Run it from a command line prompt - the number (16 in the example) is the tab setting in the original file, you need to set this to suit - I can't remember if MPLAB defaults to 14 or 16 for the tab setting.
You need to open a DOS command window - Start - Run - CMD
Then CD into the directory and run from there, I usually just dump a copy of the asm file into the root of C then run it from there since it saves typing a long path, but works from anywhere.
C:\Documents and Settings\pete\Desktop\pete>detab.exe 16 3chlrnrem.asm test.txt C:\Documents and Settings\pete\Desktop\pete>dir Volume in drive C has no label. Volume Serial Number is B806-9273 Directory of C:\Documents and Settings\pete\Desktop\pete 22/02/2010 09:15 <DIR> . 22/02/2010 09:15 <DIR> .. 22/02/2010 08:55 34,092 3chLrnRem.asm 02/02/2010 08:30 540,758 detab.exe 22/02/2010 09:15 41,430 test.txt 3 File(s) 616,280 bytes 2 Dir(s) 52,396,257,280 bytes free C:\Documents and Settings\pete\Desktop\pete>
Trying to avoid the eventual mistakes of the manual process, is it any chance to have detab.exe xx doing the renaming of test.txt as 3chlrnrem.asm once finished? I am affraid that currently there is not...
Trying to avoid the eventual mistakes of the manual process, is it any chance to have detab.exe xx doing the renaming of test.txt as 3chlrnrem.asm once finished? I am affraid that currently there is not...
*** De-Tabify text file utility *** --------------------------------------------------------- Utility to remove tab characters from file and substitute with spaces at a user specified interval.
Useage: detab.exe tabs source_file [-f] tabs specifies tab stop position for original file source specifies source file name -f option saves output to source filename, otherwise output is written to STDOUT example: detab.exe 16 myprog.asm -f
One reason I didn't do it this way in the original version is that if you get the tab setting wrong, you can't change it because the tabs are now spaces and the source file has been overwritten.