• Login
Community
  • Login

Can I display the subroutine's name I'm editing?

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
10 Posts 3 Posters 1.3k 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.
  • R
    Rick Sparber
    last edited by Jul 8, 2019, 2:17 PM

    I writing code to run on an Arduino. Often the subroutine I am modifying has more lines than fit on the screen. It would be helpful if I could see the subroutine’s name in the panel below the window. Any way to do this?

    Thanks in advance,

    Rick

    1 Reply Last reply Reply Quote 0
    • M
      Michael Vincent
      last edited by Jul 8, 2019, 2:48 PM

      I use the Function List (View menu => Function List) and it shows a dockable pane with the function names and highlights the current one that I’m “in” - as in, where my cursor is. Could that work?

      1 Reply Last reply Reply Quote 3
      • R
        Rick Sparber
        last edited by Jul 8, 2019, 11:53 PM

        Michael,

        That would be perfect. However, I see the function list but no highlighting. Is there some option I need to turn on?

        Thanks,

        Rick

        E 1 Reply Last reply Jul 9, 2019, 11:21 AM Reply Quote 0
        • E
          Ekopalypse @Rick Sparber
          last edited by Jul 9, 2019, 11:21 AM

          @Rick-Sparber

          Are you talking about highlighting within the code or within functionlist?
          If the latter is the case, the functionlist draws a rectangle over the current edited function in its treeview.

          1 Reply Last reply Reply Quote 3
          • R
            Rick Sparber
            last edited by Jul 10, 2019, 9:05 PM

            When I click on a line in my file, I would like the Function List to highlight the subroutine I’m in. I can click on any subroutine in the Function List and it will take me to the first line of that subroutine. But when I click on any line in that subroutine, the highlighting goes away.

            I’m wondering if “function” is not the same as subroutine.

            Rick

            E 1 Reply Last reply Jul 11, 2019, 10:43 AM Reply Quote 0
            • M
              Michael Vincent
              last edited by Jul 11, 2019, 3:22 AM

              What language are you developing in? I assumed C base on “Arduino”. For me, the function list with C works just fine. I click the function name in the list and it brings me to the first line of that function. Scrolling then in the edit window into the function leaves the function name in the function list highlighted. Scrolling up and out of the function in the edit window into the function above it changes the highlight in the function list to the function name that I’m currently scrolling through in the edit window (where my cursor is).

              This works this way with Perl and Python as well (I do most of my development in these two languages lately).

              Sorry about the lengthy explanation, I see you can create animated GIFs (others do it), I just haven’t figured out / tried to yet. I’m sure illustrating what I’m talking about in the first paragraph above would do more justice.

              I’m on the latest N++ 7.7.1 64-bit WIndows 10 64-bit. What version of N++ are you on? Debug info would be nice (“?” menu, “Debug Info…” item):

              Notepad++ v7.7.1 (64-bit)
              Build time : Jun 16 2019 - 21:24:47
              Path : C:\usr\bin\npp\notepad++.exe
              Admin mode : OFF
              Local Conf mode : ON
              OS : Windows 10 (64-bit)
              Plugins : AutoSave.dll CodeAlignmentNpp.dll ColumnTools.dll ComparePlugin.dll CsvQuery.dll DSpellCheck.dll Explorer.dll GitSCM.dll HexEditor.dll JSMinNPP.dll MarkdownViewerPlusPlus.dll NppConsole.dll nppConverter.dll NppExec.dll NppExport.dll NppFTP.dll NppMenuSearch.dll PluginManager.dll PreviewHTML.dll QuickText.dll SpeechPlugin.dll SurroundSelection.dll TagLEET.dll TagsView.dll XMLTools.dll ZoomDisabler.dll

              1 Reply Last reply Reply Quote 2
              • E
                Ekopalypse @Rick Sparber
                last edited by Jul 11, 2019, 10:43 AM

                @Rick-Sparber

                works for me on

                Notepad++ v7.6.6 (64-bit)
                Build time : Apr 3 2019 - 23:52:32
                Path : D:…\notepad++.exe
                Admin mode : OFF
                Local Conf mode : ON
                OS : Windows 7 (64-bit)
                Plugins : mimeTools.dll NppConverter.dll PythonScript.dll

                like described by @michael-vincent as well.
                A litte addon, scrolling, of course only, if the caret moves inside the source code.
                It doesn’t switch to another function/subroutine, which by the way are just names ignore it, if you use the mouse wheel and scroll up and down.

                1 Reply Last reply Reply Quote 2
                • R
                  Rick Sparber
                  last edited by Jul 11, 2019, 11:30 AM

                  Here is my debug information:

                  Notepad++ v7.7.1 (64-bit)
                  Build time : Jun 16 2019 - 21:24:47
                  Path : C:\Program Files\Notepad++\notepad++.exe
                  Admin mode : OFF
                  Local Conf mode : OFF
                  OS : Windows 10 (64-bit)
                  Plugins : mimeTools.dll NppConverter.dll

                  I am programming in C/C++ for an Arduino Compatible (Sparkfun Pro Micro). My SDE is the standard one from Arduino. A typical subroutine starts with “bool CycleActiveQ()”. On the next line is “{” and the last line in the subroutine is “}”. I have tried putting “{” on the same line as the title but it made no difference.

                  On the Language drop-down menu, I have Cpp selected.

                  I have checked and do have functionList.xml in the same folder as the notepad++ application.

                  I can click on any subroutine on the Function List and will be taken to the start of that subroutine. It highlights that line in the code. There is no highlighting in the Function List.

                  There has got to be some parameter I have set wrong. Suggestions?

                  Thanks,

                  Rick

                  E 1 Reply Last reply Jul 11, 2019, 11:41 AM Reply Quote 0
                  • E
                    Ekopalypse @Rick Sparber
                    last edited by Jul 11, 2019, 11:41 AM

                    @Rick-Sparber

                    Not a gif but here is what I see.
                    Caret is inside CycleActiveQ2, functionlist highlights it

                    as soon as I move the caret outside of that function towards CycleActiveQ I get.

                    And this does not happen on your side?

                    1 Reply Last reply Reply Quote 2
                    • R
                      Rick Sparber
                      last edited by Jul 13, 2019, 1:30 PM

                      Ah, the highlight is very faint both in your screen print and on my monitor. How do I make it have more contrast?

                      Thanks for your invaluable help.

                      Rick

                      1 Reply Last reply Reply Quote 0
                      9 out of 10
                      • First post
                        9/10
                        Last post
                      The Community of users of the Notepad++ text editor.
                      Powered by NodeBB | Contributors