Hi, I have a bash alias called mb ("mate bash") to edit my bash config files (and a few others). It's pretty simple:
alias mb='mate ~/.alias ~/.bashrc ~/.profile ~/.inputrc ~/.screenrc'
This worked fine when I first used it (quite a long time ago) but I've just tried it today and it only half works. I get the project drawer listing the 5 files, but .profile and .bashrc don't open in TextMate when I single-click them. If I double-click them, .profile opens in TextEdit and .bashrc gets executed in a terminal.
What settings can I change to get back the old behaviour? I realise it's probably a system setting rather than something TextMate-specific, but I can't even find a way to show dotfiles in the finder so I can "always open with...".
Thanks
Jon
On Wed, Nov 26, 2008 at 3:06 PM, Jon Evans jon.evans@pobox.com wrote:
alias mb='mate ~/.alias ~/.bashrc ~/.profile ~/.inputrc ~/.screenrc'
This is sweet. I'm stealing it : )
What settings can I change to get back the old behaviour? I realise it's probably a system setting rather than something TextMate-specific, but I can't even find a way to show dotfiles in the finder so I can "always open with...".
Probably you want to right click the file in the project panel and choose "Treat File as Text" and see if that does anything (sometimes TextMate makes some silly assumptions about the nature of your files : )
The setting should "stick", so you don't have to do it everytime you need to edit dotfiles.
Hope it helps...
Hi Ale,
2008/11/26 Ale Muñoz bomberstudios@gmail.com
On Wed, Nov 26, 2008 at 3:06 PM, Jon Evans jon.evans@pobox.com wrote:
alias mb='mate ~/.alias ~/.bashrc ~/.profile ~/.inputrc ~/.screenrc'
This is sweet. I'm stealing it : )
You're welcome. :) You might also like my "mate aliases" alias: alias ma='mate -w ~/.alias && . ~/.alias' It lets you edit the aliases file, then re-sources the file so you can test it straight away. Strangely, this one *does* open in TextMate, even though it doesn't when using my mb alias.
Probably you want to right click the file in the project panel and
choose "Treat File as Text" and see if that does anything (sometimes
TextMate makes some silly assumptions about the nature of your files :)
Unfortunately when I right-click the files in the project drawer (all of them, not just the two that won't edit in TextMate) the Treat File as Text/Binary option is disabled. Jon
On 26 Nov 2008, at 17:38, Jon Evans wrote:
[...] Unfortunately when I right-click the files in the project drawer (all of them, not just the two that won't edit in TextMate) the Treat File as Text/Binary option is disabled.
Files without extension cannot be set to binary nor text. Instead a heuristic is used to decide if they are text, which is effectively if the first 1024 bytes are valid UTF-8 or alternatively, if the file creator is TxMt or (I think) type is text. The latter two things can be set with the SetFile shell command.
Hi,
2008/11/29 Allan Odgaard mailinglist@textmate.org
Files without extension cannot be set to binary nor text. Instead a heuristic is used to decide if they are text, which is effectively if the first 1024 bytes are valid UTF-8 or alternatively, if the file creator is TxMt or (I think) type is text. The latter two things can be set with the SetFile shell command.
Thanks Allan. I used SetFile to set the owner to TxMt on the files in question (~/.alias ~/.bashrc ~/.profile ~/.inputrc ~/.screenrc) and it now works.
I still had a problem with .bashrc until I restarted TM. I guess it caches the file info the first time you open the file? It's working now anyway.
Thanks again
Jon
On 3 Dec 2008, at 14:08, Jon Evans wrote:
[...] I still had a problem with .bashrc until I restarted TM. I guess it caches the file info the first time you open the file? It's working now anyway.
Sort of, yes. This is because when you do ⌘T it has to show all text files in your project, if some are of “unknown” type, it means loading first 1024 bytes of each of these, which would affect the speed of ⌘T on each invocation if it did not cache it.
That said, the binary/text situation is clearly not ideal and on the list of stuff to rethink :)