Keymap Sublime Text 2文件类型? [英] Keymap Sublime Text 2 File Type?
问题描述
我正在设置自己的键盘映射,并想知道是否有设置键来切换正在处理的文件类型的选项。因此,例如,如果我有一个普通的纯文本文件,并希望它是一个CSS文件,我会有一个键盘映射将文档类型更改为CSS。可能?如果是这样,请向我解释你是如何做到这一点的。
Rob
在切换文件格式的情况下,通过命令面板快速访问所需的格式可能会更加有用:
- 按 CTRL + SHIFT + P 调出
Command Palette
- 键入
CSS
突出显示设置语法:CSS
命令 - 按 ENTER
- Press CTRL+SHIFT+P to bring up the
Command Palette
- Type
CSS
to highlightSet Syntax: CSS
command - Press ENTER
提供对所有可用格式的快速访问。开始输入设置语法...
并显示所有可用的格式。
I am working on setting up my own keymaps and was wondering if there is the option to set keys to switch the file type that is being worked on. So for example, if I have a regular plain text file and want it to be a css file, I would have a keymap that would change the document type to css. Possible? If so, please explain to me how you have done this.
Rob
While the individual shortcut solution is great, it requires editing the config files and most importantly remembering all the shortcuts you create for each sytax.
In the case of switching file formats it might be more useful to quickly access the required format via the command palette:
This is great because it provides quick access to all the formats available. Start typing set syntax...
and all the available formats will be shown.
这篇关于Keymap Sublime Text 2文件类型?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!