在OS X上配置Sublime Text以在标题栏中显示完整目录路径

Kat*_*yna 107 sublimetext

在Linux上,Sublime Text默认显示标题栏中当前打开文件的完整路径,但在OS X上,它只显示文件的名称.

如何在OS X上配置Sublime以显示标题栏中当前打开文件的完整路径?

Myk*_*lis 198

使用Sublime Text 3,所有必要的是编辑您的Sublime用户首选项(Preferences -> Settings - User)以包括:

{
  // ... other settings
  "show_full_path": true
}
Run Code Online (Sandbox Code Playgroud)

这将覆盖此选项的OS X特定的默认值,即false.

  • 然后,重新启动一个sublime. (9认同)
  • 有没有办法自定义路径?我真的不想要完整的路径,或只是文件的名称,而是基于我操作的文件夹的路径.`my-app/app/templates/something.hbs` - 或`my-app - templates/something.hbs` (7认同)
  • 对于新手和分心用户(我是后者),在Sublime Text 3首选项>设置中打开一个垂直分割的窗口.您必须在右窗格中编辑Preferences.sublime-settings,添加冒号和相关设置. (6认同)

小智 14

Should be the same for Sublime Text 2/3 (Tested on OSX Yosemite)

  1. While in sublime go to your "Sublime Text 2/3" menu and move down to "Preferences ->" then go down to "Settings - User" this will open your user settings in Sublime

  2. If you have never added any user setting it should just contain some comments. If so you can just paste in the following:


One setting

// Settings in here override those in "Default/Preferences.sublime-settings", and  
// are overridden in turn by file type specific settings.  
{  
"show_full_path": true  
} 
Run Code Online (Sandbox Code Playgroud)


Two settings
( one setting per line and separated by a , )

// Settings in here override those in "Default/Preferences.sublime-settings", and  
// are overridden in turn by file type specific settings.  
{   
"show_full_path": true, 
"save_on_focus_lost": true  
} 
Run Code Online (Sandbox Code Playgroud)
  1. Now save this settings file.

  2. Now you should be able to see the full path in the title bar.

(NOTE: for me I didn't need to restart Sublime see the path in the title bar, but I think I had to when I was using the Windows version of the program)

FYI in Sublime's full screen mode/distraction free mode, you need to move your pointer to the top of the screen to see the title bar.

我通常只运行Sublime,我手动调整窗口大小为屏幕的全尺寸,所以我总能看到标题栏.



只是为了澄清你读到:

//Show the full path to files in the title bar.  
// On OS X, this value is overridden in the platform specific settings, so  
// you'll need to place this line in your user settings to override it."
Run Code Online (Sandbox Code Playgroud)

它试图告诉您修改Sublime文本用户设置而不是任何OSX系统设置.

  • 我怎么能这样说,以便从`〜/ Users/username ...`显示完整路径的insteas它只显示我正在处理的当前目录.例如,而不是`/ Users/username/Desktop/Main/child/project-frontend/src/app/menu.js`它将只显示`project-frontend/src/app/menu.js` (4认同)

jth*_*ter 6

在 Mac OS X 的 Sublime Text 3 中:

1) 添加"show_full_path": true到您的Sublime Text / Preferences / Settings - User文件。添加此行,即使它已显示true在默认首选项中。,如果您将其包含在其他首选项中,请以逗号 ( ) 结束该行。保存您的更改。

2) 退出并重新启动 Sublime。

与其他用户首选项不同,在重新启动应用程序之前您不会看到此更改。

  • 当这个答案发布时,这可能是真的,但我只是在 sublime text 3 (build 3114) 中尝试过它,并且不需要重新启动 sublime 就可以工作。 (7认同)