简体   繁体   English

Sublime Text 2如何更改文件侧边栏的字体大小?

[英]Sublime Text 2 how to change the font size of the file sidebar?

The current font size of the file sidebar is to small for me. 文件侧边栏的当前字体大小对我来说很小。 How can I make it larger? 我怎样才能让它变大?

Select Preferences / Browse Packages… , and go to Theme - Default directory. 选择Preferences / Browse Packages… ,然后转到Theme - Default目录。

Open Default.sublime-theme with your editor and search for sidebar_label string. 使用编辑器打开Default.sublime-theme并搜索sidebar_label字符串。 You should find something like: 你应该找到类似的东西:

{
    "class": "sidebar_label",
    "color": [0, 0, 0],
    "font.bold": false
}

You can add here the font size you prefer: 您可以在此处添加您喜欢的字体大小:

{
    "class": "sidebar_label",
    "color": [0, 0, 0],
    "font.bold": false,
    "font.size": 14.0
}

Thanks! 谢谢! Some other settings to change font size (in these examples, smaller) of ALL the visible things! 一些其他设置可以改变所有可见事物的字体大小(在这些例子中,更小)!

Note that if you have a Project open (a folder) and the tabs and status bar showing, when you hit save you should see the changes realtime. 请注意,如果您打开了一个项目(文件夹)并且显示了选项卡和状态栏,当您点击保存时,您应该实时看到更改。

Sidebar Tree 侧边栏树

{
    "class": "sidebar_tree",
    "row_padding": [0, 0],
    "indent": 6,
    "indent_offset": 17,
    ...
{
    "class": "sidebar_label",
    "color": [0, 0, 0],
    "font.bold": false,
    "font.size": 8.0
    ...

Tabs Open Files 选项卡打开文件

{
    "class": "tabset_control",
    ...
    "content_margin": [0, 0, 3, 1],
    "tab_overlap": 24,
    "tab_width": 180,
    "tab_min_width": 48,
    "tab_height": 18,
    ...
{
    "class": "tab_label",
    ...
    "font.size": 8.0
    ...

Status Bar 状态栏

{
    "class": "status_bar",
    ...
    "content_margin": [0, 0, 0, 0]
    ...

(I couldn't find where to set the font for the Status Bar, this will squish the bottom bar down though) (我找不到在哪里设置状态栏的字体,这会挤压底部栏虽然)

Method probably work on the both version of ST 方法可能适用于ST的两个版本

  1. check you current setup theme: 检查你当前的设置主题:

    1.1 open preference/settings user 1.1打开首选项/设置用户

    1.2 cmd + f and type theme 1.2 cmd + f和类型主题

    1.3 you found your theme (may be not default, may be soda dark;) ) 1.3你发现你的主题(可能不是默认,可能是苏打黑暗;))

  2. install package: "PackageResourceViewer" 安装包:“PackageResourceViewer”
  3. cmd + shift + p - for open command pallete cmd + shift + p - 用于打开命令托盘
  4. type packageresourceviewer 输入packageresourceviewer

    4.1 type theme and select theme 4.1键入主题并选择主题

    4.2 select your current theme file (for st3 dark3 theme) 4.2选择当前的主题文件(对于st3 dark3主题)

    4.3 cmd +f to find "sidebar entry" 4.3 cmd + f找到“侧边栏条目”

    4.4 type in the block: "font.size": NUMBER to the options 4.4在块中输入:“font.size”:NUMBER到选项

    4.5 save 4.5保存

  5. enjoy ;) 请享用 ;)

This question has been answered for Sublime Text 2 but worth mentioning if you are in version 3 is that you can simply copy a package file and place it in your ../Packages/User directory then override the settings there. Sublime Text 2已回答了这个问题,但值得一提的是,如果您使用的是版本3,则只需复制一个包文件并将其放在../Packages/User目录中,然后覆盖那里的设置。

EDIT: 编辑:

You may have to dig around some in order to find where ST3 files were placed during installation. 您可能需要挖掘一些以便在安装期间找到ST3文件的放置位置。

I'm using Ubuntu and ST3's Main Package files are located at opt/sublime_text/packages. 我正在使用Ubuntu和ST3的主包文件位于opt / sublime_text / packages。 I then copy the package to override into the .config/sublime-text-3/Packages/User directory and then make my edits to that package. 然后我将包复制到.config / sublime-text-3 / Packages / User目录中,然后对该包进行编辑。

In Sublime Text 3, select Preferences >> Settings - User from the menubar, then add dpi_scale config to the file and save. 在Sublime Text 3中,从菜单栏中选择首选项 >> 设置 - 用户 ,然后将dpi_scale配置添加到文件并保存。 That's all. 就这样。

{
    ......,
    "dpi_scale": 1.5  //set this value as your need.
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM