Macros in SQL Server Management Studio

前端 未结 6 761
别那么骄傲
别那么骄傲 2021-02-07 04:47

Is there any way to implement text editing macros in SSMS? I would, e.g. like to convert the the code as shown below, but with a key-press, not a long-winded regex search and r

6条回答
  •  南旧
    南旧 (楼主)
    2021-02-07 05:30

    What about an AutoHotKey script?

    Depending on the complexity of your templates, you could either

    1. use AutoHotKey to play back the keystrokes needed for the regex search and replace, or
    2. copy the template to the clipboard and manipulate it directly within AutoHotKey before pasting it back.

    I'm sure the first option will work. I've not tried the second.

    This question gives an indication of how an AutoHotKey script can be written to listen for keyboard chords.

提交回复
热议问题