简体   繁体   English

如何在Dreamweaver CC 2014.1上更改代码视图主题

[英]How to change the Code view theme on Dreamweaver cc 2014.1

I've just updated to Dreamweaver cc 2014.1 through Creative Cloud and I've been trying to change to a Monokai theme I've downloaded. 我刚刚通过Creative Cloud更新到Dreamweaver cc 2014.1,并且我一直在尝试更改为已下载的Monokai主题 I replaced the Colors.xml file in Code Coloring, restarted Dreamweaver but still wasn't working. 我在代码着色中替换了Colors.xml文件,重新启动了Dreamweaver,但仍然无法正常工作。 Help! 救命!

As of CC 2014.1, Dreamweaver now uses Themes for color coding. 从CC 2014.1开始,Dreamweaver现在使用主题进行颜色编码。 Hooray! 万岁! Check it out in Dreamweaver > Preferences > Code Coloring > Theme, there's a popup list of theme names that you can choose from. 在Dreamweaver中>“首选项”>“代码着色”>“主题”中进行检查,可以从中选择主题名称的弹出列表。 Good start! 好的开始! Oddly, there were one or two I tried from the list which had some attributes/tags that were impossible to read on the theme's background. 奇怪的是,我从列表中尝试过一两个,其中有一些属性/标签在主题的背景上无法读取。 But, it wouldn't be a new Adobe feature without some glaring lack of QA. 但是,如果没有明显的质量检查,这将不是Adobe的一项新功能。 Luckily, you can alter the theme's color settings, and you can restore them to the theme's defaults! 幸运的是,您可以更改主题的颜色设置,并将其恢复为主题的默认设置! BUT you can't create a new theme or duplicate an existing one from within this preference pane! 但是您无法在此首选项窗格中创建新主题或复制现有主题! Why? 为什么? Because Adobe. 因为是Adobe。

However, Adobe has provided instructions on how to do it the long way yourself! 但是,Adobe已提供有关如何自行完成此操作的说明! Hooray for the scenic route: 风景优美的路线的万岁:

https://helpx.adobe.com/dreamweaver/using/setting-coding-preferences.html#set_the_code_colors (see 'Add themes to the default list') https://helpx.adobe.com/zh-CN/dreamweaver/using/setting-coding-preferences.html#set_the_code_colors (请参阅“将主题添加到默认列表”)

Add themes to the default list If you want a customized theme to appear in the default theme list, perform the following steps: 将主题添加到默认列表中如果希望自定义主题出现在默认主题列表中,请执行以下步骤:

Copy and paste Themes.xml to your desktop from the following location: 从以下位置将Themes.xml复制并粘贴到桌面:

On Win: C:\\Program Files\\Adobe\\Adobe Dreamweaver CC 2015\\configuration\\themes On Mac: Applications/Adobe Dreamweaver CC 2015/configuration/themes/ Open Themes.xml in Notepad and add the following line before the closing tag : 在Win上:C:\\ Program Files \\ Adob​​e \\ Adob​​e Dreamweaver CC 2015 \\ configuration \\ themes在Mac上:在记事本中的Applications / Adob​​e Dreamweaver CC 2015 / configuration / themes /打开Themes.xml并在结束标记前添加以下行:

 <theme name="MyTheme"></theme> 

Replace the Themes.xml file in the following location with the file you edited: 将以下位置的Themes.xml文件替换为您编辑的文件:

On Win: C:\\Program Files\\Adobe\\Adobe Dreamweaver CC 2015\\configuration\\themes On Mac: Applications/Adobe Dreamweaver CC 2015/configuration/themes/ To specify the color scheme for your theme, reuse the XML files for the existing themes in the following locations: 在Win上:C:\\ Program Files \\ Adob​​e \\ Adob​​e Dreamweaver CC 2015 \\ configuration \\ themes在Mac上:Applications / Adob​​e Dreamweaver CC 2015 / configuration / themes /要为主题指定配色方案,请对现有主题重用XML文件在以下位置:

On Win: C:\\Program Files\\Adobe\\Adobe Dreamweaver CC 2015\\configuration\\themes On Mac: Applications/Adobe Dreamweaver CC 2015/configuration/themes/ For example, copy Raven.xml and defaultColorsRaven.xml, and then rename the copied files to MyTheme.xml and defaultColorsMyTheme.xml. 在Win上:C:\\ Program Files \\ Adob​​e \\ Adob​​e Dreamweaver CC 2015 \\ configuration \\ themes在Mac上:Applications / Adob​​e Dreamweaver CC 2015 / configuration / themes /例如,复制Raven.xml和defaultColorsRaven.xml,然后重命名复制的文件到MyTheme.xml和defaultColorsMyTheme.xml。

Relaunch Dreamweaver and check the default themes list (Preferences > Code Coloring) to see if your theme is listed. 重新启动Dreamweaver并检查默认主题列表(“首选项”>“代码着色”)以查看主题是否已列出。

The first time I did this, I made the mistake of messing with the files in ~/Library/Application Support/Adobe/Dreamweaver CC 2014.1/en_US/Configuration/Themes/ as I had been digging around in the CodeColoring folder in the Library as you were above if you were on a Mac — however these just seem to be copies of the themes (and doesn't include Themes.xml). 第一次这样做是因为弄乱了〜/ Library / Application Support / Adob​​e / Dreamweaver CC 2014.1 / en_US / Configuration / Themes /中的文件而犯的错误,因为我一直在库中的CodeColoring文件夹中四处浏览如果您使用的是Mac,那么您就在上面–但是,这些似乎只是主题的副本(并且不包括Themes.xml)。 Not sure if those are backups or what, but be sure you're editing the correct files located in Applications (Mac) or Program Files (Win). 不确定是备份还是备份,但请确保您正在编辑位于“应用程序”(Mac)或“程序文件”(Win)中的正确文件。

Now the ~/Library/[etc]/CodeColoring/Colors.xml and defaultColors.xml files seem to get written to to save your current settings for whatever theme you're using. 现在,〜/ Library / [etc] /CodeColoring/Colors.xml和defaultColors.xml文件似乎已写入,以保存您正在使用的任何主题的当前设置。 So don't touch those. 所以不要碰那些。 And there is another CodeColoring folder in the Application folder with all the old XML files like Colors.xml, CodeColoring.xml, which as far as I can tell do nothing as they haven't been modified since I've been messing with all this. 而且在Application文件夹中还有另一个CodeColoring文件夹,其中包含所有旧的XML文件,例如Colors.xml,CodeColoring.xml,据我所知,它们没有做任何事情,因为它们一直在被我弄乱,所以没有被修改。 。 Probably legacy garbage files. 可能是旧式垃圾文件。

Now for the existing color themes out there, it looks like you're in luck! 现在,对于现有的颜色主题而言,您似乎很幸运! They follow the same format as the MyTheme.xml file. 它们遵循与MyTheme.xml文件相同的格式。 So you'll just need to rename the Colors.xml file to Monokai.xml, add a line in Themes.xml for Monokai as instructed above, and now you're just missing a defaultColorsMonokai.xml, which you can just copy from another similarly colored theme and rename. 因此,您只需要将Colors.xml文件重命名为Monokai.xml,并按照上面的说明在Monos.xml的Themes.xml中添加一行,现在您只是缺少了defaultColorsMonokai.xml,您可以从另一个副本中复制它。颜色相似的主题并重命名。 Restart Dreamweaver and you've got your theme installed. 重新启动Dreamweaver,您已经安装了主题。

Just FYI, there's an included theme called Monaki so don't get confused by that. 仅供参考,其中包含一个名为Monaki的主题,因此不要对此感到困惑。 They'll display in the theme list in the order presented in the Themes.xml file. 它们将以Themes.xml文件中显示的顺序显示在主题列表中。

I'm not sure why I still use Dreamweaver over say another code editor/site manager that doesn't cause my discrete GPU to kick in every time, but here's to small improvements, if you can call this one. 我不确定为什么我仍然使用Dreamweaver来代替另一种代码编辑器/站点管理器,该代码编辑器/站点管理器不会导致我的离散GPU每次都启动,但是如果可以调用的话,这是一些小的改进。 Maybe next year we'll get a simple way to install 3rd party themes or dupe/create our own in the preference pane! 也许明年我们将获得一种简单的方法来安装第三方主题或在首选项窗格中复制/创建自己的主题!

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

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