Skip to content

sergey-rybalkin/Emmet.net

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Emmet.net - Emmet for Microsoft Visual Studio

Build status

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.

Download

Precompiled version can be downloaded from VSIX Gallery. Simply install downloaded VSIX package and you are good to go.

Version History

Features

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.

Expand Abbreviation (Ctrl+Shift+Alt+X)

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.

Demo

Details

Wrap with Abbreviation (Shift+Alt+W)

Demo

Details

Configuration and Extensions

Configuration settings are available under Tools -> Options -> Emmet section. Restart Visual Studio to apply your changes.

Configuration

Default keyboard shortcuts configuration:

Htkeys

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.

C# mnemonics expansion (experimental, available on Alt+Ins)

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.

Build

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.

About

This project is a MS Visual Studio port of the emmet editor extensions by Sergey Chikuyonok. More information available on http://docs.emmet.io/

Resources

Stars

Watchers

Forks

Packages

No packages published