Can I display the subroutine's name I'm editing?
-
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
-
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?
-
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
-
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. -
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
-
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 -
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.dlllike 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. -
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.dllI 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
-
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?
-
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