Keymap Sublime Text 2文件类型? [英] Keymap Sublime Text 2 File Type?

查看:101
本文介绍了Keymap Sublime Text 2文件类型?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在设置自己的键盘映射,并想知道是否有设置键来切换正在处理的文件类型的选项。因此,例如,如果我有一个普通的纯文本文件,并希望它是一个CSS文件,我会有一个键盘映射将文档类型更改为CSS。可能?如果是这样,请向我解释你是如何做到这一点的。



Rob

解决方案

在切换文件格式的情况下,通过命令面板快速访问所需的格式可能会更加有用:




  • CTRL + SHIFT + P 调出 Command Palette

  • 键入 CSS 突出显示设置语法:CSS 命令

  • 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:

    • Press CTRL+SHIFT+P to bring up the Command Palette
    • Type CSS to highlight Set Syntax: CSS command
    • Press ENTER

    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屋!

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