如何在 Visual Studio 2019 中自动将分号添加到行尾 [英] How to automatically add semicolon to end of line in Visual Studio 2019

查看:261
本文介绍了如何在 Visual Studio 2019 中自动将分号添加到行尾的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的问题类似于

My question is similar to How to add semicolon to the end of the line in visual studio code, but for Visual Studio 2019. The extensions mentioned in the answers, and others I've been able to find, only work in VS Code or earlier versions of VS it seems.

As @gavin so eloquently put it in that question:

... in vs code, when you write a method call, it automatically closes the open parameter for you and your cursor ended up before the ). Now if you want to write a new statement, you literally have to take your right hand off the jkl; position and click on the end or the right arrow key and then take your right hand back to the jkl; position to type the semicolon. I use shift + enter and it saves me around half a second for each statement to reposition my right hand

解决方案

  1. Install Productivity Power Tools 2017/2019 (if it is not already installed)
  2. Press Shift+Enter to add ";" automatically at end of the line:

这篇关于如何在 Visual Studio 2019 中自动将分号添加到行尾的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆