I am working in a project that has many folders corresponding to real directories. After working for a while, there may be some folders that are expanded and others that are collapsed. The thing is that if I close the project and open it again later, then all of the folders will be collapsed. This is very annoying because I must expand all the folders I want access to every time I work on the project. Is there a way for TextMate to maintain the state of which folders are expanded and which are not the next time I open the project?
________________________________________ From: textmate-bounces+dru=summitprojects.com@lists.macromates.com [textmate-bounces+dru=summitprojects.com@lists.macromates.com] On Behalf Of Kevin Tran [hekevintran@gmail.com]
Is there a way for TextMate to maintain the state of which folders are expanded and which are not the next time I open the project?
Try using the ProjectPlus plugin from Ciaran:
http://ciaranwal.sh/2008/08/05/textmate-plug-in-projectplus
It does many useful things, among them remembering your open/closed folder states.
I have also wondered this and never found a solution. Code folding is the main area I would like to figure out how to save state.
I spent a lot of time in one file folding chunks of code how I wanted. I saved, closed, and opened the file; all fold points were lost.
Would it ever be possible to save this state when working live over FTP or SSH? I imagine something about the file, perhaps it's md5 plus file name could be saved locally and used as a preference file to tell TM the last state.
I would also be find with the files current directory holding a single .file that stored this state data. This makes the files state nicely portable as well.
On 4 Jul 2009, at 19:23, Scott Haneda wrote:
I have also wondered this and never found a solution. Code folding is the main area I would like to figure out how to save state.
I spent a lot of time in one file folding chunks of code how I wanted. I saved, closed, and opened the file; all fold points were lost.
Would it ever be possible to save this state when working live over FTP or SSH? [...]
TextMate saves folding info using extended attributes.
If you use AFP or SMB then Apple will simulate xattr support even for the remote file system, so it should work.
If you use ExpanDrive or similar, they do support xattr, but I don’t think they store it on the remote server.
If you use a dedicated (s)ftp application with “Edit in TextMate” they download the file, ask TextMate to edit it, and then upload it again. It would be up to this (s)ftp application to preserve the extended attributes of the file (e.g. upload it to the server).
On Jul 8, 2009, at 10:23 AM, Allan Odgaard wrote:
On 4 Jul 2009, at 19:23, Scott Haneda wrote:
I have also wondered this and never found a solution. Code folding is the main area I would like to figure out how to save state.
I spent a lot of time in one file folding chunks of code how I wanted. I saved, closed, and opened the file; all fold points were lost.
Would it ever be possible to save this state when working live over FTP or SSH? [...]
TextMate saves folding info using extended attributes.
Nice to know, thanks. Any chance you would be willing to explore a .directory that holds these attributes as a preference, that would also store those on remote machines that do not support extended attributes?
If you use ExpanDrive or similar, they do support xattr, but I don’t think they store it on the remote server.
Expandrive was and is far too broken for me to be able to use it on a regular basis.
If you use a dedicated (s)ftp application with “Edit in TextMate” they download the file, ask TextMate to edit it, and then upload it again. It would be up to this (s)ftp application to preserve the extended attributes of the file (e.g. upload it to the server).
Ok, baring you being willing to look at storing extended attr data such as this somehow in a hidden and transparent way, I will look at talk to ftp app makers to see what they can do.
Thanks Allan.
On 8 Jul 2009, at 21:50, Scott Haneda wrote:
[...] TextMate saves folding info using extended attributes.
Nice to know, thanks. Any chance you would be willing to explore a .directory that holds these attributes as a preference, that would also store those on remote machines that do not support extended attributes?
Absolutely not ;) Extended attributes is how this stuff is stored and it is far more robust than any proprietary solution I could come up with, plus such custom scheme would not solve your problem.
If you use a dedicated (s)ftp application with “Edit in TextMate” they download the file, ask TextMate to edit it, and then upload it again. It would be up to this (s)ftp application to preserve the extended attributes of the file (e.g. upload it to the server).
Ok, baring you being willing to look at storing extended attr data such as this somehow in a hidden and transparent way, I will look at talk to ftp app makers to see what they can do.
It already is stored in a completely transparent way. You can do: “xattr -l «file»” to see what TextMate has stored, and pretty much all the native shell commands (cp, rsync, etc.) will preserve this info even when moved to file systems that do not natively support extended attributes.