崇高文本2键盘快捷键来在Chrome / Firefox的窗口中打开文件 [英] Sublime Text 2 Keyboard shortcut to open file in Chrome/firefox in windows

查看:219
本文介绍了崇高文本2键盘快捷键来在Chrome / Firefox的窗口中打开文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我跟着Windows 7的设置铬指令。没有运气!

  {
 CMD:C:\\ Program Files文件(x86)的\\谷歌\\铬\\应用程序,$ C:\\用户\\ GMU \\桌面\\ June_15_2012]
}

下我应该有什么样的格式来保存输入文件位置/路径之后。我是一个noobie。不好意思问这个问题。任何帮助!

如果我preSS F7收到以下消息
错误试图解析构建系统:使用C无效逃逸:\\用户\\ GMU \\应用程序数据\\漫游\\崇高文本2 \\包\\用户\\ Chrome.sublime的构建:2:9

感谢


解决方案

  1. preferences>键绑定的用户应该是这样的窗口:

      [
    // * RIGHT * {钥匙:F12],命令:open_browser},
    // * WRONG * {钥匙:F12],CTRL:open_browser},{钥匙:F12],命令:open_browser},
    {钥匙:CTRL + E],命令:HtmlDialect},
    {钥匙:[/],命令:close_tag_on_slash}
    ]


  2. 看在你的包文件夹名为openbrow'然后打开崇高的openbrow.py文件夹


找到您要使用和GOTO它的属性到您的计算机上的位置复制路径浏览器的图标

然后在openbrow文件你要去粘贴路径,它应该去。
例如([R'C:\\路径,您的浏览器, - 新标签',self.view.file_name()])

这是我的openbrow.py文件看起来是这样的:

 进口崇高,sublime_plugin
    进口子    类OpenBrowserCommand(sublime_plugin.TextCommand):
    DEF运行(个体经营,编辑):
    subprocess.call([R'C:\\ Program Files文件
    (86)\\ Mozilla Firefox的\\ firefox.exe, - 新的标签,self.view.file_name()])

希望这有助于! KCCO

I followed the instruction for windows 7 to setup chrome. No luck!

{
 "cmd":["C:\Program Files (x86)\Google\Chrome\Application", "$C:\Users\gmu\Desktop\June_15_2012"]
}

after entering the file location/path under what format should I have to save. I am a noobie. sorry to ask this question. Anything helps!

If I press f7 getting the following message Error trying to parse build system: Invalid escape in C:\Users\gmu\AppData\Roaming\Sublime Text2\Packages\User\Chrome.sublime-build:2:9

Thanks

解决方案

  1. preferences > key bindings-user should look like this in windows:

    [
    // *RIGHT* { "keys": ["f12"], "command": "open_browser" },
    // *WRONG* { "keys": ["f12"], "ctrl": "open_browser" }, 
    
    { "keys": ["f12"], "command": "open_browser" },
    { "keys": ["ctrl+e"], "command": "HtmlDialect" },
    { "keys": ["/"], "command": "close_tag_on_slash" }
    ]
    

  2. look in your packages folder for a folder called 'openbrow' then open the openbrow.py file in sublime

find the icon for the browser you want to use and goto it's properties to copy the path to it's location on your computer

then in the openbrow file your gonna paste that path where it should go. for instance ([r'C:\path to your browser', '-new-tab', self.view.file_name()])

here's what my openbrow.py file looks like:

    import sublime, sublime_plugin
    import subprocess

    class OpenBrowserCommand(sublime_plugin.TextCommand):
    def run(self,edit):
    subprocess.call([r'C:\Program Files 
    (x86)\Mozilla Firefox\firefox.exe','-new-tab', self.view.file_name()])

hope this helps! KCCO

这篇关于崇高文本2键盘快捷键来在Chrome / Firefox的窗口中打开文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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