公司最大大力推进Weex的使用,在书写vue代码我更青睐于VSCode,主要是比WebStorm反应更快一些感觉。
有时候我们想在SourceTree管理的项目里用VSCode打开某个文件
可以这样配置

用VSCode打开
/Applications/Visual Studio Code.app/Contents/Resources/app/bin/code
$FILE

有时候我们会有weex项目的仓库
这个时候我就想用VSCode打开文件夹,而不是先打开VSCode然后再打开这个项目文件夹
用VSCode打开
/Applications/Visual Studio Code.app/Contents/Resources/app/bin/code
$REPO
以上配置就能直接打开项目文件夹了

有时候我们并没有克隆一个项目,而是直接下载了一个zip然后解压了一个文件夹,这时候想更快用VSCode打开这个文件夹,或者,有时候我们就想单纯地打开一个vue文件,就用到了自定义右键菜单

automator新建服务

如图配置

on run {input, parameters}
(* Your script goes here *)
set the_application to path to application "Visual Studio Code"
tell application "Finder"
open input using the_application
end tell
return input
end run
可以结合之前关于SourceTree插件的文章:https://www.jianshu.com/p/39d59a412a2e
快速打开文件
ccommand
+ p
隐藏文件列表,切换到边栏模式,ccommand
+ b
网友评论