Menu

Auto-complete text and default header problem

2008-10-09
2012-11-13
  • Myname Noname

    Myname Noname - 2008-10-09

    I was trying to set or to find these 2 functions in notepad++ :

    1. Auto-completing TAGS, BRACKETS and FUNCTIONS.
    Examples:
    a) When I write first bracket < it will automatically complete it to <> . And the same with " and " " .
    b) When I write tag <b> it will autamticaly write tag </b> at the end.
    c) When I push CTRL+B, CTRL+I, CTRL+U... it will automaticaly add tag <b></b> , <i> </i> and <u></u>
    d) When I write in table "cell" it will automaticaly show me the list with cellpadding and cellspacing. I think realy AUTOMATICALY, not with CTRL+SPACE.

    2. DEFAULT HEADERS.
    Examples:
    a) When I create new document and save it as html, notepad++ should to add default xhtml header which I can edit somewhere...

    These 2 function are missing in notepad++ for me. I couldn't find them in settings or in plugins. Thank you.

     
    • Airdrik

      Airdrik - 2008-10-24

      For auto-closing of html tags (adding </tag> after you type the closing '>' of <tag>), the TextFX plugin and the XML Tools plugin both have settings to enable auto-closing of tags (don't enable both, or you will get the closing tag added twice). 
      Enabling both auto-closing of '<'s and of html tags becomes more complicated, since the auto-closing of the <> automatically inserts the symbol which initiates the auto-closing of the tag. 

      For the autocompletion of available html tags, I'm rather surprised to find that the appripriate api files haven't already been made.  So, you need to create the appropirate api files in <NP++Install Dir>\plugins\APIs, then under Settings -> Preferences -> Backup/Auto-completion, check "Enable Auto-completion on each input" and "Function completion", and set the number in "From ? th characters" to 1.

      I'm not sure if you can include the '<' and '>' characters in the api files, you should do some playing around with variations on those settings to see what works best.  And, please let us know how things go. 

       
    • Daniel Spawn

      Daniel Spawn - 2008-10-09

      1) Menu TextFX -> TextFX Settings -> AutoClose Brace / Tags will do most of the job
      Then, the CTRL+B / etc stuff, you can do it several ways: recording a macro and setting those shortcuts, or you could use the QuickText plugin, and use B + (Ctrl+Enter) for Bold and so on...

      2) For this you can use QuickText plugin too...

       
    • Steven Mulvenna

      Steven Mulvenna - 2008-10-23

      i don;t understand how you get npp to help you along with the tag completion...

      i want when i (in a html doc) type < for the whole list of potential tags to appear and as i type, that list to reduce until it is short enough to use the arrows. Then when i press return followed SPACE the selection is used then a complete list of potential attributes to appear after the main tag, therefore reducing my input massivly, and reminding me of any attributes that i may have forgotten about.

      I have in the past used HTML editors that do it very well, but i think multilingual support of notepad++ would be better for me in the long run, as long as i can get it working!

      also is there a way to get better support for html tags when writing php, as html comes up quite a lot in my php programming.

      Cheers

      Ste