Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

This question already has an answer here:

I want

open ~/.profile

to open my .profile file in Sublime Text 2. I know how to do this with .txt files for example, but I can't figure out how to do that with files that don't have an extension.

share|improve this question

marked as duplicate by allquixotic, Scott, Brad Patton, Everett, ؘؘؘؘ May 1 '13 at 5:31

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
You can change the default application for the public.plain-text UTI by editing com.apple.LaunchServices.plist or by using duti or RCDefaultApp. –  ؘؘؘؘ May 1 '13 at 5:33

1 Answer 1

If you're talking about a command line, just set up Sublime Text 2's CLI. See Sublime Text 2: OS X Command Line. Basically run:

ln -s "/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl" ~/bin/subl

Once you do that, you can simply open any files with:

subl ~/.profile

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.