Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
622 views
in Technique[技术] by (71.8m points)

visual-studio - 如何防止Visual Studio自动完成覆盖下一个单词(How to keep Visual Studio autocomplete from overwriting the next word)

I have a very annoying problem in Visual Studio.

(我在Visual Studio中有一个非常烦人的问题。)

(My version is 2010 and I have ReSharper and VsVim installed, but I don't think that matters.) When I go to add text before some code at the beginning of some existing code, autocomplete likes to overwrite some of the existing code.

((我的版本是2010,已经安装了ReSharper和VsVim,但我认为这并不重要。)当我在某些现有代码的开头添加一些代码之前的文本时,自动完成功能会覆盖一些现有代码。)

Take this example code:

(请看以下示例代码:)

初始代码示例

When I begin to insert some code at the beginning of the string.Format :

(当我开始在string.Format的开头插入一些代码时:)

在此处输入图片说明

And then I use Tab to autocomplete, it overwrites string , whereas what I wanted was the autocompleted code to be inserted before string :

(然后我使用Tab来自动完成,它会覆盖string ,而我想要的是将自动完成的代码插入string之前:)

在此处输入图片说明

I don't want it to automatically delete the text after what I am autocompleting.

(我不希望它在我自动完成后自动删除文本。)

If I want the text deleted, I can delete it myself very easily (particularly with VsVim).

(如果我想删除文本,我可以很容易地删除它(尤其是使用VsVim)。)

Is there any way I can prevent this behavior?

(有什么办法可以防止这种行为?)

I find myself working around it all the time.

(我发现自己一直在努力。)

  ask by Keith Pinson translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

尝试使用Enter空格 代替Tab


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...