VisualStudio 2010 中有类似 Eclipse 的 WORD 补全快捷方式吗?
我最近从 Java 开发和 Eclipse IDE 切换到 C# .NET 和 VisualStudio 2010。我真正怀念的是用于单词完成的 Alt + / Eclipse 快捷方式。我不是在谈论 IntelliSense 自动完成的东西。我的意思是,我希望文本编辑器完成编写文档中某处已存在但不会显示在 IntelliSense 中的单词,例如字符串文字。
在 Notepad++ 中,它是 Ctrl + Enter 快捷键。 在 Eclipse 中是前面提到的 Alt + /
VS2010 可以做同样的事情吗?如果不是默认情况下,任何人都可以向我指出一个不错的 VB 宏,我可以将其插入到 VS2010 中来执行此操作吗?
谢谢。
编辑
请注意代码完成(即在大多数IDE/聪明的编辑器中由Ctrl+空格执行)和简单的WORD之间存在差异完成(我正在寻找的)。单词完成不会尝试分析当前上下文,或猜测您可能需要什么类型/方法。它所做的一切都是试图通过环顾光标位置并搜索当前文档中已经出现的相似单词来完成您开始输入的工作。
I have recently switched from Java development and Eclipse IDE to C# .NET and VisualStudio 2010. What I really miss is the Alt + / Eclipse shortcut for word completion. I am NOT speaking about IntelliSense auto completion stuff. I mean, I would like the text editor to finish writing words that already exist somewhere in the document but will not show up in IntelliSense, e.g. string literals.
In Notepad++ it is the Ctrl + Enter shortcut.
In Eclipse it is the aforementioned Alt + /
Can VS2010 do the same? If not by default, can anyone point me to a decent VB macro that I could plug into my VS2010 to do this?
Thank you.
EDIT
Please mind there is a difference between CODE completion (i.e. what in most IDEs/clever editors is performed by Ctrl+Space) and simple WORD completion (what I am looking for). Word completion does not try to analyse the current context, or guess what type/method you might be after. All it does it tries to complete a work you started typing by looking around your cursor location and searching for similar words already occurring in the current document.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
我创建了一个简单的 VS 宏:
将其限制为 alt-space,它对我有用。
什洛米
I've created a simple VS macro:
Bounded it to alt-space and it does the trick for me.
Shlomi
VS2010 可以做同样的事情吗?
默认情况下不可以。
如果不是默认情况下,任何人都可以向我指出一个不错的 VB 宏,我可以将其插入到 VS2010 中来执行此操作吗?
不知道是否存在任何宏。但这可能是一个不错的项目。
Can VS2010 do the same?
No by default.
If not by default, can anyone point me to a decent VB macro that I could plug into my VS2010 to do this?
Don't know any that exists. But this could be a nice project to do.
在 Visual Studio Code (VSC) 中,有一个由 getogrand 提供的扩展“Another Word Completion”。我知道您的问题是关于 Visual Studio 的,但这可能会让其他搜索此内容并最终来到这里的人感兴趣。
是的,很难搜索这个,因为“代码完成”术语更常见。
In Visual Studio Code (VSC) there is an extension, "Another Word Completion" by getogrand. I know your question was regarding Visual Studio, but this may be of interest to others searching for this who wind up here.
Yup, hard to search for this since "code completion" term is more common.
VS2010默认有这个功能:
快捷键:“ALT + 向右键”或“CTRL + 空格键”
工具栏按钮:(由于我是新用户,请手动打开截图图片 https://i.sstatic.net/OyiHY.png)
相关命令对象名称:Edit.CompleteWord(参见:http://msdn.microsoft.com/en-us/library/xte2hh6a %28v=vs.71%29.aspx )
顺便说一句,我使用的是 VS2010 专业版。
VS2010 has that feature by default:
Shortcuts: "ALT + RIGHT ARROW" or "CTRL + SPACEBAR"
Toolbar button: (as I'm a new user, please open the screenshot picture manually at https://i.sstatic.net/OyiHY.png)
Relevant Command Object Name: Edit.CompleteWord (see: http://msdn.microsoft.com/en-us/library/xte2hh6a%28v=vs.71%29.aspx )
BTW, I'm using VS2010 professional.