sketchucation logo sketchucation
    • 登入
    Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
    ⚠️ Important | Libfredo 15.6b introduces important bugfixes for Fredo's Extensions Update

    Notepad++ SU8 Ruby API Autocomplete

    已排程 已置頂 已鎖定 已移動 Developers' Forum
    62 貼文 12 Posters 15.4k 瀏覽 12 Watching
    正在載入更多貼文
    • 從舊到新
    • 從新到舊
    • 最多點贊
    回覆
    • 在新貼文中回覆
    登入後回覆
    此主題已被刪除。只有擁有主題管理權限的使用者可以查看。
    • Dan RathbunD 離線
      Dan Rathbun
      最後由 編輯

      @driven said:

      @dan rathbun said:

      Here's the 1.8.6 constant list AND class methods for the Marshal module:

      What I was trying to say is I don't know the method you used to get the additional information about this Constant.

      If you mean the text that is in the XML descr attributes.. that I just copy and pasted manually out of the Ruby Core Reference Help CHM. Then edited it a bit to make it more readable, more concise, etc. (Sometimes those Japanese guys who work on the Ruby Core don't write the best English.)

      Of course... doing that manually for all of the methods in Ruby and the Sketchup API is a lifetime project.

      I'm looking at seeing if I can script it.. at least grabbing the text that can be edited and cut-down later. (Notepad++ has a memory limit to the text for each function.)

      @@ThomThom - That BitBucket website just about locks up MSIE 7. But I stopped posting new constant lists, as I realized that it is better the write a plugin that generates the XML files, so I've been working on that. Also need to write a database utility, or maybe a webform so the functions and overloads can be added, edited, etc. more easily by multiple people.

      I'm not here much anymore.

      1 條回覆 最後回覆 回覆 引用 0
      • D 離線
        driven
        最後由 編輯

        @thomthom said:

        I use TextMate, would be nice to get an autocomplete for that. If that's even possible...

        I'll try this with TextWrangler, and let you know how it pans out http://c-command.com/bbautocomplete/

        john

        learn from the mistakes of others, you may not live long enough to make them all yourself...

        1 條回覆 最後回覆 回覆 引用 0
        • thomthomT 離線
          thomthom
          最後由 編輯

          @dan rathbun said:

          @@ThomThom - That BitBucket website just about locks up MSIE 7

          hm... No problems in IE8 here. (Don't have IE7 any more on any of my machines.)

          Thomas Thomassen — SketchUp Monkey & Coding addict
          List of my plugins and link to the CookieWare fund

          1 條回覆 最後回覆 回覆 引用 0
          • U 離線
            unclex
            最後由 編輯

            Wonderful!!!!!!

            1 條回覆 最後回覆 回覆 引用 0
            • J 離線
              Jim
              最後由 編輯

              This seems sort on hard to maintain as a .xml file. Would it be easier to manage as in a different format that could be translated into the .xml?

              Maybe a spreadsheet?
              (A read-only version of the actual Spreadsheet)

              Edit - see next post.

              Hi

              1 條回覆 最後回覆 回覆 引用 0
              • J 離線
                Jim
                最後由 編輯

                Here's a Ruby script that creates the Ruby.xml auto-complete file directly from the online spreadsheet.

                Use:
                prompt$ ruby gss2nppxml.rb (Google Spreadsheet 2 Notepad Plus Plus XML)

                requires 'nokogiri' ( gem install nokogiri)

                The file Ruby.xml will be created in the same folder. Move/Copy this file to the Notepad++ plugins/API folder and restart Notepad++.

                n++ auto-complete documentation.

                The spreadsheet is publically editable by anyone with the link (see attachment,) so anyone can easily contribute by adding return values and function paramter hints to the sheets.


                link.txt


                gss2nppxml.rb

                Hi

                1 條回覆 最後回覆 回覆 引用 0
                • thomthomT 離線
                  thomthom
                  最後由 編輯

                  Oooh, what have you done here Jim? Looks interesting. I haven't checked out the spreadcheet you generated, but does it include argument name hints?
                  Do you have a pre-compiled XML file?

                  Thomas Thomassen — SketchUp Monkey & Coding addict
                  List of my plugins and link to the CookieWare fund

                  1 條回覆 最後回覆 回覆 引用 0
                  • Dan RathbunD 離線
                    Dan Rathbun
                    最後由 編輯

                    So the spreadsheet is is used as a dB. I had done this in the past when outputting HTML API docs for eigenMath, which I eventually compiled into a CHM using the free MS HTML Help Workshop.

                    I had proposed something along this line for the Ruby API docs, but input forms would be a great benefit. Fortunately.. Excel and it's OpenSource clones can have worksheets that are dB input forms (or the suite's dB engine Access or OpenBase, can be used to create an updating applet with forms.)

                    I'm not here much anymore.

                    1 條回覆 最後回覆 回覆 引用 0
                    • J 離線
                      Jim
                      最後由 編輯

                      @thomthom said:

                      does it include argument name hints?

                      Yes. If you look at the spreadsheet, overloads are handled using a period (.) You can have any number of overloads and parameters.

                      @thomthom said:

                      Do you have a pre-compiled XML file?

                      Ruby.xml.txt

                      NP++ Seems to get confused, though. See how NP++ uses the hints from add for add_3d_text. I can't see anything wrong in the XML according to the docs.

                      2012-06-03_171410.png

                      2012-06-03_171428.png

                      Hi

                      1 條回覆 最後回覆 回覆 引用 0
                      • A 離線
                        Anton_S
                        最後由 編輯

                        Is there a way for np++ automatically to add/remove your own module, class, and method names into/from the auto-complition list?

                        What I mean:
                        Lets say I write some class in NP++, naming it 'Anton'.
                        On the next line I start with letter A and the auto-completion-list should show-up displaying all index with A including my name.
                        Then I erase my class and on next line start with word A again. Now, the index list should no longer have 'Anton' in the index.

                        Sorry, that's kind of awkward put together, though I hope ya could understand what I mean. 👊

                        1 條回覆 最後回覆 回覆 引用 0
                        • thomthomT 離線
                          thomthom
                          最後由 編輯

                          Not that I'm aware of - but it would be really nice. It's something that an IDE does though - and Notepadd++ is more of a text editor than an IDE. But they do have a plugin system - maybe there is something there.... ?

                          Thomas Thomassen — SketchUp Monkey & Coding addict
                          List of my plugins and link to the CookieWare fund

                          1 條回覆 最後回覆 回覆 引用 0
                          • Dan RathbunD 離線
                            Dan Rathbun
                            最後由 編輯

                            @anton_s said:

                            Is there a way for np++ automatically to add/remove your own module, class, and method names into/from the auto-complition list?

                            What I was really wishing for... was to be able to load multiple API overlay files.

                            One for Core Ruby. Then if You wanted to work on a Rails project, you could load a Rails API overlay list.

                            For a Sketchup example, the Core Ruby API would always load. Then of course we'd need the basic Sketchup API. If we also needed the TT_Lib API, and the WxSU APIs, we could load them also.

                            NP++ has session files that keep track of all open files in a project, their window sizes, the language they use, where the cursor is, what is hilighted, etc. So keeping an API file list for each file would not be "out of this world."

                            For a Js example, you could set a Core Js, and overlay say, the JQuery API on top of it.

                            And it would also be nice to have a "bread-crumb" API bar that would list the loaded APIs for the active file.
                            There is alot of room on the left side of the statusbar (just after it displays the file language, and before the file length.)

                            💭

                            I'm not here much anymore.

                            1 條回覆 最後回覆 回覆 引用 0
                            • thomthomT 離線
                              thomthom
                              最後由 編輯

                              [off:yn4rf05y]And a list of methods in file...[/off:yn4rf05y]

                              Thomas Thomassen — SketchUp Monkey & Coding addict
                              List of my plugins and link to the CookieWare fund

                              1 條回覆 最後回覆 回覆 引用 0
                              • J 離線
                                Jim
                                最後由 編輯

                                Time to find a new editor.

                                Hi

                                1 條回覆 最後回覆 回覆 引用 0
                                • thomthomT 離線
                                  thomthom
                                  最後由 編輯

                                  @jim said:

                                  Time to find a new editor.

                                  Got any good alternatives?

                                  On OSX there is TextMate, but Windows...?

                                  Thomas Thomassen — SketchUp Monkey & Coding addict
                                  List of my plugins and link to the CookieWare fund

                                  1 條回覆 最後回覆 回覆 引用 0
                                  • Rich O BrienR 離線
                                    Rich O Brien Moderator
                                    最後由 編輯

                                    Sublime 2?

                                    Download the free D'oh Book for SketchUp 📖

                                    1 條回覆 最後回覆 回覆 引用 0
                                    • thomthomT 離線
                                      thomthom
                                      最後由 編輯

                                      @rich o brien said:

                                      Sublime 2?

                                      Looking really good!! So far it got the features I use the most in NP++. 👍 👍 👍

                                      Thomas Thomassen — SketchUp Monkey & Coding addict
                                      List of my plugins and link to the CookieWare fund

                                      1 條回覆 最後回覆 回覆 引用 0
                                      • thomthomT 離線
                                        thomthom
                                        最後由 編輯

                                        Ah! Yes! Code insight! It suggest the methods I have in the current document! sweeeet!

                                        Didn't provide hint for File.exist? - it suggested File, but not exist? ...

                                        You can add your own keywords? Anyone added the SU API to this?

                                        Thomas Thomassen — SketchUp Monkey & Coding addict
                                        List of my plugins and link to the CookieWare fund

                                        1 條回覆 最後回覆 回覆 引用 0
                                        • Rich O BrienR 離線
                                          Rich O Brien Moderator
                                          最後由 編輯

                                          found it a few months back and really like it but i don't use it for ruby

                                          Download the free D'oh Book for SketchUp 📖

                                          1 條回覆 最後回覆 回覆 引用 0
                                          • thomthomT 離線
                                            thomthom
                                            最後由 編輯

                                            And spell checking for comments and strings!!! FTW!!!

                                            Default shortcuts for bookmarks and duplicate line is the same as NP++ ... double-plus-good!!!

                                            Now, where is current-line-highlighting...?

                                            Thomas Thomassen — SketchUp Monkey & Coding addict
                                            List of my plugins and link to the CookieWare fund

                                            1 條回覆 最後回覆 回覆 引用 0
                                            • 1
                                            • 2
                                            • 3
                                            • 4
                                            • 2 / 4
                                            • 第一個貼文
                                              最後的貼文
                                            Buy SketchPlus
                                            Buy SUbD
                                            Buy WrapR
                                            Buy eBook
                                            Buy Modelur
                                            Buy Vertex Tools
                                            Buy SketchCuisine
                                            Buy FormFonts

                                            Advertisement