使Visual Studio代码更好-程序员宅基地

技术标签: 算法  python  java  leetcode  

A text editor for a developer is everything. As a programmer, we sit and edit text all day long, every day. We spend most of our time looking at code and finding the best solutions to problems. Reading and writing. Thinking about why this function or that method doesn’t work. Stepping through the code line by line, variable by variable, and squashing bugs left, right and center. The text editor that you choose determines how you’ll be interacting with your code and development environment.

为开发一个文本编辑器就是一切。 作为程序员,我们每天整天坐下来编辑文本。 我们将大部分时间用于查看代码并找到解决问题的最佳方法。 读写。 考虑为什么此功能或该方法不起作用。 逐行,逐变量地逐步遍历代码,并向左,向右和向中心挤压bug。 您选择的文本编辑器确定了如何与代码和开发环境进行交互。

Image for post
Photo by Jon Tyson on Unsplash
乔恩·泰森( Jon Tyson)Unsplash

Now, you can use a traditional text editor like Notepad on Windows, or you can get super fancy and develop in XCode only (because Apple requires Apple for Apple). There is VIM, EMACS, Sublime, Nano, Notepad++, gedit, Ulysses. Graphical, non-graphical, and more. However, many text editors are just that: text editors (who’da thought!), and we as developers need more than something that just stream-edits text to a file.

现在,您可以使用传统的文本编辑器(例如Windows上的记事本),也可以仅使用XCode进行开发(因为Apple需要Apple才能使用Apple )。 有VIM,EMACS,Sublime,Nano,Notepad ++,gedit,Ulysses。 图形,非图形等。 但是,许多文本编辑器就是这样:文本编辑器(真想!),而我们作为开发人员不仅需要将文本流编辑到文件中的内容,还需要更多东西。

Personally, I have stuck with Visual Studio Code (VSC or VSCode). It’s been the go-to editor outside of the command line (of which, I’m a full-blown VIM nut, but that’s another story), and the largest reason is because of all the outstanding extensions! The reason that VSC’s extensions are better is that they are actively maintained by the large community that uses VSC. It’s really the epitome of open-source: the more eyes you have working on the code, the “better” it’s going to be.

就个人而言,我坚持使用Visual Studio Code(VSC或VSCode)。 它是命令行之外的首选编辑器(其中,我是成熟的VIM坚果,但这是另一回事了),最大的原因是因为所有出色的扩展! VSC扩展更好的原因是它们由使用VSC的大型社区actively积极维护。 这确实是开源的缩影:您对代码的投入越多,它就会越“好”。

With this bit of a primer to “more than just a text editor,” let’s talk about some extensions I’ve found to help my workflow and get programming.

在介绍了“不仅仅是文本编辑器”的基础上,让我们谈谈我发现的一些扩展,这些扩展可以帮助我的工作流程并进行编程。

Image for post
Photo by Petr Macháček on Unsplash
PetrMacháčekUnsplash上的 照片

语言支持(Language Support )

Since I know a few languages, I like to program in a few languages. There are a lot of little tricks that can carry cross-syntax (I know it’s a fallacy way of thinking, but I still think there is truth there). Thankfully, for the majority of languages, there is an extension available to turn VSCode into an editor for the language you’re using. Such as:

因为我会几种语言,所以我喜欢用几种语言编程。 有很多小技巧可以带有交叉语法(我知道这是一种谬误的思维方式,但我仍然认为那里存在真理)。 幸运的是,对于大多数语言,都有一个扩展程序可以将VSCode变成您所使用语言的编辑器。 如:

Visual Studio IntelliCode

Visual Studio IntelliCode

This extension will give you the same IntelliSense that you’ll get in Visual Studio. It’s not installed by default (which it should be), so it’s first on my list. This extension covers some languages I have other extensions listed to install, but on this one, I think more the merrier is okay.

此扩展将为您提供与Visual Studio中相同的IntelliSense。 默认情况下未安装(应该安装),因此它是我的第一列表。 该扩展程序涵盖了某些语言,我列出了要安装的其他扩展程序,但是在此语言上,我认为更多的是可以的。

Python

Python

One of my favourite scripting languages. Python is something I take out when I want a script fast, and with fast scripts, we’ll also need some fast language support. You can change which version of Python the extension is using in the bottom right corner of VSCode.

我最喜欢的脚本语言之一。 当我想要快速编写脚本时,我会选择Python,而使用快速编写脚本,我们还需要一些快速语言支持。 您可以在VSCode的右下角更改扩展使用的Python版本。

C/C++

C / C ++

The one’s that really made me fall in love with programming: C/C++. Another extension provided by Microsoft, this will give you support on all your C projects, well except C# but….

真正让我爱上了编程的人:C / C ++。 Microsoft提供的另一个扩展,它将为您提供所有C项目的支持,除了C#之外……。

C#

C#

Look at that, we have a C# extension. It’s also from Microsoft (wow!). If you’re doing anything with Unity or .NET, this is a must extension — on top of the IntelliSense mentioned.

看看,我们有一个C#扩展名。 它也来自微软(哇!)。 如果您要使用Unity或.NET进行任何操作,这是必须扩展的功能-在上述IntelliSense的基础上。

Language Support for Java(TM) by Red Hat

Red Hat对Java(TM)的语言支持

Java runs on, what, 12 million machines? Why not have some support just in case you have to open up that legacy Java project.

Java在1200万台计算机上运行? 为什么不提供一些支持,以防万一您必须打开该旧Java项目。

NPM

NPM

The Node Package Manager. The devil to all things front end. While it’s a necessary evil, using this extension can help you with your package.json file, and gives you a handy side-bar tool to run all your scripts.

节点程序包管理器。 万物前端的魔鬼。 虽然这是必然的恶作剧,但使用此扩展程序可以帮助您处理package.json文件,并为您提供方便的侧边栏工具来运行所有脚本。

Deno

天野

Deno is the next greatest TypeScript runtime. That’s right, JavaScript is getting an upgrade, and a secure one too. Deno was created by the creator of NodeJS, so it’s gotta be good, right?

Deno是次佳的TypeScript运行时。 没错,JavaScript正在升级,安全也在升级。 Deno是由NodeJS的创建者创建的,所以它必须很好,对吗?

YAML

YAML

YAML files are great if you need to store data not in JSON files. I’ve never gone fully into the depths of my search as to one over the other, just that I need to use it here and there so I have this extension sitting around when I open those .yaml or .yml files.

如果您需要不将数据存储在JSON文件中,则YAML文件非常有用。 我从来没有完全深入研究彼此之间的联系,只是我需要在这里和那里使用它,因此当我打开那些.yaml.yml文件时,便有了这个扩展名。

格式化/整理 (Formatting / Linting )

Now, formatting and linting can fall under language support, but there are some extensions made just for formatting and linting languages; and since using them now, I just can’t go back.

现在,格式化和掉毛可以归入语言的支持,但也有格式化和掉毛语言做了一些扩展; 而且既然现在使用它们,我就无法返回。

Bracket Pair Colorizer 2

支架对着色器2

This is one of my favourite extensions (next to IntelliSense). BPC2 just adds that extra *pop* when I’m programming. Especially in Python. When I’m looking to find where the brackets to a function or method meet up, I simply follow the rainbow — literally — to where the pot of bugs is.

这是我最喜欢的扩展之一(IntelliSense旁边)。 BPC2只是在我编程时添加了额外的* pop *。 特别是在Python中。 当我想找到函数或方法的括号的位置时,我只是顺着彩虹—从字面上看—到了bug所在。

Beautify

美化

Beautify is a great code formatter, however, it’s really only great if you’re a front-end developer (as you’ll see in the description of the link).

Beautify是一个很棒的代码格式化程序,但是,只有当您是前端开发人员时,它才真的很棒(如您在链接说明中所见)。

Prettier

更漂亮

I have found Prettier to be the formatter I use most. Again, while it’s mostly useful for front-end devs, I find myself using it whenever Beautify fails me.

我发现Prettier是我使用最多的格式化程序。 再说一次,尽管它对前端开发人员最有用,但是只要Beautify让我失望了,我就会发现自己正在使用它。

EditorConfig for VS Code

VS Code的EditorConfig

EditorConfig is a fantastic project. Re-iterating the beginning of this article, there are so many different editors out there. Let alone operating systems, text formats, etc. There is too much discrepancy in formatting! That’s where a .editorconfig file comes in handy. Most new editors have the ability to read this file in your root project’s folder, and adhere to the formatting rules set there for the project!

EditorConfig是一个很棒的项目。 重新重申本文的开头,那里有许多不同的编辑器。 更不用说操作系统,文本格式等了。格式上的差异太大了! 那就是.editorconfig文件派上用场的地方。 大多数新编辑者都可以在根项目的文件夹中读取此文件,并遵守为项目设置的格式化规则!

ESLint

ESLint

TypeScript officially switched to ESLint last year. Since then, I’ve only used ESLint, and like the rest of the community, I won’t be looking back.

去年,TypeScript正式转换为ESLint。 从那时起,我只使用过ESLint,并且像社区中的其他人一样,我不会回头。

片段 (Snippets )

I don’t use snippets as much as I should. But when I do, I install ones already made for me.

我没有尽可能多地使用摘要。 但是,当我这样做时,我会安装已经为我量身定制的产品。

You can also make snippets of your own.

您也可以制作自己的摘录。

其他有用的工具 (Other Useful Tools )

Couldn’t really think of where else they would go.

真的无法想到他们还会去哪里。

GitLens — Git Supercharged

GitLens —增压的Git

This is a super handy tool for development. While you’re reading over code, the line your cursor is on will show a git-blame on the line, and let you know when it was last updated. This is very handy in team projects.

这是用于开发的超级方便的工具。 在阅读代码时,光标所在的行将在行上显示git-blame,并通知您上次更新的时间。 这在团队项目中非常方便。

TODO Highlighting

TODO突出显示

I use this extension way too much. That said, it helps me track where my task items are in a given file. Not only that, but you can customize and add your own highlights in settings! I use: TODO, NOTE, BUG, REVIEW, TEST for my own notes.

我过多地使用了这种扩展方式。 就是说,这有助于我跟踪任务项在给定文件中的位置。 不仅如此,您还可以自定义并在设置中添加自己的突出显示! 我使用:TODO,NOTE,BUG,REVIEW,TEST作为我自己的笔记。

Debugger for Unity

Unity调试器

Those of you in the game world may have heard about the Unity3d Engine. Well, instead of waiting 8 hours to install Visual Studio, you can install VSCode and this extension in 3 minutes, change your editor preferences in Unity, and away you go!

游戏世界中的那些人可能听说过Unity3d引擎。 好吧,您无需等待8个小时来安装Visual Studio,而是可以在3分钟内安装VSCode和此扩展,在Unity中更改编辑器首选项,然后就不用了!

Docker

码头工人

If you use Docker at all, you may want this extension. Using the Docker extension will give you that little edge of Dockerfile checking as well as, a nifty sidebar tool to help run and manage your Docker containers locally.

如果您完全使用Docker,则可能需要此扩展。 使用Docker扩展将为您提供很少的Dockerfile检查功能,以及一个漂亮的侧边栏工具,可帮助您在本地运行和管理Docker容器。

Auto Comment Block

自动评论块

Comments and documentation are a pain to do, but come in handy any time you step away from a project for a period of time. Those notes are the candle stick in the cave of programming darkness. Take the time to comment right, and with this extension, formatting the comments is a breeze.

注释和文档很辛苦,但是只要您离开项目一段时间,便会派上用场。 这些音符是编程黑暗中的烛台。 花些时间正确评论,使用此扩展程序,格式化注释变得轻而易举。

主题化 (Theming)

Shades of Purple

紫色的阴影

BY FAR my favourite theme for VSCode. I won’t be switching for a while… You just gotta see it for yourself.

BY FAR是我最喜欢的VSCode主题。 我暂时不会切换了……您只需要自己看看即可。

Panda Theme

熊猫主题

My next favourite theme for some of those gloomy days. I really enjoy the simplicity here as well.

在那些令人沮丧的日子里,我的下一个最喜欢的主题是。 我也很喜欢这里的简单性。

vscode-icons

vscode图标

You don’t want to just sit and look at filenames all day do you? NO! Let’s put some nifty icons in VSCode as well, and really make it an experience.

您不想整天坐下来看看文件名吗? 没有! 让我们在VSCode中也放置一些漂亮的图标,并使其真正成为一种体验。

Having these tools in my toolbelt while programming has made my development life much easier, and more colorful. I hope some of you are able to use these extensions to your own benefit. Perhaps you’ll look into more that are an even better fit for your workflow, or you’ll make some amazing extensions of your own! All the power to you, and let’s find or make a shoe that fits!

在编程时将这些工具放在我的工具带中,使我的开发工作更加轻松,而且更加丰富多彩。 我希望你们中的某些人能够使用这些扩展以使自己受益。 也许您会研究更适合您的工作流程的内容,或者对自己的内容进行一些惊人的扩展! 拥有所有的力量,让我们找到或制造适合的鞋子s!

What’s your favourite editor? Is it VSCode? Is it Visual Studio? Sublime? VIM? Are you an EMACS gal? I’m curious to know what you use! Let’s get the discussion going.

您最喜欢的编辑器是? 是VSCode吗? 是Visual Studio吗? 升华? VIM? 您是EMACS加仑吗? 我很好奇您使用的是什么! 让我们开始讨论。

Thanks for taking the time to read. All the best and stay safe — Spencer

感谢您抽出宝贵的时间阅读。 一切顺利并保持安全— Spencer

升级编码 (Level Up Coding)

Thanks for being a part of our community! Subscribe to our YouTube channel or join the Skilled.dev coding interview course.

感谢您加入我们的社区! 订阅我们的YouTube频道或参加Skilled.dev编码面试课程

翻译自: https://levelup.gitconnected.com/making-visual-studio-code-better-e72105809bf2

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/weixin_26711867/article/details/108958453

智能推荐

c# 调用c++ lib静态库_c#调用lib-程序员宅基地

文章浏览阅读2w次,点赞7次,收藏51次。四个步骤1.创建C++ Win32项目动态库dll 2.在Win32项目动态库中添加 外部依赖项 lib头文件和lib库3.导出C接口4.c#调用c++动态库开始你的表演...①创建一个空白的解决方案,在解决方案中添加 Visual C++ , Win32 项目空白解决方案的创建:添加Visual C++ , Win32 项目这......_c#调用lib

deepin/ubuntu安装苹方字体-程序员宅基地

文章浏览阅读4.6k次。苹方字体是苹果系统上的黑体,挺好看的。注重颜值的网站都会使用,例如知乎:font-family: -apple-system, BlinkMacSystemFont, Helvetica Neue, PingFang SC, Microsoft YaHei, Source Han Sans SC, Noto Sans CJK SC, W..._ubuntu pingfang

html表单常见操作汇总_html表单的处理程序有那些-程序员宅基地

文章浏览阅读159次。表单表单概述表单标签表单域按钮控件demo表单标签表单标签基本语法结构<form action="处理数据程序的url地址“ method=”get|post“ name="表单名称”></form><!--action,当提交表单时,向何处发送表单中的数据,地址可以是相对地址也可以是绝对地址--><!--method将表单中的数据传送给服务器处理,get方式直接显示在url地址中,数据可以被缓存,且长度有限制;而post方式数据隐藏传输,_html表单的处理程序有那些

PHP设置谷歌验证器(Google Authenticator)实现操作二步验证_php otp 验证器-程序员宅基地

文章浏览阅读1.2k次。使用说明:开启Google的登陆二步验证(即Google Authenticator服务)后用户登陆时需要输入额外由手机客户端生成的一次性密码。实现Google Authenticator功能需要服务器端和客户端的支持。服务器端负责密钥的生成、验证一次性密码是否正确。客户端记录密钥后生成一次性密码。下载谷歌验证类库文件放到项目合适位置(我这边放在项目Vender下面)https://github.com/PHPGangsta/GoogleAuthenticatorPHP代码示例://引入谷_php otp 验证器

【Python】matplotlib.plot画图横坐标混乱及间隔处理_matplotlib更改横轴间距-程序员宅基地

文章浏览阅读4.3k次,点赞5次,收藏11次。matplotlib.plot画图横坐标混乱及间隔处理_matplotlib更改横轴间距

docker — 容器存储_docker 保存容器-程序员宅基地

文章浏览阅读2.2k次。①Storage driver 处理各镜像层及容器层的处理细节,实现了多层数据的堆叠,为用户 提供了多层数据合并后的统一视图②所有 Storage driver 都使用可堆叠图像层和写时复制(CoW)策略③docker info 命令可查看当系统上的 storage driver主要用于测试目的,不建议用于生成环境。_docker 保存容器

随便推点

网络拓扑结构_网络拓扑csdn-程序员宅基地

文章浏览阅读834次,点赞27次,收藏13次。网络拓扑结构是指计算机网络中各组件(如计算机、服务器、打印机、路由器、交换机等设备)及其连接线路在物理布局或逻辑构型上的排列形式。这种布局不仅描述了设备间的实际物理连接方式,也决定了数据在网络中流动的路径和方式。不同的网络拓扑结构影响着网络的性能、可靠性、可扩展性及管理维护的难易程度。_网络拓扑csdn

JS重写Date函数,兼容IOS系统_date.prototype 将所有 ios-程序员宅基地

文章浏览阅读1.8k次,点赞5次,收藏8次。IOS系统Date的坑要创建一个指定时间的new Date对象时,通常的做法是:new Date("2020-09-21 11:11:00")这行代码在 PC 端和安卓端都是正常的,而在 iOS 端则会提示 Invalid Date 无效日期。在IOS年月日中间的横岗许换成斜杠,也就是new Date("2020/09/21 11:11:00")通常为了兼容IOS的这个坑,需要做一些额外的特殊处理,笔者在开发的时候经常会忘了兼容IOS系统。所以就想试着重写Date函数,一劳永逸,避免每次ne_date.prototype 将所有 ios

如何将EXCEL表导入plsql数据库中-程序员宅基地

文章浏览阅读5.3k次。方法一:用PLSQL Developer工具。 1 在PLSQL Developer的sql window里输入select * from test for update; 2 按F8执行 3 打开锁, 再按一下加号. 鼠标点到第一列的列头,使全列成选中状态,然后粘贴,最后commit提交即可。(前提..._excel导入pl/sql

Git常用命令速查手册-程序员宅基地

文章浏览阅读83次。Git常用命令速查手册1、初始化仓库git init2、将文件添加到仓库git add 文件名 # 将工作区的某个文件添加到暂存区 git add -u # 添加所有被tracked文件中被修改或删除的文件信息到暂存区,不处理untracked的文件git add -A # 添加所有被tracked文件中被修改或删除的文件信息到暂存区,包括untracked的文件...

分享119个ASP.NET源码总有一个是你想要的_千博二手车源码v2023 build 1120-程序员宅基地

文章浏览阅读202次。分享119个ASP.NET源码总有一个是你想要的_千博二手车源码v2023 build 1120

【C++缺省函数】 空类默认产生的6个类成员函数_空类默认产生哪些类成员函数-程序员宅基地

文章浏览阅读1.8k次。版权声明:转载请注明出处 http://blog.csdn.net/irean_lau。目录(?)[+]1、缺省构造函数。2、缺省拷贝构造函数。3、 缺省析构函数。4、缺省赋值运算符。5、缺省取址运算符。6、 缺省取址运算符 const。[cpp] view plain copy_空类默认产生哪些类成员函数

推荐文章

热门文章

相关标签