ReSharper provides code analysis for HTML as well. For instance, ReSharper validates HTML code and
underlines obsolete or
non-standard elements and attributes.
ReSharper also detects problems with HTML structure and highlights them with the red underline.
After developing a web application, you deploy it onto a destination server. However, path to source
files in the destination
environment may differ from paths in your local environment, which makes analysing paths difficult. To
make life easier, ReSharper
highlights unknown paths and suggests several quick-fixes:
Click Set path mapping to open the Path mapping dialog where you can create and change path rules. Click Ignore or Substitute to specify what kind of rule it should be. Depending on the choice, type a path that should be ignored or a path that should be substituted and a path that is a substitution.
You can create as many rules as you need and manage them at any time. Open the Visual Studio Properties window for your web project and find the Path mapping property. If some path rules are defined, then its value is Custom, otherwise - Not set. To open the Path mapping dialog, click the nearby button.
Code Completion helps you write code fast and avoid typos. In HTML the following completion features are available:
- completion for tags
- completion for attributes
- completion for CSS classes and identifiers
Examples of Context Actions
Expand empty tag
If you want to add some text inside a tag which is not expanded, then use the following context action.
After applying the context action, the appropriate end tag is added and the caret is placed exactly between start and end tags.
If you have some useless or not required attribute, instead of manually selecting the whole attribute and its value, then deleting them, use this context action.
After applying the context action, the appropriate attribute is removed.
Insert table row
This context action is a very convenient way of inserting rows into a table.
After applying the context action, a new row is inserted.
You can use the Quick Documentation pop-up window to get some useful
information about an element right in the editor. For more information, see
You can easily navigate to an element in the file by clicking it in the File Structure window.
ReSharper provides several
Another way to modify code is