Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

帮你高效使用 VS Code 的秘诀 #5757

Merged
merged 4 commits into from
May 13, 2019
Merged

帮你高效使用 VS Code 的秘诀 #5757

merged 4 commits into from
May 13, 2019

Conversation

JaxNext
Copy link
Contributor

@JaxNext JaxNext commented May 9, 2019

帮你高效使用 VS Code 的秘诀

译文翻译完成,resolve #5750

帮你高效使用 VS Code 的秘诀
@hqod
Copy link

hqod commented May 10, 2019

校对认领

@fanyijihua
Copy link
Collaborator

@hzdaqo 好的呢 🍺

@xionglong58
Copy link
Contributor

@fanyijihua 校对认领

@fanyijihua
Copy link
Collaborator

@xionglong58 妥妥哒 🍻

Copy link

@hqod hqod left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

翻译较好,排版需注意点小细节。


This is a collection of settings, extensions and shortcuts, that proved especially useful for my job as a web developer.
本文荟萃了一些设置、插件和窍门,它们都对我的Web开发工作有莫大帮助。
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

注意英文两侧空格
『它们都对我的Web开发工作有莫大帮助。』=>『它们都对我的 Web 开发工作有莫大帮助。』


After you open up the settings, you won’t see the raw JSON right away. VSCode has received a nice UI for them lately, but for the purpose of this article it’s easier to share the settings in raw key-value form, so we won’t be using it.
打开设置页面后,你不会直接看到原本的 JSON 文件。VS Code 精心优化了设置页面的界面,但本文出于便于分享的目的,将不使用该界面,而是以键值对的形式展现。
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

『原本的 JSON 文件』=>『源 JSON 文件』


You can access the settings JSON by clicking on the `{ }` icon in the tab bar.
你可以通过点击标签页栏上的 `{ }` 按钮来切换到 JSON 文件。
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

『你可以通过点击标签页栏上的 { } 按钮来切换到 JSON 文件。』=>『你可以通过点击标签栏上的 { } 按钮来打开 JSON 配置文件。』


This might seem basic, but it doesn’t mean it’s not important. You spend a lot of time looking at code, so you might as well spend some time choosing a theme that’s easy on your eyes, and make the code look pretty as well.
这个设置项似乎很基础,但并不代表它不重要。你看代码的时间会很长,所以你还是花点时间选一款让眼睛舒适的主题吧,这也能让代码看起来更帅气。
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

『你看代码的时间会很长,所以你还是花点时间选一款让眼睛舒适的主题吧,这也能让代码看起来更帅气。』
=>
『你有大量的时间在看代码,所以不妨再花点时间选一款让眼睛舒适的主题,这也能让代码看起来更悦目。』


As I’ve already mentioned, I’m using [Material Theme](https://material-theme.site/) Ocean High Contrast variant. I’ve tried many over the years, but settled on this one.
正如上文提到的,我在用 [Material](https://material-theme.site/) 主题的 Ocean 高对比度版本。这些年我试用过很多主题,最终还是钟爱这一款。
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这一句原文中的「Ocean High Contrast」本就是「Material」主题下的名称,建议保留它完整的名称,可以在后面加括号注释中文翻译。
『我在用 Material 主题的 Ocean 高对比度版本。』
=>
『我在用 Material 主题下的 Ocean High Contrast(Ocean 高对比度)。』


Quick tip: You can change Material Theme accent color by searching „accent“ in command palette.
快速提示:你可以通过在命令行面板中搜索“accent”,来更改 Material 主题的高亮色。
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

经咨询 @leviding 关于中英文混排里的标点符号选用英文半角引号还是中文直角引号,其回复「还未确定,保持全文统一即可」,因此全文校对时我统一按英文半角引号注释了。
『搜索“accent”,』=>『搜索 "accent",』


```json
"editor.cursorBlinking": "phase"
```

Also, the cursor is easier to follow, when there’s a slight animation on its movement:
让光标移动时带有小动画,这样让我们的目光很容易追随到它:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

『这样让我们的目光很容易追随到它:』=>『这样让我们的目光更容易追踪到它:』


```json
"files.insertFinalNewline": true
```

### Trim trailing whitespace
### 祛除尾部空格
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

微软译为:『祛除尾部空格』=>『剪裁尾随空格』


It’s a [common practice](https://unix.stackexchange.com/a/18789/315296) to include a new line at the end of your file:
在文件末尾处留出一个空行,这是一个[惯例](https://unix.stackexchange.com/a/18789/315296)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

『在文件末尾处留出一个空行,』=>『在文件末尾处插入一个空行,』

@@ -279,15 +279,15 @@ copy absolute path
}
```

### Hide feedback smiley in the bottom bar
### 隐藏底栏的状态笑脸
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

『隐藏底栏的状态笑脸』=>『隐藏底部状态栏的反馈笑脸图标』

@leviding
Copy link
Member

@hzdaqo 校对好赞,辛苦了

Copy link
Contributor

@xionglong58 xionglong58 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

翻译的很好


The right font can make your code more legible and pleasant to look at. My programming font of choice is [`Fira Code`](https://github.com/tonsky/FiraCode) - a robust & well-made programming font with beautiful ligatures. [Try it](https://github.com/tonsky/FiraCode/wiki/VS-Code-Instructions)! Did I mention it’s free?
合适的字体能让你的代码看起来更清晰优美。我选择的代码字体是 [`Fira Code`](https://github.com/tonsky/FiraCode) —— 一款连字漂亮的精良字体。[快试试吧](https://github.com/tonsky/FiraCode/wiki/VS-Code-Instructions)!我刚刚说过它是免费的吧?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[一款连字漂亮的精良字体]=>[一种强大而制作精良的编程字体,带有漂亮的连字]


Whatever side in “tabs vs spaces” debate you’re on, you can set it up like this:
无论你站在“tabs vs spaces”之争的哪一边,你都可以像这样设置:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[无论你站在“tabs vs spaces”之争的哪一边,]=>[无论你站在 “tabs vs spaces” 之争的哪一边,]


Whatever side in “tabs vs spaces” debate you’re on, you can set it up like this:
无论你站在“tabs vs spaces”之争的哪一边,你都可以像这样设置:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[无论你站在“tabs vs spaces”之争的哪一边,]=>[无论你站在 “tabs vs spaces” 之争的哪一边,]


Whatever side in “tabs vs spaces” debate you’re on, you can set it up like this:
无论你站在“tabs vs spaces”之争的哪一边,你都可以像这样设置:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[无论你站在“tabs vs spaces”之争的哪一边,]=>[无论你站在 “tabs vs spaces” 之争的哪一边,]

@leviding leviding added the enhancement 等待译者修改 label May 12, 2019
感谢两位译者的认真和耐心,辛苦了!@hzdaqo @xionglong58
@leviding leviding added 标注 待管理员 Review and removed enhancement 等待译者修改 labels May 13, 2019
@@ -2,24 +2,24 @@
> * 原文作者:[sudolabs](https://sudolabs.io)
> * 译文出自:[掘金翻译计划](https://github.com/xitu/gold-miner)
> * 本文永久链接:[https://github.com/xitu/gold-miner/blob/master/TODO1/tips-to-use-VSCode-more-efficiently.md](https://github.com/xitu/gold-miner/blob/master/TODO1/tips-to-use-VSCode-more-efficiently.md)
> * 译者:
> * 译者:[Baddyo](https://github.com/Baddyo)
> * 校对者:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

校对者信息需要译者加一下


`jsconfig.json` (among other things ) enables smart go to definition, that works with various module resolution algorithms. In practice - it means that you can now `⌘ click` on various references in your code, and it’ll take you to the definitions of them. I highly recommend you [reading more about it](https://code.visualstudio.com/docs/languages/jsconfig), but this is what I use most of the time:
`jsconfig.json`(连同其他配置一起)实现了“智能跳转到定义处”的功能,此中用到了各种模块解析算法。在实践过程中,你可以对代码中的各种引用使用组合键 `⌘ 点击` ,然后就能跳转到该引用定义之处。我强烈建议你读读[官方文档](https://code.visualstudio.com/docs/languages/jsconfig),而我个人最常用的配置是这样的:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
`jsconfig.json`(连同其他配置一起)实现了“智能跳转到定义处”的功能,此中用到了各种模块解析算法。在实践过程中,你可以对代码中的各种引用使用组合键 `⌘ 点击` ,然后就能跳转到该引用定义之处。我强烈建议你读读[官方文档](https://code.visualstudio.com/docs/languages/jsconfig),而我个人最常用的配置是这样的:
`jsconfig.json`(连同其他配置一起)实现了“智能跳转到定义处”的功能,此中用到了各种模块解析算法。在实践过程中,你可以对代码中的各种引用使用组合键 `⌘ 点击`,然后就能跳转到该引用定义之处。我强烈建议你读读[官方文档](https://code.visualstudio.com/docs/languages/jsconfig),而我个人最常用的配置是这样的:

@@ -324,3 +324,6 @@ copy absolute path
---

> [掘金翻译计划](https://github.com/xitu/gold-miner) 是一个翻译优质互联网技术文章的社区,文章来源为 [掘金](https://juejin.im) 上的英文分享文章。内容覆盖 [Android](https://github.com/xitu/gold-miner#android)、[iOS](https://github.com/xitu/gold-miner#ios)、[前端](https://github.com/xitu/gold-miner#前端)、[后端](https://github.com/xitu/gold-miner#后端)、[区块链](https://github.com/xitu/gold-miner#区块链)、[产品](https://github.com/xitu/gold-miner#产品)、[设计](https://github.com/xitu/gold-miner#设计)、[人工智能](https://github.com/xitu/gold-miner#人工智能)等领域,想要查看更多优质译文请持续关注 [掘金翻译计划](https://github.com/xitu/gold-miner)、[官方微博](http://weibo.com/juejinfanyi)、[知乎专栏](https://zhuanlan.zhihu.com/juejinfanyi)。


Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这几行是为什么加的呢?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

抱歉,是从编辑器复制时带过来的。以后一定仔细检查。

@leviding leviding merged commit 330eb98 into xitu:master May 13, 2019
@leviding
Copy link
Member

@baddyo 已经 merge 啦~ 快快麻溜发布到掘金然后给我发下链接,方便及时添加积分哟。

掘金翻译计划有自己的知乎专栏,你也可以投稿哈,推荐使用一个好用的插件
专栏地址:https://zhuanlan.zhihu.com/juejinfanyi

@leviding leviding added 翻译完成 and removed 标注 待管理员 Review 正在校对 labels May 13, 2019
@JaxNext
Copy link
Contributor Author

JaxNext commented May 13, 2019

@leviding 文章已在掘金发布:https://juejin.im/post/5cd8fcedf265da03761eaa45 谢谢。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

帮你高效使用 VS Code 的秘诀
6 participants