SublimeWeb前端之路程序员

mac 下使用sublime Text3运行html文件到浏览器

2017-01-23  本文已影响268人  呆呆滴木木菇凉
1、前言

开始学习JavaScript,首先从软件入手,之前学习的时候用的是eclipse,可以直接运行html文件,可是用eclipse开发html个人觉得是蛮方便的,但是可能是它主要是用于开发java的,总觉得不是专门用来开发html的,而且还是收费的,试用期只有30天,免费的功能少。咨询了朋友,推荐我使用sublime Text。
首先就是熟悉开发的工具了,下载sublime Text3,安装插件啥的,这里就主要介绍怎么方便的在浏览器运行我们写的html文件

2、运行html
找到 Key Bindings

点击打开,可以看到这样两个文件

修改右边的文件

将右边Default(OSX).sublime-keymap-User 里的内容替换为

[ 
   // Chrome
    { "keys": ["command+1"], "command": "side_bar_files_open_with", 
            "args": 
            { 
                "paths": [], 
                "application": "/Applications/Google Chrome.app", 
                "extensions":".*" 
            } 
    }, 
    // 习惯command+b默认Chrome 
    { "keys": ["command+b"], "command": "side_bar_files_open_with",
            "args": 
            { 
                "paths": [], 
                "application": "/Applications/Google Chrome.app", 
                "extensions":".*" 
            } 
    }, 
    // Safari 
    { "keys": ["command+2"], "command": "side_bar_files_open_with", 
            "args": 
            { 
                "paths": [], 
                "application": "/Applications/Safari.app", 
                "extensions":".*" 
            } 
    }, 
    // Firefox 
    { "keys": ["command+3"], "command": "side_bar_files_open_with", 
            "args": 
            { 
                "paths": [], 
                "application": "/Applications/Firefox.app", 
                "extensions":".*" 
            } 
    } 
]

然后利用设置的快捷键

上一篇 下一篇

猜你喜欢

热点阅读