.Spin file format?
RinksCustoms
Posts: 531
Anyone know about the formatting in a spin file used by the ide? I'm interested in starting an android spin file viewer/ editor.
Comments
Spin-Files are normally ASCII-Text Files.
every line ends with CR LF.
Under windows sometimes they get saved with windows-encoding instead of ASCII.
Linux has problems with that. But files saved under linux (as usually for linux) are missing CRs on the end of the line be aware of that.
Enjoy!
Mike.
yes. It is allways good to be in CA ...
Try using the Linux "file" command on a .spin file to see what it is.
First thing I do with spin files is to get rid of all that nonsense by running them through iconv so that I can view/edit them with regular text editors under Linux.
Enjoy!
Mike
Thanks for the hint. In the past I've just opened the file and copied all the text into a new file. I don't like the binary file formats: they have a tendency to crash my text editor.
I just downloaded an Android editor called "920 Text Editor". It opened and displayed a spin fle correctly - my 1pin TV which uses the extended char set. I have a Xoom.
My biggest problem is how to position the cursor over text I wish to change in Android. Anyone found this problem and a solution?
Press your finger on any text field will present you with a 'slidable' cursor.
Long press on a word will select the word and present 2 slidable cursor, allowing to change the selection
This needs some practice, but works quite nicely
Written on my Asus Transformer .
[Added] The long press can be used to select/copy/cut/paste ANY text. You might want to look into installing the hackers keyboard
[Added 2] Cool 920 supports VIM syntax highlighting. So you can easily add SPIN syntax highlighting :0
You maybe intending a little humor with your suggestion of vi syntax highlighting for Spin but it does exist.
Have a search for the thread "Spin syntax definition for vim" by Andrey Demenev". It has been very usefull for me.
No humor intended, I like and use VIM. The reason I had a smiley, was precisely because of that vim syntax from Andrey (see also the Spin android Tool thread, you can see I have been running Vi
PS I travel alot since I moved to Taiwan, so getting some 'propeller time' is getting difficult. Being able to use my tablet is making it easier to get something done again.
OK. Let's keep the vim flag flying.
Oops sorry for that
Except for UTF-16 Spin files under Linux:
1) The "less" command warns you may have a binary file and displays gibberish if you continue.
2) The "diff" command does not work, just says tells you that binary files differ.
3) The "grep" command cannot be used to find anything. Or perhaps tells you the binary file contains the search string, but where?
4) The "sed" command does not work, so no quick global replacing of strings from the command line.
5) Amazingly "cat" works except some characters are gibberish.
6) Source code repositories like svn and git have trouble working with what they see as binary files, mostly because "diff" does not work. I believe there are work arounds for this but it's a pain anyway.
7) The vim editor will open the files and display gibberish.
8) The kate editor from KDE will open the files after you have figured out to turn on file type auto detection.
All in all UTF-16 Spin files are a pain and I don't think anything other than byte wide chars has any place in a programming language source code.
Having to have weird fonts for graphical drawing chars in a source file is just a bad idea.
Now you might say that all those tools I mentioned need fixing but that just stuffs up the whole UNIX byte stream pipe philosophy for no useful purpose, blech.
But really, I thought the character set was a great idea for being able to insert circuits into the source code.I have stopped using the special graphics for banners now.