Atom语法突出显示指南 [英] Syntax Highlighting Guide for Atom

查看:125
本文介绍了Atom语法突出显示指南的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对Github的新编辑感到非常满意.不幸的是,定制它并不容易.我想创建自己的语法突出显示主题",因为我对可下载的主题不满意(至少他们似乎对Java不太满意)

I am very pleased with the new editor by Github. Unfortunately it isn't exactly easy to customize it. I wanted to create my own Syntax Highlighting Theme, because I am not happy with the ones available to download (at least they don't seem to do well with Java)

现在要设置样式的文件(语法变量,color.less等)位于

Now the files (syntax-variables, color.less, etc.) to style seem to be in:

~/.atom/ .../packages (if you want to change existing themes)

问题只是我不知道哪个(CSS)类设置语法的哪个元素.在哪里可以查找如何更改变量类型声明的颜色?

The problem is just that I don't know which (CSS) classes style which elements of the syntax. Is there a place where I can look up how to change the color of for example variable type declarations?

推荐答案

是的,您可以使用命令atom --dev或菜单View > Developer > Open in Dev Mode ...在开发人员模式下启动Atom.完成此操作后,可以右键单击UI中的任何元素,然后从上下文菜单中选择Inspect Element,就像在Web浏览器中一样.

Yes, you can start Atom in Developer Mode by using the command atom --dev or by using the menu View > Developer > Open in Dev Mode .... When you do that you can right click on any element in the UI and select Inspect Element from the context menu, just like you would in your web browser.

此外,对于语法元素,您可以:

Additionally, for syntax elements you can:

  1. 将文本光标放在要设置样式的项目上
  2. 在OS X上按 Cmd + Alt + P ,在其他平台上按 Ctrl + Alt + Shift + P ,或在命令中找到编辑器:日志光标范围"面板以显示语法元素的范围
  1. Put your text cursor on the item you want to style
  2. Press Cmd+Alt+P on OS X, Ctrl+Alt+Shift+P on other platforms, or find "Editor: Log Cursor Scope" in the command palette to display the scopes of the syntax element

语法元素的范围直接转换为CSS类.

The scopes of the syntax element translate directly to CSS classes.

这篇关于Atom语法突出显示指南的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆