github atom编辑器前端开发实战(一)- 一键用 chrome 浏览器打开当前编辑的文件,亲测可用
来源:互联网 发布:android仿淘宝首页 编辑:程序博客网 时间:2024/05/16 05:04
Copyright 2016 by 蔡舒啸 保持署名-非商业性使用-相同方式共享 Creative Commons BY-NC-ND 3.0
- 环境
- 工具
- 步骤
- 感谢 atom-shell-commands 插件的作者韦易笑知乎
环境:
Ubuntu 16.04 64位
github atom 1.8.0
google-chrome 版本 51.0.2704.106 (64-bit) deb格式安装包
node 4.4.4
npm 2.15.1
浏览器可以打开 github.com
工具:
github atom
google-chrome
atom 插件 - atom-shell-commands 插件项目主页https://atom.io/packages/atom-shell-commands
步骤:
打开命令行(在桌面按下 Ctrl+Alt+T),输入
apm install atom-shell-commands
等待一会儿安装成功
按插件主页的教程,用你最喜欢的方式打开文件 ~/.atom/config.cson(修改前先备份),在最后插入以下内容,保存:
"atom-shell-commands": commands: [ { name: "open with chrome" command: "google-chrome" arguments: [ "{FileName}" ] options: cwd: "{FileDir}" keymap: 'ctrl-2' } ]
重启atom,新建foo.html,如下:
<html><body><button type="button" onclick="alert('Welcome!')"> 点击这里</button><script type="text/javascript"> document.write("Hello, World!");document.write("<h1>This is a heading</h1>");</script></body></html>
保存。然后按快捷键ctrl+2
,就用google-chrome打开了foo.html!
我的天!真的启动了google-chrome,打开了foo.html!
这意味着,atom开发前端代码可以随时用chrome调试!太方便了!
感谢 atom-shell-commands 插件的作者韦易笑@知乎!
0 0
- github atom编辑器前端开发实战(一)- 一键用 chrome 浏览器打开当前编辑的文件,亲测可用
- Eclipse使用外部编辑器打开当前编辑文件,在文件夹中显示当前编辑文件.
- 在浏览器中打开预览sublime text当前所编辑文件的方法和快捷键设置
- Atom 编辑器在新的标签页(tab)打开文件
- 使用atom编辑适用于github的.md
- 前端学习 开发编辑器 Atom使用配置
- Github Atom开源文本代码编辑器- 由 Github 打造的下一代编程开发利器
- Github atom编辑器
- Chrome浏览器扩展开发系列之十六:扩展中可用的Chrome浏览器API
- Atom编辑器 初体验(web前端)
- Atom 更为先进的文本代码编辑器 - 由 Github 打造的下一代编程开发利器
- chrome浏览器的一些常用的前端开发快捷键
- chrome浏览器插件开发经验(一)
- chrome浏览器插件开发经验(一)
- Atom,github出品编辑器,未来最好的编辑器
- Atom打开一个工程文件不可编辑问题处理
- Chrome浏览器前端开发常用的插件和扩展程序
- Chrome浏览器扩展开发系列之十七:扩展中可用的chrome.events API
- SQL Server 对XML数据功能支持
- h5+css 水平菜单制作
- 【bzoj2055】【80人环游世界】【有上下界的费用流】
- 多重继承与void*指针转换问题的分析
- 在Ubuntu安装NodeJS后,不能使用node npm命令
- github atom编辑器前端开发实战(一)- 一键用 chrome 浏览器打开当前编辑的文件,亲测可用
- storm中 worker executor task之间的关系
- MongoDB c++ driver(一)
- 常见面试之机器学习算法思想简单梳理
- 【bzoj3698】【XWW的难题】【有上下界的网络流】
- Arrays.sort Comparator
- Codeforces Round #360 (Div. 2) D. Remainders Game(中国剩余定理)
- LA-3521 (数论)
- MySQL 的 RowNum 实现