Scrolling through Visual Studio Intellisense list

2019-01-22 01:37发布

I'm a heavy user of Intellisense in Visual Studio. I'm also a "keep your hands on the keyboard" and "keep them in home position" aficionado, so I'm always looking for ways to keep my hands centered on the ASDF   JKL; keys as much as possible.

Whenever the Intellisense list pops up in Visual Studio, if there are many words in the list that start with the same letters as the word I'm trying to select, typing the first few letters to hone in on my selection doesn't help, since the list won't jump down to my preferred selection until I type enough characters to finally reach the first unique character in the word. It's usually faster to take my right hand off the JKL; keys and reach for the up/down arrow keys to manually scroll through the list.

I'd rather keep my hands centered in home position, and ideally use something like the J and K keys to move up and down in the Intellisense list (similar to how J and K move up and down in Vim...and especially since I use VsVim inside Visual Studio).

The MSDN Intellisense documentation only lists the up/down arrow keys and scrolling (mouse wheel, PgUp/PgDn keys, etc.) as options for doing this: enter image description here


So here are my questions (in order of preference):

  1. Are there any existing keyboard shortcuts in Visual Studio that allow keeping your hands in home position while scrolling the Intellisense list?

  2. Is there any way to custom map keyboard keys (such as J and K) to do the up/down scrolling in the Intellisense list?

  3. Are there any plugins that enable this functionality?

  4. Is there any other way to accomplish this?

4条回答
来,给爷笑一个
2楼-- · 2019-01-22 02:00

I was looking to accomplish the same that Doktorn suggested in Visual Studio Code, so I will put the solution here just in case someone needs the same.

You have to add two new Key bindings in keybindings.json:

[
    { "key": "alt+j",                    "command": "selectPrevSuggestion",
                                         "when": "suggestWidgetVisible" }, 
    { "key": "alt+k",                    "command": "selectNextSuggestion",
                                         "when": "suggestWidgetVisible" }                                                                                 
]
查看更多
够拽才男人
3楼-- · 2019-01-22 02:01

I have remapped CTRL+P to Edit.LineUp and CTRL+N to Edit.LineDown and this works in the Intellisense dropdown. For some reason the Intellisense dropdown dims out when pressing CTRL so it gets kind of hard to see the content in the dropdown. It's not a big problem though, since you can always release CTRL and it will light up again. I mostly use this method when I don't know the name of the method and want to browse for it.

If I know the name or part of the name it is often quicker to just type some of the letters in the method name. If I know for example that the name of the method I want is GetHashCode then I would just type "geh" or "has" or similar since that would be matched by intellisense.

查看更多
淡お忘
4楼-- · 2019-01-22 02:01

I'm not sure which keyboard you prefer to use, but would an option be getting a keyboard with a thumb-accessible scroll wheel? Or something like the Microsoft Natural Ergonomic 4000, which is a pretty great keyboard on its own but has a zoom-slider that's accessible to your index fingers on the home row. With some work you can change the zoom functionality to scrollup and scrolldown.

查看更多
欢心
5楼-- · 2019-01-22 02:14

Go get a used Kinect for $30 and map either a voice command or a head gesture to mouse scroll event. The SDK is really easy to use. You could say if head tilt left scroll up or right scroll down.

SDK http://www.microsoft.com/en-us/kinectforwindows/develop/developer-downloads.aspx

Documentation http://www.microsoft.com/en-us/kinectforwindows/develop/learn.aspx

Example Projects http://channel9.msdn.com/coding4fun/kinect

You're only limited by your imagination.

查看更多
登录 后发表回答