• Login
Community
  • Login

FunctionList in 7.9.1

Scheduled Pinned Locked Moved General Discussion
18 Posts 5 Posters 2.4k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C
    cisco779k
    last edited by Nov 2, 2020, 7:07 PM

    tanxs for your reply.
    but how to have this panel? (to run one function)
    or how to run single function?

    P 1 Reply Last reply Nov 2, 2020, 7:45 PM Reply Quote 0
    • P
      PeterJones @cisco779k
      last edited by PeterJones Nov 2, 2020, 7:46 PM Nov 2, 2020, 7:45 PM

      @cisco779k said in FunctionList in 7.9.1:

      i have see new functionList folder into 7.9.1 version.

      First off, this panel is nothing new to v7.9.1. This version just split the old functionList.xml config file into many files in the functionList folder. The Function List functionality has existed for years in Notepad++ (as long as I can remember)

      but how to have this panel?

      Enable it using View > Function List, or the toolbar icon
      262a3c71-d58f-45b4-be83-60158b7f3904-image.png

      (to run one function)
      or how to run single function?

      It doesn’t run the function. It navigates the Notepad++ editor window to the first line of that function, so you can edit the source code for the function. To get it to navigate to the first line of that function, double-click on the name of the function in the Function List panel, as Alan already told you.

      1 Reply Last reply Reply Quote 2
      • L
        linpengcheng @Alan Kilborn
        last edited by Nov 3, 2020, 5:30 AM

        failed to customize markdown & Clojure function list in npp 7.9.1, but success in npp 7.9.

        failed_fn_list_config_files.zip

        1 Reply Last reply Reply Quote 0
        • C
          cisco779k
          last edited by Nov 3, 2020, 8:12 AM

          tanxs Peter for your explanation.
          but my function list window is empty… how to load function ?

          A 1 Reply Last reply Nov 3, 2020, 12:57 PM Reply Quote 0
          • A
            Alan Kilborn @cisco779k
            last edited by Nov 3, 2020, 12:57 PM

            @cisco779k said in FunctionList in 7.9.1:

            but my function list window is empty

            I think you’re going to have to provide some actual information in order for anyone to help you.

            Examples:

            • what Language are you using where you want to see functions in the Function List window?

            • provide a snippet of your code which contains a function definition in the Language, that you are not seeing in the Function List

            • screenshot of what you are seeing when you look at Function List window

            Really, you haven’t provided much to go on. See HERE.

            1 Reply Last reply Reply Quote 0
            • C
              cisco779k
              last edited by Nov 3, 2020, 1:52 PM

              alt text

              P A 2 Replies Last reply Nov 3, 2020, 2:00 PM Reply Quote 0
              • P
                PeterJones @cisco779k
                last edited by Nov 3, 2020, 2:00 PM

                @cisco779k ,

                Yes, unless you go through the process that @Alan-Kilborn showed in the first post in this topic, Normal Text does not have functions. Notepad++ has no way of knowing how you define a function in Normal Text unless you tell it. Normal Text is not the best way to figure out if the Function List panel is working for you.

                Further, the document you showed is empty. How do you expect an empty document to define any functions, whatever language it’s supposed to be?

                If you pick a pre-supported programming language, and open a file of that type (so the Language menu shows it properly selected and the status bar agrees), then the function list will show the defined functions. For example, if I open PerlForFunctionListDebug.pl

                #!perl
                
                use strict;
                use warnings;
                
                sub with_paren() {}
                sub no_paren_brace {}
                sub MyPackage::WithParen() {}
                sub withProto :prototype(\@@) {}
                sub withAttrib  :Ugly : Duckling : Here {}
                
                package MyName;
                sub InPackage() {}
                
                
                __DATA__
                sub fake_data_function() {}
                
                __END__
                sub fake_end_function() {}
                

                … then I see:
                62a55edd-1503-48a1-b461-6921e3410b1e-image.png

                1 Reply Last reply Reply Quote 3
                • A
                  Alan Kilborn @cisco779k
                  last edited by Nov 3, 2020, 2:03 PM

                  @cisco779k

                  Why don’t you download Notepad_plus.cpp from HERE by right-clicking its contents and doing a SaveAs in your browser, and then open this file in Notepad++?

                  Then you should see the following, which MIGHT help you understand this feature by looking at the following:

                  7aa174a2-4ec5-4a06-bf8b-e50e2ef58e37-image.png

                  A 1 Reply Last reply Nov 3, 2020, 2:59 PM Reply Quote 3
                  • A
                    Alan Kilborn @Alan Kilborn
                    last edited by Nov 3, 2020, 2:59 PM

                    BTW, wow, did I ever select a “violent-sounding” function to use as my example one! :-(

                    1 Reply Last reply Reply Quote 5
                    • C
                      cisco779k
                      last edited by cisco779k Nov 4, 2020, 9:07 AM Nov 4, 2020, 9:06 AM

                      @PeterJones
                      i have copy and paste your example on np but…
                      alt text

                      @ Alan
                      Notepad_plus.cpp work. tnxs.
                      alt text

                      A 1 Reply Last reply Nov 4, 2020, 12:15 PM Reply Quote 0
                      • A
                        astrosofista @cisco779k
                        last edited by Nov 4, 2020, 12:15 PM

                        Hi @cisco779k

                        As @PeterJones file example is not saved, you need to manually assing the correct language to the source file, Perl in this case. Once you do that the function list panel will do its job.

                        But as @Alan-Kilborn file example was saved with an specific extension, Notepad++ automatically assigned the correct language and populate the function list panel.

                        Hope this helps.

                        1 Reply Last reply Reply Quote 4
                        • C
                          cisco779k
                          last edited by Nov 4, 2020, 2:38 PM

                          ok tanxs for explaination! cheers

                          1 Reply Last reply Reply Quote 0
                          • L
                            linpengcheng
                            last edited by Apr 3, 2021, 3:21 PM

                            This post is deleted!
                            1 Reply Last reply Reply Quote 0
                            • A Alan Kilborn referenced this topic on Nov 6, 2024, 1:25 PM
                            • First post
                              Last post
                            The Community of users of the Notepad++ text editor.
                            Powered by NodeBB | Contributors