views:

58

answers:

2

I spent a fair bit of time developing Rails apps in VIM with an amazing plugin called Rails.Vim

Whenever I wanted to navigate to a Model I would hit:

esc :Rmodel topic[enter] to find the topic model.

In this mode tab completion works so I could hit :Rmo[tab] to[tab][enter]

(for an added bonus :RSmodel topic[enter] would split the window and open the model in the split

Or :RTmodel topic[enter] would open it in a new tab)

Similar shortcuts exist for navigation to javascript, css, views, helpers, controllers and so on.

Is there a similar plugin for Visual Studio 2010 that would allow me to approximate this kind of behavior, allowing me to navigate my MVC project with keyboard shortcuts only?

+3  A: 

To navigate to a method/class/type definition that is visible on your current screen (I.E. the method/class/type is properly being used in a piece of code you're viewing), place your cursor on it and hit F12.

To navigate to a class/method/property/field etc. anywhere in your project, press CTRL + , then start typing to search for it. The results will auto filter.

The CTRL + , search uses the same new search standards as IntelliSense in 2010. So typing MSA in the search will return MailServerAddress etc.

I'm not sure there exists anything beyond the normal search functionality for CSS/JS/Views.

Update

CTRL + , Does indeed filter by file names. So searching for views by file name works.

Baddie
Remember that in VS2010 the Ctrl+, dialog works with Pascal casing so if searching for MyModelClass all you need to type is MMC (must be in caps for this to work)
ridecar2
@ridecar2 - just edited my answer to reflect this.
Baddie
Is there a way to restrict ctrl + , so it only includes files?
Sam Saffron
A: 

You should try the combination [Ctrl] + [,]. It opens a search box that lets you search for classes, files, methods, etc.

marcind