Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is there a way to have this feature in Notepad++:

  1. select some text
  2. insert an html <tag>``</tag> around it (ie. <strong>, <em> etc)
share|improve this question
    
Do you want to achieve this with a predefined set of HTML tags or with a dialog box? –  sudo Jul 25 '12 at 3:42
    
Would be from a predefined set of tags. But I found this plugin that does exactly what I want - Webedit. It's in the Plugin Manager. Just installed it and it creates several little buttons in the toolbar, each button for each tag, the most common ones, now I select the text, click the corresponding button and it wraps the tag around the selected text, just perfect. I think it's configurable too. –  thom Jul 25 '12 at 4:52
1  
If you solved the problem yourself, you can post an answer to your question and accept it. Others might benefit from it. –  sudo Jul 25 '12 at 11:24
    
surround for Vim is what you actually want. –  nikhil Jul 25 '12 at 19:27

3 Answers 3

up vote 6 down vote accepted

I've found a plugin that does that, Webedit and it's available in Notepad++'s Plugin Manager (Plugins > Plugin Manager > Show Plugin Manager).

share|improve this answer
    
Thank you for the good find. –  blackhawk Aug 14 at 14:29

There's three ways to do this


Using the fingertext plugin

  1. install "FingerText" plugin. (tested 0.5.60 version).
  2. download finger text snippet.
  3. select text, press alt+/.
  4. for example type b (you can create your own "snippet tag" later).
    Notes: some version notepad++ must edit:
    $[![]!] to $[![(key)SELECTION]!]
  5. press tab or enter

  1. You can install any of this:

  2. select text, found and click menu "wrap with abbreviation".

  3. type your tag
  4. press Ok

Using multiple edit steps:

  1. Preparation step

    • click "Setting" > "Preferences" menu.
    • click Editing tab.
    • check "Enable (Ctrl+Mouse click/selection)" in "Multi Editing Settings" groupbox
  2. Execute this step

    1. Click before text, Ctrl+Click after text, like this:

      ` click here  `   text    Ctrl+` click here `
      
    2. Typing whatever <tag>, will be around like this:

      <tag>text<tag>

    3. Press Ctrl+ twice, and type /

share|improve this answer
    
You can and should consolidate all 3 posts into one answer, actually –  Journeyman Geek Nov 21 '12 at 1:50

From a related question

Try going into TextFX / TextFX Settings and check 'auto close XHTML tags'. This makes it work in plain HTML files too. You may need to install it if using a newer version of Notepad++

Click Plugins > Plugin Manager > Show Plugin Manager On the "available" tab check the box by "TextFX Characters" Click Install Restart Notepad++ Enable the auto-close XHTM features as described above.

Is this what you had in mind?

share|improve this answer
    
Not really, the "auto close HTML tags" is good while you're typing but not if the text is already there and you want to enclose it within html tags. I'm looking for something that enables me to select the text, then use some kind of shortcut and the selected text gets enclosed within an html tag –  thom Jul 25 '12 at 2:54

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.