CamelHumps
CamelHumps is a feature that identifies parts of compound names composed according to CamelCase, where each part starts with a capital letter, or when parts of a compound name are separated by underscores. You can type only initial letters of these parts; ReSharper will find items with matching names automatically.
In this topic:
CamelHumps in search commands
CamelHumps always works in all
Navigation by Name
commands, namely
Go to Everything/Type,
Go to File,
Go to File Member,
and
Go to Symbol.
It is very convenient to type initial letters of name parts and get the list of matching items:
CamelHumps in editor assistance actions
CamelHumps can also work for Extend/Shrink Selection and typing assistance commands that ReSharper overrides in Visual Studio:
To enable CamelHumps in typing assistance actions
- On the main menu, choose .
- Go to the Environment | Editor | Editor Behavior options page.
- Use the Use CamelHumps check box to toggle CamelHumps support in typing assistance features.
- Click Save to apply the modifications and let ReSharper choose where to save them, or save the modifications to a specific settings layer using the Save To drop-down list. For more information, see Managing and Sharing ReSharper Settings.
If the CamelHumps is enabled here, the Next/Previous Word command works in a slightly different way. When you press Ctrl+Right/Left,Arrow, the caret moves to the next/previous character that separates parts of a compound name in the current word, and only after the last part in word, it moves on to the next/previous word.
If the CamelHumps is enabled,
the Extend/Shrink Selection commands take into account parts of compound names.
Suppose you have placed the caret in the middle of a compound name
with several parts that begin with uppercase letters:
CamelHumps in code completion
By default, CamelHumps support is also enabled in Code Completion features. I.e., you can start typing a CamelCase abbreviation of a symbol and the completion pop-up will display matched items. If necessary, you can disable this behavior.
To change the way code completion filtering works with CamelHumps
- On the main menu, choose .
- Go to the Environment | IntelliSense | Completion Behavior page.
- Use the Match middle of the identifiers check box to toggle CamelHumps support for completion features.
- Click Save to apply the modifications and let ReSharper choose where to save them, or save the modifications to a specific settings layer using the Save To drop-down list. For more information, see Managing and Sharing ReSharper Settings.
This feature is supported in the following languages/technologies:
C# | VB.NET | C++ | HTML | ASPX | Razor | JavaScript | TypeScript | CSS | XML | XAML | RESX | Build Scripts | Protobuf | JSON |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
The instructions and examples given here address the use of the feature in C#. For details specific to other languages, see corresponding topics in the ReSharper by Language section.