VS可以配置为在文本剪切后自动删除空行吗?

发布于 2024-07-06 05:06:52 字数 368 浏览 5 评论 0原文

有没有办法(或快捷方式)告诉 VS 2008 它会像这样剪切一行:

之前:

Some Text here  
This gets cut  
Some Code there

之后:

Some Text here

Some Code there

我想要的:

Some Text here  
Some Code there  

PS :我不想选择整行或类似的内容...只选择我想要剪切的文本。

Is there a way (or shortcut) to tell VS 2008 that it cuts a line like this:

Before:

Some Text here  
This gets cut  
Some Code there

After:

Some Text here

Some Code there

What I want:

Some Text here  
Some Code there  

PS: I don't want to select the whole line or something like this... only the text I want to cut.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

往日 2024-07-13 05:06:52

除非我误解了你的意思:
只需将光标放在要剪切的行上(不选择)并按 Ctrl + x。 这会剪切该行(不留空白)并将文本放入剪贴板中。 (在 MS VC# 2008 Express 中测试,据我所知,没有任何其他设置)

这是您想要的吗?

Unless I misunderstood you:
Just place cursor on the line you want to cut (no selection) and press Ctrl + x. That cuts the line (leaving no blanks) and puts the text in the Clipboard. (tested in MS VC# 2008 Express with no additional settings I'm aware of)

Is that what you want?

请持续率性 2024-07-13 05:06:52

Shift+Delete 也有效。
选择一行并按 Shift-Delete 键,它将删除该行并将其放置在剪贴板中。

Shift+Delete also works.
Select a line and hit Shift-Delete it will remove the line and place that line in your clipboard.

奶气 2024-07-13 05:06:52

不要选择任何内容,只需在光标位于该行时按 ctrl+x 即可。

Don't select anything, just hit ctrl+x when the cursor is on the line.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文