-
Notifications
You must be signed in to change notification settings - Fork 5k
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
帮你高效使用 VS Code 的秘诀 #5757
Conversation
帮你高效使用 VS Code 的秘诀
校对认领 |
@hzdaqo 好的呢 🍺 |
@fanyijihua 校对认领 |
@xionglong58 妥妥哒 🍻 |
There was a problem hiding this 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开发工作有莫大帮助。 |
There was a problem hiding this comment.
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 精心优化了设置页面的界面,但本文出于便于分享的目的,将不使用该界面,而是以键值对的形式展现。 |
There was a problem hiding this comment.
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 文件。 |
There was a problem hiding this comment.
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. | ||
这个设置项似乎很基础,但并不代表它不重要。你看代码的时间会很长,所以你还是花点时间选一款让眼睛舒适的主题吧,这也能让代码看起来更帅气。 |
There was a problem hiding this comment.
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 高对比度版本。这些年我试用过很多主题,最终还是钟爱这一款。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
||
Quick tip: You can change Material Theme accent color by searching „accent“ in command palette. | ||
快速提示:你可以通过在命令行面板中搜索“accent”,来更改 Material 主题的高亮色。 |
There was a problem hiding this comment.
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: | ||
让光标移动时带有小动画,这样让我们的目光很容易追随到它: |
There was a problem hiding this comment.
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 | ||
### 祛除尾部空格 |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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 | |||
### 隐藏底栏的状态笑脸 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
『隐藏底栏的状态笑脸』=>『隐藏底部状态栏的反馈笑脸图标』
@hzdaqo 校对好赞,辛苦了 |
There was a problem hiding this 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)!我刚刚说过它是免费的吧? |
There was a problem hiding this comment.
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”之争的哪一边,你都可以像这样设置: |
There was a problem hiding this comment.
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”之争的哪一边,你都可以像这样设置: |
There was a problem hiding this comment.
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”之争的哪一边,你都可以像这样设置: |
There was a problem hiding this comment.
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” 之争的哪一边,]
感谢两位译者的认真和耐心,辛苦了!@hzdaqo @xionglong58
@@ -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) | |||
> * 校对者: |
There was a problem hiding this comment.
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),而我个人最常用的配置是这样的: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
`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)。 | |||
|
|||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这几行是为什么加的呢?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
抱歉,是从编辑器复制时带过来的。以后一定仔细检查。
@baddyo 已经 merge 啦~ 快快麻溜发布到掘金然后给我发下链接,方便及时添加积分哟。 掘金翻译计划有自己的知乎专栏,你也可以投稿哈,推荐使用一个好用的插件。 |
@leviding 文章已在掘金发布:https://juejin.im/post/5cd8fcedf265da03761eaa45 谢谢。 |
帮你高效使用 VS Code 的秘诀
译文翻译完成,resolve #5750