2017-12-18 131 views
0

對於一些用戶來說,包括我,似乎在Visual Studio 2017年(也許只有企業版)的快捷Alt鍵 + /不起作用。的Visual Studio 2017年企業 - 將選定行向上/向下快捷鍵不能正常工作

如果你去Edit -> Advanced -> Move Selected Lines Up/Down你可以看到快捷方式是否存在。

enter image description here

如果我去Tools -> Options... -> Environment -> Keyboard -> Edit.MoveSelectedLinesUp/Edit.MoveSelectedLinesDown和分配Alt鍵 + /一切看起來從編輯觀點不錯。但是,當我使用快捷方式時,Visual Studio會在文件中的類和方法之間跳轉,而不是移動該行。如果我從菜單中點擊Move Selected Lines Up/Down,則功能按預期工作。爲什麼是這樣?

enter image description here

https://developercommunity.visualstudio.com/content/problem/50611/move-line-updown-shortcut-doesnt-work.html

+0

我看到你安裝了Resharper。我的賭注是某種鍵綁定衝突。 – Crowcoder

+0

@Crowcoder我有'ReSharper'設置爲Visual Studio鍵盤方案。根據文檔,它不應該從VS功能中竊取任何鍵盤綁定。 – Ogglas

+0

嘗試禁用Resharper並查看它是如何工作的。 – Crowcoder

回答

1

正如@Crowcoder ReSharper評論似乎是罪魁禍首。使用命令按Ctrl ++ Alt鍵+/作品。然而,通過Tools -> Options... -> ReSharper Ultimate -> Suspend掛起ReSharper,即使重新啓動VS並掛起該功能,正常的命令仍然不起作用。看來ReSharper必須被卸載才能使該功能再次運行。

enter image description here