标签: c# visual-studio resharper keyboard-shortcuts
是否可以通过键盘快捷键从编辑器本身中删除Visual Studio中的活动文件,而无需在解决方案资源管理器中进行搜索并用鼠标删除?
这在重构时很有用,例如,如果我有
namespace Test { public static class Class { } }
resharper建议删除未使用的类,但无法删除文件
答案 0 :(得分:2)
在Tools->Options->Projects and Solutions->General中,选中Track Active Item in Solution Explorer。
Tools->Options->Projects and Solutions->General
Track Active Item in Solution Explorer
在编辑器中打开文件时,这将在解决方案资源管理器中突出显示该文件。 使用解决方案资源管理器快捷键 Ctrl + Alt + L ,然后使用Delete或 Shift + < kbd> Del 键删除文件。
Delete