Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set default file viewer in SourceTree?

I want to set default file viewer in SourceTree. The current one now is Notepad which does not show line break properly (all codes are in one line).

like image 432
mmdc Avatar asked Dec 01 '13 07:12

mmdc


People also ask

How do I change the directory in SourceTree?

Go to the General Tab in SourceTree Preferences. At the top of the section "Miscellaneous" there is a window to choose the "Project Folder".


2 Answers

SourceTree uses the default "Open With" application like Explorer. As far as I know other than changing the default application used by each file extension you cannot change the behavior of the menu item in SourceTree.

However...

You can add a custom action to achieve the same result using Tools | Options, Custom Actions tab:

Adding a custom action

This will appear under the Custom Actions menu. As far as I know you cannot add a shortcut key to custom actions.

The SourceTree blog has more info.

like image 157
Ade Miller Avatar answered Sep 20 '22 15:09

Ade Miller


I had this same problem for my MacBook.

To have sourcetree Open selected version, or Open current version a file with your desired program, change the system-wide default app used to open the file type to your desired app:

  1. using Finder, find a file with the same file type that you are trying to open via SourceTree

    • TIP: if cannot find file with same file type, can create one via Terminal with command:

      touch file.filetype 
  2. right click said file in Finder

  3. click Get Info
  4. expand Open With:
  5. use revealed drop-down menu to select desired app
  6. below the drop-down menu, click Change All...
  7. in the pop-up window, click Continue
  8. done!
  9. go to SourceTree and Open selected version, or Open current version that file :)

reference: https://www.laptopmag.com/articles/how-to-change-default-applications-mac

like image 27
Eric Avatar answered Sep 18 '22 15:09

Eric