精华 Visual Studio Code Guide升级版(持续更新中)
发布于 9 年前 作者 i5ting 25842 次浏览 最后一次编辑是 7 年前 来自 分享

Screen Shot 2015-10-10 at 11.16.49 PM.png

文章中图片太多了,大家还是点开看吧

visual studio code guide

另外要感谢 @hellopao 用Visual Studio Code写Node.js

github仓库 https://github.com/i5ting/vsc ,欢迎反馈和issue

2016-5-11更新

更新列编辑快捷键 更新1.1版本说明

主要改进点:

  • 双击编辑器可以改变大小
  • 调试性能提升和对Node.js更好的支持
  • 外部shell调用配置

扩展作者会尤其喜欢这个版本,理由如下:

  • 更新了语言Server协议
  • 增加调试适配器测试支持
  • 增加非常多的新的API,如打开文件夹,增加JSON模式验证,调试时操作

2016-3-20更新

更新

扩展 http://i5ting.github.io/vsc/#119

  • vscode-react-native
  • vscode-go

调试协议 http://i5ting.github.io/vsc/#120

支持折叠 http://i5ting.github.io/vsc/#12103

更多信息,欢迎关注我的公众号【node全栈】

node全栈.png

联系我,更多交流

xiaoweiquan.jpeg

91 回复

好东西,mark

来自炫酷的 CNodeMD

Screen Shot 2015-10-12 at 12.40.02 AM.png

升级版

照着教程做了一遍很简单,容易上手,真是不错的工具

背景 img link script的 路径提示 还没有吗

@yuu2lee4 ?什么意思?

@yuu2lee4 目前不支持,可以给官方提个issue

怎么让语法检查器支持es6的语法呢?

@alonprince 要支持es6的话,需要在项目下建一个jsconfig.json,内容为

{
	"compilerOptions":{
		"target":"ES6",
		"module":"commonjs"
		}
}

嫌麻烦的话可以安装下我写的模块jsf,通过命令行来生成该文件

npm install jsf -g
jsf

DEBUG 有个 attach 选项, 用“–debug-brk”, 也可以调试 比如调试mocha的测试, 不是直接node xxx.js 可以这样: mocha –debug-brk xxxxx.js, 然后debug

还有个好处 刚接触VSCODE的朋友,完全不用里配置, 直接终端 node --debug-brk xxxx.js, 选’attach’,点debug

貌似还可以远程

untitled1.png

完全可以不用 inspector了

@bluenaux 对的,不过很多人搞不定

@hellopao 已经提了 暂时还是用回brackets

以上问题已经更新到faq了

http://i5ting.github.io/vsc/#116

感谢 @hellopao

这玩意儿跟atom差不多吧,现在在用atom,感觉还可以

大姨妈来了,更新到v0.9.1了。

@i5ting atom要看网络和电脑配置!

@i5ting 慢?我感觉还好,现在的电脑配置应该不会太差。vsc也是用的node开发的吧

@WilliamDu1981 VSC怎么会用node开发的呢?

@xiaxiaokang 自己看package.json去

@WilliamDu1981 atom和gulp watch结合会有bug,速度也比vsc差非常多

Workbench主菜单快捷键

熟悉mac的都知道folder里的cmd+1|2|3|4切换文件夹显示,其实我们也可以使用类似的快捷键来提高工作效率

	{ "key": "cmd+1",           "command": "workbench.view.explorer" },
	{ "key": "cmd+2",           "command": "workbench.view.search" },
	{ "key": "cmd+3",           "command": "workbench.view.git" },
	{ "key": "cmd+4",           "command": "workbench.view.debug" }

爽歪歪~~

文档已经更新

mac下ctrl + -shift+ctrl + -切换当前working files还是很爽的

我的玩法(常用快捷键)

  • ctrl + command + f 放大到全屏
  • 设置Workbench主菜单快捷键,然后就有了command + 1到4的快捷键,快速切换
  • command + b 显示或隐藏(奇数次和偶数次)二级菜单,让可视区更大
  • 可视区内command + \ 新建编辑窗口(尤其是markdown里面,一个编写,一个预览shift + command + v
  • 可视区内command + w 关闭编辑窗口
  • command + p 快速打开文件
  • 使用ctrl + -或者shift + ctrl + -切换working files
  • 当前文档里搜索 command + -
  • 所有文档里搜索 shift + command + -

快速定位到函数声明出,貌似没有这个功能,F12貌似不行,还有查询某一个函数在哪些地方调用了,好像也没有。

@imhered 全局查找吧

@imhered 目前才0.9.2,还不够智能

编辑器还是相当不错的

一个东西,只要习惯,就是好用

@i5ting vsc怎么全局查找?好像只有在当前页面查找啊。

文章中讲了,workbench的第二个菜单,search里就是全局的

@hellopao 必须要有这个文件么?可以不需要么?

来自炫酷的 CNodeMD 越来越喜欢material design😁

@XGHeaven 必须要。不然你的js文件里会一片红,而且用不了tsd的智能提示。

@hellopao 这样的,可惜最近没有什么项目需要用vcs来写,更多的还是ws

来自炫酷的 CNodeMD 越来越喜欢material design😁

webstorm+vim已经够用了。。。

@i5ting vsc怎么支持jsx?

不仅开源,而且插件系统也正式开放啦 +1

@liaosong 后缀名为“jsx",或者你把语言设为"javascript react"

@bluenaux 已经更新到FAQ里,O(∩_∩)O谢谢

http://i5ting.github.io/vsc/#11804

不支持windows Xp,和win server 2003, 谁能用开源的代码build出一个版本来?或者怎么自己Build出来?

atom卡顿现象始终不能解决,我也转移到vsc了

感谢楼主分享

@i5ting for win8 和10的,不行。它的system requirement( https://code.visualstudio.com/docs/supporting/requirements )里讲过的,也试过,不行…

哈哈,要逆天了。。。

https://github.com/Microsoft/vscode-go

完美支持go

到底和ws比如何? 自豪地采用 CNodeJS ionic

@klausgao VSCode can compete with them with much better Typescript support (and it will be very popular consider Angular 2 is comming) but only if it will give developers what they use now as a basic functionality.

@jaylinWang 什么卡顿,issue呢?

@reverland 我是在windows下使用,偶尔会出现卡死的现象,但是未能找到原因

http://blogs.msdn.com/b/vscode/archive/2015/11/17/announcing-visual-studio-code-beta.aspx

最新声明

  • Extensibility [Plug-in] Support in VS Code
  • Extension Marketplace/Gallery
  • Extensions Ready to try Now
  • VS Code is Open Sourced
  • VS Code November Release - Features
  • What’s next for VS Code

VS Code November Update – Features

While the majority of focus has been on extensibility support and open sourcing the project it would not be an update to VS Code if we did not also add additional core features.

  • Extension SDK: With the code yeoman generator you can quickly scaffold a new extension, open it in VS Code, and press F5 to run and debug your code
  • Debugging: Streamlined experiences for adding watches, launch configurations for different runtimes, and better visualizations of errors and warnings
  • Languages: Improved support for consuming the latest TypeScript compilers, PHP now uses PHP-L for linting, and better theme support for many languages with additional colorization tokens
  • Snippets: VS Code can now consume snippets from TextMate bundles

这帮人竟然在vsc里玩推特,https://github.com/austin-----/vscode-twitter

还是用 Emacs

支持vim了https://marketplace.visualstudio.com/items/vscodevim.vim

我想问问 多行注释快捷键是什么?

我写typescript的话,如何隐藏生成的同名.js文件呢?

更新

扩展 http://i5ting.github.io/vsc/#119

  • vscode-react-native
  • vscode-go

调试协议 http://i5ting.github.io/vsc/#120

支持折叠 http://i5ting.github.io/vsc/#12103

目前微软已经创建了1.0的tag,估计发布不远了

1.0.0 简直令人崩溃,中文环境下居然把命令改成了中文。。。。而且语言设置是全局的,改回英文的时候,其他地方又成了英文

@wk472150269 不会吧。。。可能是我一直用英文,没测出这个问题

更新:使用typings替代tsd,和jsconfig.json

1.1.0 (April 2016)

The April 1.1.0 release is our first monthly release after announcing 1.0. We have been overwhelmed by the positive response to that release and the excitement in the community for VS Code and the rapidly growing ecosystem of new languages and extensions.

Keeping to our monthly release cadence, we’ve put together a nice selection of new features and fixes in April. We hope you enjoy it.

Here is an overview of some of the updates contained in this release:

主要改进点:

  • 双击编辑器可以改变大小
  • 调试性能提升和对Node.js更好的支持
  • 外部shell调用配置

扩展作者会尤其喜欢这个版本,理由如下:

  • 更新了语言Server协议
  • 增加调试适配器测试支持
  • 增加非常多的新的API,如打开文件夹,增加JSON模式验证,调试时操作

竟然有Visual design for editor tabs,哇哈哈又一个被诟病的点消失了。。。。

分享一种修改侧边栏主题的方法: https://github.com/wangchi/vscode-color-theme-extension 预览: solarized-dark.png

@wangchi O(∩_∩)O谢谢啊

@i5ting Visual design for editor tabs 怎么弄出来的?更新后没有啊!

再加一个,直接在Terminal中打开vsc,Running VS Code on OS X 神好用。😏

@JerryC8080 新版里已经加了的,此处不是最新的,看github

大神,我想问个问题,你培训一个人收费99元,但是有可能花的时间不止1个小时,按你的能力1个小时能挣的肯定不止99,我想问问你是出于什么目的的,因为我最近也在考虑是不是要搞个培训

@haichongsihao 为了remote而作的尝试,哈哈

@i5ting 死活打不开,执行路径配置的是用的 brew 安装的 vim7.4的路径。 用的 zsh + iterm ,顺便把 terminal 也打开了。 执行 openvim没有看到iterm或terminal有任何反应,虽然vsc的目录中多了一个.swap文件。

@honger05 好神奇啊,不敢相信

亲,如何在资源管理器中同时显示多个项目列表啊?在哪里设置啊?

我目前只能显示一个项目,我的版本是最新的1.10.2

code命令的时候,执行的位置可以是上一级目录啊,也可以打开folder的时候自己选的

回到顶部