如何使光标跳到一行的最后一个字符? [英] How do I get my cursor to jump to the last character on a line?

查看:67
本文介绍了如何使光标跳到一行的最后一个字符?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这个问题并不总是存在,我在VS或ReSharper中找不到更正它的选项,但是当我使用鼠标将光标放在短代码行上时,我将光标放在结尾附近行中的空格,它留在那里,而不是跳回行上的最后一个字符.

This problem has not always been around, and I can find no option in VS or ReSharper to correct it, but when I use the mouse to place the cursor on a shortish line of code, and I place the cursor near the end of the line, in whitespace, it stays there, instead of jumping back to the last character on the line.

推荐答案

您可以在Visual Studio中取消选中 Texteditor->所有语言->常规->启用虚拟空间选项.这样,当您单击行末空白区域中的任意位置时,光标将始终位于行的最后一个字符处.

You can uncheck the option Texteditor -> All Languages -> General -> Enable virtual space in Visual Studio. This way your cursor will always be placed at the last character of a line when you click anywhere in the whitespace area at the end of a line.

但是请注意,如果您的行以您实际键入的空格 结尾,则会将光标放置在该行的最后一个实际空格之后.使用 Ctrl +向左键跳转到该行的最后一个实际字符.

Note however if your line ends with whitespaces you actually typed in, it will place the cursor after the last actual whitespace of that line. Use Ctrl + Left Arrow to jump to the last actual character of that line.

您可以使用 Alt +退格快速删除一行末尾的所有空格.

You can use Alt + Backspace to quickly delete all whitespaces at the end of a line.

这篇关于如何使光标跳到一行的最后一个字符?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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