я тут написал макрос для VS.NET, чтоб оборачивать элементы в jQuery, приводя их в нормальный вид из «привет 90х». может кому тоже пригодится.
Private Sub Wrap(ByVal prefix, ByVal sufix)
Dim t As EnvDTE.TextSelection = DTE.ActiveDocument.Selection
If t.Text.Length = 0 Then
t.WordLeft()
t.WordRight(True)
End If
t.Text = prefix & t.Text.Trim & sufix
End Sub
Public Sub Wrap_jQuery() ' hotkey Alt+J
'оборачиваем obj в $('#obj')
Wrap("$('#", "')")
End Sub
Public Sub Wrap_e() ' hotkey Alt+E
'в js скрипт: function $e(name) { return typeof (name) === 'string' ? document.getElementById(name) : name; }
Wrap("$e('", "')")
End Sub