Menu

Instant insertion of <strong>$1</strong>

2007-07-10
2012-11-13
  • Nobody/Anonymous

    Please give me some clue.

    I want to select a string of text $1 and then press Ctrl+B to instantly add <strong> </strong> around it. How can I configure Notepad++ to do this?

    Thanks a lot!

     
    • MJG

      MJG - 2007-07-15

      You can use a macro for this.

      To define it, first select some text.  Press the record button.  Press ctrl-x "<strong>" ctrl-v "</strong>".  (This cuts the text, types the opening HTML tag, pastes the original text back, and types the closing HTML tag.  Don't type the quotes!)  Press the stop-recording button.

      Now you can select text and play back the macro.  You can save the macro.  Give it a name and assign a hotkey to it.  You may not be able to assign it to ctrl-B when you save it, but you might be able to then use the Shortcut Mapper dialog to change it to ctrl-B.  --Joel