使 Intellisense 在成员函数中列出成员变量而无需键入 'this'
Make Intellisense list member variables within a member function without typing 'this'
在实现 C++ class 成员函数时,是否可以(使用键盘快捷键)使 Intellisense 仅列出成员变量而无需键入 'this->'?
我使用的编码风格用 _ 后缀标记成员变量,因此我无法通过键入 m_ 或 _ 来过滤成员变量。
Is it possible (using a keyboard shortcut) to make Intellisense list
only the member variables without having to type 'this->'?
抱歉,答案是否定的。据我所知,目前 VS 本身不支持这种行为。我们无法使用键盘快捷键显示成员变量列表。去 Tools menu => Options => Text Editor => C/C++ => Advanced
,然后你可以在那里获得关于 C++ 的 Intellisense 设置。
但是设置中没有提供通过快捷键显示成员列表的功能。要让智能感知只显示成员变量,需要输入this->
。或者您必须输入 关键字 来过滤列表。
marks member variables with a _ postfix, so I cannot filter member
variables by typing m_ or _.
您的成员变量的格式是什么,例如 _variable
或 variable_
,您可以键入 va
以获得这样的过滤列表:
另外:
如果您对此功能有独特的需求,请随时 post 在 DeveloperCommunity. If it gets enough points, this feature would be considered by the team. Also, you can have a look at the extensions in VS marketplace 中提出您对 VS 的功能请求,您可以检查是否存在一个扩展来实现您想要的行为。希望对您有所帮助:)
在实现 C++ class 成员函数时,是否可以(使用键盘快捷键)使 Intellisense 仅列出成员变量而无需键入 'this->'?
我使用的编码风格用 _ 后缀标记成员变量,因此我无法通过键入 m_ 或 _ 来过滤成员变量。
Is it possible (using a keyboard shortcut) to make Intellisense list only the member variables without having to type 'this->'?
抱歉,答案是否定的。据我所知,目前 VS 本身不支持这种行为。我们无法使用键盘快捷键显示成员变量列表。去 Tools menu => Options => Text Editor => C/C++ => Advanced
,然后你可以在那里获得关于 C++ 的 Intellisense 设置。
但是设置中没有提供通过快捷键显示成员列表的功能。要让智能感知只显示成员变量,需要输入this->
。或者您必须输入 关键字 来过滤列表。
marks member variables with a _ postfix, so I cannot filter member variables by typing m_ or _.
您的成员变量的格式是什么,例如 _variable
或 variable_
,您可以键入 va
以获得这样的过滤列表:
另外: 如果您对此功能有独特的需求,请随时 post 在 DeveloperCommunity. If it gets enough points, this feature would be considered by the team. Also, you can have a look at the extensions in VS marketplace 中提出您对 VS 的功能请求,您可以检查是否存在一个扩展来实现您想要的行为。希望对您有所帮助:)