Rider Help

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; Rider will find items with matching names automatically.

CamelHumps in search commands

CamelHumps always works in all Navigation by Name commands, namely Search Everywhere, 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:

Rider speeds up the search with CamelHumps
You can type either uppercase or lowercase letters:
Rider speeds up the search with CamelHumps

CamelHumps in editor assistance actions

CamelHumps can also work for Extend/Shrink Selection and other typing assistance commands:

  • Caret Move (Ctrl+Right/Ctrl+Left)
  • Caret Move with Selection (Ctrl+Shift+Right/Ctrl+Shift+Left)
  • Select Word at Caret (Ctrl+Alt+Right)
  • Delete to Word Start/End (Ctrl+Backspace and Ctrl+Delete respectively)
  • Double-clicking (if Honor "CamelHumps" word settings when selecting using double click is enabled on the Editor | General settings page).

To enable CamelHumps in typing assistance actions

  1. Press Ctrl+Alt+S, or alternatively choose File | Settings on Windows and Linux or Rider | Preferences on macOS.
  2. Go to the Editor | General | Typing Assistance page of Rider settings.
  3. With the Use CamelHumps check box, toggle CamelHumps support in typing assistance features.
  4. Click Save to apply the modifications and let Rider 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 layer-based settings.

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:

/help/img/dotnet/2017.2/ExtendSelection_CamelHumps_1.png
With CamelHumps, pressing Ctrl+Alt+Right for the first time selects the current part of the word:
/help/img/dotnet/2017.2/ExtendSelection_CamelHumps_2.png
Only after pressing this keystroke for the second time Rider selects the whole word:
/help/img/dotnet/2017.2/ExtendSelection_CamelHumps_3.png
All subsequent presses are processed as usual.

Rider also provides similar actions that work in a mode opposite to the one selected in the Use CamelHumps setting:

  • Move Caret to Previous Word in Different "CamelHumps" mode
  • Move Caret to Previous Word with Selection in Different "CamelHumps" mode
  • Move Caret to Next Word in Different "CamelHumps" mode
  • Move Caret to Next Word with Selection in Different "CamelHumps" mode
  • Delete to Word End in Different "CamelHumps" mode
  • Delete to Word Start in Different "CamelHumps" mode

For example, If Use CamelHumps is enabled, the action Move Caret to Next Word in Different "CamelHumps" mode moves the caret to the end of word regardless of uppercase characters in this word; if Use CamelHumps is disabled, then the caret moves to the next CamelHump within this word.

These actions have no default keyboard shortcuts, and are not included in the menus but you can invoke them from Go to Action (Ctrl+Shift+A):

Alternative actions for CamelHump navigation

You can bind them with the shortcuts of your choice as described in the section Configuring Keyboard Shortcuts.

Last modified: 11 October 2017

See Also