Menu

Unordered Lists in HTML

2007-05-09
2012-11-13
  • Nobody/Anonymous

    I am wondering if this functionality exists in Notepad++:

    I'm working with an HTML document and I type the following:

    one
    two
    three

    Is there something in Notepad++ that allows me to to select those three items, click a button or do a keyboard shortcut, and have the HTML for an unordered list (comprised of those three items) generated for me?

    If not, what might be the best way for me to do this in Notepad++?

    Thanks much.  Great editor!

     
    • Nobody/Anonymous

      Thanks for your really thorough reply.  Much appreciated.  I use HTML-Kit for most of my work now, and will probably just swap out to it when I need to do this.  Thanks again.

       
    • MJG

      MJG - 2007-05-11

      You're welcome.  It's thorough, but I messed up; the start and end macros would work better with "3) Press <Enter>" instead of using the down arrow.

      Not that it matters -- most will use a different tool the way you do.  --Joel

      P.S. Normally I don't acknowledge thanks, not because I am a jerk but because I don't want to distract others with stuff only useful to the original poster.  Since I can't edit my original post, I thought I'd use the space to say that feedback on replies is always welcome.

       
    • MJG

      MJG - 2007-05-09

      Currently it is probably too much work to do it in Notepad++.  You could use an HTML WYSIWYG (what you see is what you get) editor like the open-sourced NVU.  http://www.nvu.com

      There, you'd just select the block of text and click on the "Bulleted list" toolbar button.

      There's others that also do this.

      If you are not a programmer, you might be able to record macros to do this in Notepad++.

      To record a macro:
      1) Click the record button in the toolbar
      2) Perform the operations
      3) Click the stop button
      4) Test your macro by clicking the play button
      5) You can save your macro by selecting the "Macro > Save current recorded macro" menuitem

      One macro starts it:
      1) Press the <Home> key to move the cursor to the left of the line.
      2) Type "<ul>" (without the quotes)
      3) Press the down-arrow button to move to the next line

      One macro is repeated for each line in the list:
      1) Press the <Home> key to move the cursor to the left of the line.
      2) Type " <li>" (without the quotes; space included for formatting)
      3) Press the <End> key
      4) Type "</li>" (without the quotes)
      5) Press the down-arrow button to move to the next line

      One macro ends it:
      1) Press the <Home> key to move the cursor to the left of the line.
      2) Type "</ul>" (without the quotes)
      3) Press the down-arrow button to move to the next line

      I'd recommend just recording the middle macro, and typing the <ul> and </ul> separately.  Then position the cursor on the first item in the list, and execute the middle macro as many times as needed.  --Joel

       
MongoDB Logo MongoDB