insert plugin, a web edition...

2008-03-05
2013-11-06
<< < 1 2 3 4 5 > >> (Page 2 of 5)
  • Nobody/Anonymous

    I mean, if you have any specific suggestions, I might consider them.

     
  • Jon Henderson

    Jon Henderson - 2008-03-07

    i know that the quick text plugin writes and reads from an ini file but it puts it's information in a dialoge box and not a menu.

    Maybe just specify that there is a max of 15 (or whatever) number of template slots available. anything over 15 in the .ini is ignored?

     
  • Alexander Iljin

    Alexander Iljin - 2008-03-08

    NppWebEdit 0.2
    New: Insertion of a pair of tags is undone as a single action.

    Download links:
    http://disk.tom.ru/jud2cmm
    http://rapidshare.de/files/38775074/NppWebEdit0.2.zip.html

    Source-level changes:
    Init procedure: COPY is no longer used for string assignment.
    Added two SCI_ command code constants and two corresponding procedures: BeginUndoAction and EndUndoAction.
    SurroundSelection procedure: added calls to BeginUndoAction and EndUndoAction.

     
  • Jon Henderson

    Jon Henderson - 2008-03-08

    OK, after "studying" the source, could you tell me what the "Win.SendMessage" function is. what does it return? i see 4 arguments but cannot find a good explanation of what they are and/or should be.

    I'm excited to see some tweaking...and am excited to try my hand at helping out.

     
    • Alexander Iljin

      Alexander Iljin - 2008-03-09

      Damn it! Those double-posts seem to be triggered by reloading the page. Sorry about that, I didn't know.

      The SendMessage is a Windows system function, cf. http://msdn2.microsoft.com/en-us/library/ms644950\(VS.85).aspx
      The "Win." prefix means that it is imported from the Windows module, cf. IMPORT section.
      The first parameter is a handle of a window (HWND) to send the message to. It is supplied at startup by Notepad++ using the setInfo function.
      The second parameter is the message code (AKA command code) to be sent. It's values and meaning are determined by the receiving window's message-processing function implementation.
      The other two parameters and the return value are also determined by the message code.

      In case of my plugin the receiver of the messages is the Scintilla component. Hence, you need the Scintilla interface description, which can be found here: http://scintilla.sourceforge.net/ScintillaDoc.html
      To add new command codes you will also need the Scintilla.h file, which can be found in almost any plugin source code distribution (e.g. InsertPlugin). Or you may download the latest Scintilla sources and find it in the "include" folder.

       
  • Nobody/Anonymous

    NppWebEdit 0.2
    New: Insertion of a pair of tags is undone as a single action.

    Download links:
    http://disk.tom.ru/jud2cmm
    http://rapidshare.de/files/38775074/NppWebEdit0.2.zip.html

    Source-level changes:
    Init procedure: COPY is no longer used for string assignment.
    Added two SCI_ command code constants and two corresponding procedures: BeginUndoAction and EndUndoAction.
    SurroundSelection procedure: added calls to BeginUndoAction and EndUndoAction.

     
  • Jon Henderson

    Jon Henderson - 2008-03-10

    OK, I'm begining to see it (oberon that is - it's awfully helpful to add some syntax highlighting). another question: What does this do "PROCEDURE ['C'] "? specifically the ['C']...

     
  • Alexander Iljin

    Alexander Iljin - 2008-03-10

    Belof is my Oberon syntax highlighting scheme. Paste this into the userDefineLang.xml:

        <UserLang name="Oberon-2" ext="ob2 OB2">
            <Settings>
                <Global caseIgnored="no" />
                <TreatAsSymbol comment="yes" commentLine="yes" />
                <Prefix words1="no" words2="no" words3="no" words4="no" />
            </Settings>
            <KeywordLists>
                <Keywords name="Delimiters">000000</Keywords>
                <Keywords name="Folder+">BEGIN CASE FOR LOOP RECORD THEN WHILE WITH</Keywords>
                <Keywords name="Folder-">END ELSIF</Keywords>
                <Keywords name="Operators">&apos; &quot; # &amp; , . : ; [ ] ^ { } ~ + &lt; = &gt;</Keywords>
                <Keywords name="Comment"> 1(* 2*) 0--</Keywords>
                <Keywords name="Words1">ARRAY ASSERT BOOLEAN BY BYTE CHAR CHR CONST COPY DEC DIV DO ELSE FALSE FINALIZE FINALLY IF HALT IMPORT IN INC INTEGER IS LEN LONG LONGINT LONGREAL MOD MODULE NIL OF OR ORD POINTER PROCEDURE REAL REPEAT SET SHORT SHORTINT TO TRUE TYPE UNTIL VAR</Keywords>
                <Keywords name="Words2">SYSTEM</Keywords>
                <Keywords name="Words3">EXIT RETURN</Keywords>
                <Keywords name="Words4"></Keywords>
            </KeywordLists>
            <Styles>
                <WordsStyle name="DEFAULT" styleID="11" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" />
                <WordsStyle name="FOLDEROPEN" styleID="12" fgColor="0000FF" bgColor="FFFFFF" fontName="" fontStyle="0" />
                <WordsStyle name="FOLDERCLOSE" styleID="13" fgColor="0000FF" bgColor="FFFFFF" fontName="" fontStyle="0" />
                <WordsStyle name="KEYWORD1" styleID="5" fgColor="0000FF" bgColor="FFFFFF" fontName="" fontStyle="0" />
                <WordsStyle name="KEYWORD2" styleID="6" fgColor="FF0000" bgColor="FFFFFF" fontName="" fontStyle="0" />
                <WordsStyle name="KEYWORD3" styleID="7" fgColor="0000FF" bgColor="FFFFFF" fontName="" fontStyle="1" />
                <WordsStyle name="KEYWORD4" styleID="8" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" />
                <WordsStyle name="COMMENT" styleID="1" fgColor="808080" bgColor="FFFFFF" fontName="" fontStyle="0" />
                <WordsStyle name="COMMENT LINE" styleID="2" fgColor="808080" bgColor="FFFFFF" fontName="" fontStyle="0" />
                <WordsStyle name="NUMBER" styleID="4" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" />
                <WordsStyle name="OPERATOR" styleID="10" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="11" />
                <WordsStyle name="DELIMINER1" styleID="14" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" />
                <WordsStyle name="DELIMINER2" styleID="15" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" />
                <WordsStyle name="DELIMINER3" styleID="16" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" />
            </Styles>
        </UserLang>

    The ['C'] marks a certain calling convention, the one invented for the C-family of programming languages (cf. http://en.wikipedia.org/wiki/Calling_convention ). Since Notepad++ is written in C++ we must use the 'C' calling convention for the functions that are meant to be called from it. For the list of other supported values refer to XDS/BIN/xc.hlp:"Direct language specification".

     
  • Jon Henderson

    Jon Henderson - 2008-03-10

    As i have more oberon questions, is there a way to message you without reposting here so that this particular thread can be for downloads and release stuff...

     
    • Alexander Iljin

      Alexander Iljin - 2008-03-10

      Sure! Since I'm a registered user on SourceForge, you may find my e-mail in the profile.

       
  • Jon Henderson

    Jon Henderson - 2008-03-10

    the only one i saw as @ sf.net so let me know if you don't get it.

     
    • Alexander Iljin

      Alexander Iljin - 2008-03-17

      I got your mail and replied.
      Yesterday I wrote you @ sf.net, did you get it?
      I'm going to release version 1.0 of this plugin and I'm waiting for you response.

       
  • Jon Henderson

    Jon Henderson - 2008-03-17

    i responded, it had been tagged as spam (i've since corrected this behavior). if you don't have it yet, check your spam folder.

     
  • Alexander Iljin

    Alexander Iljin - 2008-03-17

    Version 1.0 of the WebEdit plugin is available. Changes:
    - The plugin now has 15 menu slots for user-defined functions read from WebEdit.ini.
    - Added WebEdit.txt file with the plugin description.
    - The plugin is not as tiny as it used to be, because I had to link the runtime library.

    Download links (36 Kb):
    http://rapidshare.com/files/100297005/WebEdit1.0.zip.html
    http://disk.tom.ru/h436y2r

     
    • Agro Rachmatullah

      Great plugin! I've posted a howto on my blog:

      http://www.agronesia.net/2008/06/04/notepad-html-editing-tag-insertion-surround-plugin/

      Bug:

      From the shortcut mapper, all entries for the plugin is "not used"

      Wishlist:

      We should be able to use a syntax like this:

      &Link=<a href="{1:Destination URL}" target="{2:target}">|</a>

      And then the plugin will popup a dialog box asking for "Destination URL" and "target" before inserting it. Mockup screenshot on the blog entry.

      Thanks a lot for the plugin!

       
      • Alexander Iljin

        Alexander Iljin - 2008-06-06

        I'm glad that there are more people enjoying the fruits of my humble contribution.

        The problem with the Shortcut Mapper is related to the one discussed here: http://sourceforge.net/forum/message.php?msg_id=4840426 . I can only provide a sort of workaround by naming the dummy menu items "WebEdit Slot XX", where XX is the number of the slot for disambiguation.

        As to the wishlist, I'm sorry, but my WinApi skills are too inferior to undertake such a GUI enterprise. I have an idea for an even better, more general functionality. The idea is not mine, actually, I borrowed it from the Oberon Operating System, from the module EditKeys. It's a module that utilizes a tiny macro language. Now, that would be really useful! (As to the WebEdit plugin, I don't find it very useful in my programming tasks, I use QuickText instead.)

        A sample workflow would be the following ("<HotKey>" stands for pressing a hotkey, e.g. Ctrl+Enter):
        1. Type anywhere in a document
          Name:proc<HotKey>
        2. It gets automatically expanded into:
          PROCEDURE Name ();
          BEGIN
             |
          END Name;
        "|" marks the new caret position. Note the "Name" identifier is inserted twice. All the new lines are properly indented. The macro name is "proc", it is typed last in the sequence. All the macro parameters are separated by a colon. Macros are defined in the ini-file, editable by the user.

        Your example could be typed as:
        "Selected text...":"Destination URL":target:Link<HotKey>

        The only difficulty could be with the "Selected text..." - if it does contain quotes, those should be escaped (doubled: ""), but that simple argument preparation could be performed with another hotkey. Hmm... It could really work very well if the behaviour of those two hotkeys were properly thought through. You could even chain commands, performing a wrap after wrap after wrap.

        1. Select some text:
          test " text
        2. Press a hotkey, e.g. Ctrl+\ to prepare the selected text to be a macro command argument:
          "test "" text":|
        ("|" marks caret position, last colon added automatically, quotes inside the parameter are escaped, selection is removed)
        3. Type the command name, e.g. "st" for the "strong" tag:
          "test "" text":st|
        4. Press the macro expansion hotkey, e.g. Ctrl+Enter:
          <strong>test " text</strong>
        5. After the expansion the text inside the tag is selected, ready for another Ctrl+\ and the next macro command, and so on.

        The text would be selected on step 5 only if it was previously selected and prepared by Ctrl+\ on step 2, otherwise there would be no selection and the caret would be placed wherever the macro says it should be placed.

        What do you guys think? Pretty awesome?

         
  • Jon Henderson

    Jon Henderson - 2008-03-17

    ok, beyond imagining. amazing.

    and the "not tiny" sure it's a whopping ~45k but most plugins clock in at +100k. this is simply amazing. one thing i noticed and it might not be avoidable. in the shortcut mapper, the names of the plugins don't show up. however, they are in the correct order so as long as you know the order they're listed in it's not that big a deal.

    seriously, Don needs to add this one to the NP++ website.

    simply amazing.

    Great Work Alexander!

     
    • Alexander Iljin

      Alexander Iljin - 2008-03-18

      Thank you! It's always pleasant to hear that. : )

      A little afterthought: maybe WebInsert would be a better name for the plugin. Or TagInsert, or TagWrap. Something along these lines. WebEdit is too pretentious for this tiny tool.

       
  • Jon Henderson

    Jon Henderson - 2008-03-18

    call it EZTemplates or some such...doesn't matter, i've been dreaming of this functionality for years (literally i've been using NP++ for a long time)

    Honestly, i'm using it for more than HTML this is a full-on code template machine.

    simply beautiful

     
  • Nobody/Anonymous

    Plugin is not working for me... everything says "not used" in the menu items box...

     
    • Alexander Iljin

      Alexander Iljin - 2008-03-19

      Sorry, I did not mention the installation process in the text file.
      You have to put WebEdit.ini into the %APPDATA%\Notepad++\plugins\Config folder.

       
  • Nobody/Anonymous

    cool. got it working. Man this is a great plugin!! Is there a way that I can make my tag wraps buttons on the interface, instead of having to drop down the plugins menu,select the web edit menu, and then select tag? It would be easier to just click a button for my tag insertion...

     
  • Alexander Iljin

    Alexander Iljin - 2008-06-07

    WebEdit 1.1 is released.

    Changes:
    - The dummy menu entries are renamed from "not used" to "WebEdit Slot XX", where
      XX is the number of the slot. This helps greatly to find the items in the Shortcut
      Mapper and differentiate between them.
    - The double slash is now recognized as an escape sequence in the ini-file.
    - Added version information resource to the DLL.

    Download links (41Kb):
    http://rapidshare.de/files/39644549/WebEdit1.1.zip.html
    http://disk.tom.ru/rr17gea

     
<< < 1 2 3 4 5 > >> (Page 2 of 5)

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks