简体   繁体   English

如何使光标跳到一行的最后一个字符?

[英]How do I get my cursor to jump to the last character on a line?

这个问题并不总是存在,在VS或ReSharper中我找不到任何选项可以纠正它,但是当我使用鼠标将光标放在较短的代码行上时,我将光标放在行尾附近,它留在空白处,而不是跳回到行上的最后一个字符。

You can uncheck the option Texteditor -> All Languages -> General -> Enable virtual space in Visual Studio. 您可以取消选中Texteditor->所有语言->常规->在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. 这样,当您单击行末空白区域中的任意位置时,光标将始终位于行的最后一个字符处。

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. 使用Ctrl +向左键跳到该行的最后一个实际字符。

You can use Alt + Backspace to quickly delete all whitespaces at the end of a line. 您可以使用Alt +退格键快速删除一行末尾的所有空格。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM