This project is a MS Visual Studio port of Emmet editor extensions created by Sergey Chikuyonok.
More information on the original project is available on Emmet official website.
Precompiled version can be downloaded from VSIX Gallery. Simply install downloaded VSIX package and you are good to go.
Below is the list of actions that are currently implemented in this extension. The rest of them are either natively supported by Visual Studio or exist in either ReSharper or WebEssentials extensions and therefore were not included.
Supported in HTML and CSS-like syntaxes (Razor views, LESS, SCSS). Can be bound to TAB in options. JSX/TSX files require <
(e.g. <div>p>lorem5
) abbreviation prefix to avoid conflicts with JavaScript code.
Configuration settings are available under Tools -> Options -> Emmet section. Restart Visual Studio to apply your changes.
Default keyboard shortcuts configuration:
Emmet.net supports loading custom JavaScript-based preferences, snippets and extensions directly into Emmet engine. All you need is to specify extensions directory in the Emmet configuration section on the Tools -> Options page. Detailed information about writing Emmet extensions and snippets is available here.
Mnemonics are advanced dynamic snippets for C# language that let you quickly generate fields, properties and methods by typing a short abbreviation that defines its accessibility level, return value and other attributes. This implementation is inspired by popular ReSharper extensions ZenSharp and Live Templates.
Mnemonic snippet has the following structure: <accessibility level><modifiers><return value><member type>
.
Accessibility levels:
shortcut | expands to |
---|---|
_ | private |
p | public |
P | protected |
i | internal |
pi | protected internal |
Modifiers:
shortcut | expands to |
---|---|
c | const |
s | static |
v | virtual |
a | abstract |
r | readonly |
Return values:
shortcut | expands to |
---|---|
s | string |
sh | short |
by | byte |
b | bool |
dt | DateTime |
d | double |
i | int |
u | uint |
g | Guid |
de | decimal |
v | void |
Member types:
shortcut | expands to |
---|---|
p | property |
m | method |
f | field |
For example, mnemonic _rif
will generate new private field private readonly int |
. Add ?
to the type abbreviation to expand into nullable type.
Emmet is originally written in JavaScript and Visual Studio cannot run it natively, so this project is using Microsoft ChakraCore engine to execute Emmet code. ChakraCore.dll library is included with source code and other dependencies are managed with NuGet.
Visual Studio 2022 and Visual Studio SDK are required to build the project.