Viewing htaccess files in Mac Lion' Finder

Just switched to Mac from Windows and when I go into Finder I can’t see my htaccess files and can’t find a way to change that. Anyone have a trick to do that so they show up?

Hold off on this, I think it is another issue caused when they were moved from one machine to another and some of them may not have copied.

This may help. I don’t use a Mac, but on Linux, filenames that start with a dot are hidden by default. Pressing Ctrl+H toggles the hide/show. According to that article, Mac is similar, although toggling appears to be more difficult.

^ yes, mac hides files that start with a dot as well.

Yes, after doing some experimentation that is the case. The files are hidden. The Command H does not toggle the files, it appears to close some windows and toggle some others.

So how do people working on a Mac handle editing .htaccess files?

Most of what I have seen toggles all files on or off using the terminal window and I really don’t want to do that every time I have an edit.

Thanks

I’m thinking at this point that I will just maintain them as .txt files on the mac and then rename them when I publish them. Unless someone has a better way of course. :slight_smile:

I use my editor (Coda, TextMate, etc.) to open hidden files. That works in most editors, not all.

The ideal way is to use your terminal, however. If you plan on doing lots of local development, knowing your way around the terminal will save you lots of time and headaches.

The more convenient solution might be using a software like the Desktop Utility (free, scroll down that page): http://sweetpproductions.com/

Just knocking the dot off the front works on Linux.

Using WinDoze, I use EditPad Lite (a text editor) which allows me to open/save any file name/extension I like. I use it exclusively for my .htaccess and *.conf files as well as the (extensionless) hosts file.

Regards,

DK

Thanks, but I am using a Mac and Editpad is Windows based. On Windows I prefer Notepad++, wish I could get it on the Mac.

Which editor are you using on the Mac currently?

Komodo and it seems to work fine except it doesn’t allow for hidden files. And to clarify, I use Dreamweaver as a page text editor and content manager, without any of the automated functions and that seems to work fine for me.

But I like to have a second editor that I use for different things including htaccess files for local, web test and web production environments; css files; and other documentation files that I like to keep up and viewable.

In Windows I was using Dreamweaver and Notepad++ and it worked great. So I’m not married to Komodo either. If there is a simple context sensitive text editor that is free and does the hidden files, I’m willing to take a look.

And I’m not averse to using the terminal, but for day to day repetitive tasks, i would rather not have to dive any further into that right now. I currently use it for MySQL data dumps and transfers.

If it needs to be a free app, then TextWrangler would be the best option. The opening of hidden files is a standard feature in this app.

If you don’t mind a commercial app, then I’d have a look at Panic’s Coda and TextMate. Both have free trial versions.

Hi,

You can try in your terminal (Applications > Utilities) type the following:

defaults write com.apple.finder AppleShowAllFiles TRUE
killall Finder

This will now show you all of the hidden files and folders on your operating system. If you want to reverse the command replace TRUE with FALSE. You can then use any application you want to open and edit the .htaccess files providing you have the right permissions to do so.

Regards,
Steve

Thanks Steve, I have seen this but don’t want to do this every time I want to open and edit a file and don’t want to leave all the system files visible.

And thanks Kahoutek, I will take a look at TextWrangler. And I don’t have anything against a commercial app but for what I am doing with it, just seems there should be a decent free app out there.

bost,

I use Dreamweaver (when I’m too lazy to open EditPad) and it knows how to deal with .htaccess files.

Regards,

DK

I downloaded TextWrangler and can’t find any way to open or view hidden files. The help file specifically states that files beginning with a ‘.’ are hidden on Mac OS.

It’s easy to show all hidden files on the Mac. Just go to Finder > View > Show System Files.

I don’t have TextWrangler, but there is usually an option under View > similar to the above.

dklynn, thanks, and yes that’s true. Just a preference of mine to keep them out of the primary editor. I use the secondary editor to hold files that I leave open all the time as reference files and also for some various text editing or manipulation. It’s not that big a deal just to put a .txt on the end of the htaccess and rename them when I ftp them up.

Again, thanks all.

Not on my Mac. I go to Finder>View and there is no Show System Files or any other place to show hidden files. You using Lion?